Storj node keeps restarting

I just setup my Storj node on Linux Debian CLI but when I run the node, it seems to be in a restart loop.

I followed every step from the official setup guide. Here is how I start the node in step 3: Storage Node - Storj Node Operator Docs

When I check the status of it with “sudo docker ps -a”, it has only been up for seconds.

When I check it with “sudo docker exec -it storagenode /app/dashboard.sh”, it shows the following error: “rpc: dial tcp 127.0.0.1:7778: connect: connection refused”

When I look at the logs with “sudo docker logs --tail 20 storagenode”, it shows the following error:
“Error starting master database on storagenode: group:
— stat config/storage/blobs: no such file or directory
— stat config/storage/temp: no such file or directory
— stat config/storage/garbage: no such file or directory
— stat config/storage/trash: no such file or directory”

I have no clue on what to do to get this working. Any help would be appreciated and please feel free to request any info needed to fix this.

Wellcome to the forum,

my guess would be: the firewall blocks internal port, and maybe permission problem with data dir.

maybe start over tomorrow and try the linux gui, or windows.

or one more competent forum user will take on this :slight_smile: just let them wake up first :sleeping:

Hello @Eleos,
Welcome to the forum!

If this is a new node - you missed the setup step. However, you must not run the setup step, if you called it once in the past for this identity.

If that was a worked node, then this is mean that the disk is dismounted. Please check the reason, why your disk is disappeared. You must not run a setup step in this case, otherwise you could destroy your node.

I ran the setup step already so I can’t run that again as you said.
The node has never worked, this is my first time joining as a Storj Node Operator.
The disk was mounted, I double checked.

Please post your docker run command here between two new lines with three backticks, like this:

```
docker run -d ...
```

you may mask a private information.

As per these docs: Storage Node - Storj Node Operator Docs

What I put for the setup command (Step 2):

docker run --rm -e SETUP="true" \
    --user $(id -u):$(id -g) \
    --mount type=bind,source="/home/pi/.local/share/storj/identity/storagenode",destination=/app/identity \
    --mount type=bind,source="/mnt/drive1",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

What I put the the node run command (Step 3):

docker run -d --restart unless-stopped --stop-timeout 300 \
    -p 28967:28967/tcp \
    -p 28967:28967/udp \
    -p 127.0.0.1:14002:14002 \
    -e WALLET="0x---" \
    -e EMAIL="user@example.com" \
    -e ADDRESS="domain.ddns.net:28967" \
    -e STORAGE="14TB" \
    --user $(id -u):$(id -g) \
    --mount type=bind,source="/home/pi/.local/share/storj/identity/storagenode",destination=/app/identity \
    --mount type=bind,source="/mnt/drive1",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

Did you get any error?
Because if paths are exist, it looks good for me, however, you would not get an error during a normal docker run command.

Please, show result of the command:

ls -l /mnt/drive1

and

ls -l /home/pi/.local/share/storj/identity/storagenode

By the way, I would recommend to copy/move your identity folder to the disk with data and update your regular docker run command.

Okay, so I started from scratch (new linux install, new identity created and authorized) so let’s forget all details for now and go through the setup process.

I just got to and ran the setup command and looked for errors after it ran.

docker run --rm -e SETUP="true" \
    --user $(id -u):$(id -g) \
    --mount type=bind,source="/mnt/drive1/identity",destination=/app/identity \
    --mount type=bind,source="/mnt/drive1/data",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

“/mnt/drive1/identity” contains the 6 generated files when creating an identity.
“/mnt/drive1/data” is where the user data will go.

After the command finished running, I got this error:
file or directory not found: open identity/identity.cert: permission denied

When I use this command to check permissions: ls /mnt/drive1 -l
I get the following:

total 8
drwxr-xr-x 2 root root 4096 Jul 16 17:41 data
drwxr--r-- 2 root root 4096 Jul 16 17:41 identity
sudo chown -R $(id -u):$(id -g) /mnt/drive1/identity
sudo chown -R $(id -u):$(id -g) /mnt/drive1/data

and

ls /mnt/drive1 -l
1 Like

Could you explain exactly what this chown command is doing please? I’d like to understand it.

This was the issue, thank you.