Storagenode always says its restarting`

Hi,

This is my first node so I’m still figuring everything out. I’m hoping it’s a simple issue, but when I run docker ps -a I get the following:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
xxxxxxxxxxxxx storjlabs/storagenode:beta “/entrypoint” 24 minutes ago Restarting (1) 39 seconds ago storagenode
xxxxxxxxxxxxx storjlabs/watchtower “/watchtower storage…” 2 hours ago Up 2 hours watchtower

Any help is appreciated. Thanks!

Hello @Ale,
Welcome to the forum!

docker logs --tail 20 storagenode

did you updated docker?

Thanks! Here’s the output. I believe I updated the docker (followed the official install guide):

xxx-MacBook-Air:~ xxxxxxx

$ docker logs --tail 20 storagenode
–db.conn_max_lifetime duration Maximum Database Connection Lifetime, -1ns means the stdlib default (default -1ns)
–db.max_idle_conns int Maximum Amount of Idle Database connections, -1 means the stdlib default (default 20)
–db.max_open_conns int Maximum Amount of Open Database connections, -1 means the stdlib default (default 25)
–debug.addr string address to listen on for debug endpoints (default “127.0.0.1:0”)
–debug.trace-out string If set, a path to write a process trace SVG to
–defaults string determines which set of configuration defaults to use. can either be ‘dev’ or ‘release’ (default “release”)
–identity-dir string main directory for storagenode identity credentials (default “identity”)
–log.caller if true, log function filename and line number
–log.development if true, set logging to development mode
–log.encoding string configures log encoding. can either be ‘console’ or ‘json’ (default “console”)
–log.level Level the minimum log level to log (default info)
–log.output string can be stdout, stderr, or a filename (default “stderr”)
–log.stack if true, log stack traces
–metrics.addr string address to send telemetry to (default “collectora.storj.io:9000”)
–metrics.app string application name for telemetry identification (default “storagenode”)
–metrics.app-suffix string application suffix (default “-release”)
–metrics.instance-prefix string instance id prefix
–metrics.interval duration how frequently to send up telemetry (default 1m0s)
–monkit.hw.oomlog string path to log for oom notices (default “/var/log/kern.log”)

Please, do not use any word processors to form the docker run command, they will replace the straight quotes to curly ones, double dashes to the long dash and so on. Even Notes will do it. Those special symbols are not valid for the terminal.
Use only plain text editors, nano from the CLI for example.
Stop and remove the container:

docker stop -t 300 storagenode
docker rm storagenode 

Copy the docker run command from the https://documentation.storj.io/setup/cli/storage-node#running-the-storage-node and replace parameters to yours then run it.

I was using Notes, so that must have cause that part of my issues, thanks.

My log now says this: 2020-01-22T17:04:29.148Z INFO Configuration loaded from: /app/config/config.yaml
2020-01-22T17:04:29.150Z FATAL file or directory not found error: open identity/identity.cert: no such file or directory

I see the identity.cert file in the path I put into the parameters when I re ran the node setup.

–mount type=bind,source="/Users/xxxxxx/Library/Application Support/Storj/Identity",destination=/app/identity \

I think you missed the storagenode in the path to the identity. It should looks like

--mount type=bind,source="/Users/xxxxxx/Library/Application Support/Storj/Identity/storagenode",destination=/app/identity \

So, please, stop and remove the container:

docker stop -t 300 storagenode 
docker rm storagenode 

And run it back with all your parameters, include changed one

You’re right–I left storagenode off the end. Now I get the following:

2020-01-23T19:41:44.581Z INFO Configuration loaded from: /app/config/config.yaml
2020-01-23T19:41:44.588Z FATAL file or directory not found error: open identity/identity.key: permission denied

I loosened up permissions within the MacOS to give read/write permissions to everyone, but that doesn’t seem like it’s made a difference.

Please, show the result of the command:

ls -l "/Users/xxxxxx/Library/Application Support/Storj/Identity/storagenode"

-rw-rw-rw- 1 root staff 546 Jan 19 19:06 ca.1579489598.cert
-rw-rw-rw- 1 root staff 1076 Jan 19 19:06 ca.cert
-rw----rw- 1 root staff 241 Jan 5 17:43 ca.key
-rw-rw-rw- 1 root staff 1088 Jan 19 19:06 identity.1579489598.cert
-rw-rw-rw- 1 root staff 1618 Jan 19 19:06 identity.cert
-rw----rw- 1 root staff 241 Jan 5 17:43 identity.key

How you run your storagenode? With sudo?

Make sure that you uses a straight quotes not curly ones. The case is important too.
Just copy your actual path from the docker run command and try to list the content, as here

Sudo docker run -d --restart unless-stopped -p 28967:28967
-p 127.0.0.1:14002:14002
-e WALLET=“XXX”
-e EMAIL=“XXX”
-e ADDRESS=“http://XXX:28967
-e BANDWIDTH=“200TB”
-e STORAGE=“5TB”
–mount type=bind,source="/Users/xxxxxxxxx/Library/Application Support/Storj/Identity/storagenode",destination=/app/identity
–mount type=bind,source="/Volumes/Storj1",destination=/app/config
–name storagenode storjlabs/storagenode:beta

This is how I’m running it. I copied the whole thing from https://documentation.storj.io/setup/cli/storage-node straight into Nano, so I don’t think I have any curly “”.

sudo chmod g+r "/Users/xxxxxxxxx/Library/Application Support/Storj/Identity/storagenode/ca.key" "/Users/xxxxxxxxx/Library/Application Support/Storj/Identity/storagenode/identity.key"

Then restart the container

sudo docker restart -t 300 storagenode

It appears it’s up and running now!

2020-01-23T22:10:35.237Z INFO Configuration loaded from: /app/config/config.yaml

2020-01-23T22:10:35.261Z INFO Operator email: XXXXXX

2020-01-23T22:10:35.262Z INFO operator wallet: XXXXXX

2020-01-23T22:10:35.559Z INFO version running on version v0.29.3

2020-01-23T22:10:35.708Z INFO db.migration Database Version {“version”: 28}

2020-01-23T22:10:35.811Z INFO Node XXXXXXX started

2020-01-23T22:10:35.811Z INFO Public server started on [::]:28967

2020-01-23T22:10:35.811Z INFO Private server started on 127.0.0.1:7778

2020-01-23T22:10:35.816Z INFO trust Scheduling next refresh {“after”: “6h0m43.220320905s”}

2020-01-23T22:10:35.817Z INFO bandwidth Performing bandwidth usage rollups

2020-01-23T22:10:35.859Z INFO piecestore:monitor Remaining Bandwidth {“bytes”: 200000000000000}

2020-01-23T22:10:35.869Z INFO version running on version v0.29.3