Node run command

I have 2 questions for my run command for one of my nodes. It is in a docker container with watchtower updates and every is working. However I noticed from the docs, that the docker tag is now latest instead of beta.
My run command still conteins “–name storagenode storjlabs/storagenode:beta” so I wonder if I can keep it this way or if I should restart the node with latest tag and if it would be safe to do so.

Second question is also the run command. I had added options for log processing: -"-log-driver local --log-opt mode=non-blocking --log-opt max-size=100m --log-opt max-file=4" and did not notice and errors until last manual restart when “–log-opt command not found” was issued as error. The node however started and runs fine. Why am I getting this error?

Yes and yes. You should do that asap.

sounds like you forgot the line continued on next line slash

1 Like

Can’t test it right now but you are right, there was no slash. So I guess that was it. I’ll comment again if your answer did not resolve it. Many thanks!

Just to make clear: I stop it, remove it and simply start it again with the new tag? Nothing else required?

Yes, just how the documentation likes it.

https://documentation.storj.io/resources/faq/how-do-i-change-my-parameters-such-as-payout-address-allotted-storage-space-and-bandwidth

1 Like

Now I was able to test my run command but now the container would not start at all. Maybe the command is wrong. I wanted to add this to the run command:
\ --log-driver local \ --log-opt mode=non-blocking \ --log-opt max-size=100m \ --log-opt max-file=4

Without the slashes it would throw an error but at least the container would start. Any idea what is wrong with my command?

The slash always \
goes at the\
end \
of the line.

1 Like

Oh yes, that is just a display issue from the board software here from the code tags I have used. My run command is per line and the slash is at the end of the line.

What is the error?
What is the version of the docker?
Please put your whole command between two lines with three backticks ```: three backticks line before the first line of the command and three backticks after the last line of the command.

docker run -d --restart unless-stopped -p 28967:28967 \
    -p 14002:14002 \
    -e WALLET="" \
    -e EMAIL="" \
    -e ADDRESS="" \
    -e BANDWIDTH="TB" \
    -e STORAGE="TB" \
    --mount type=bind,source="/home/storagenode",destination=/app/identity \
    --mount type=bind,source="/mnt/storj",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

This run command works perfectly.

When I add

\
    --log-driver local \ 
    --log-opt mode=non-blocking \ 
    --log-opt max-size=100m \ 
    --log-opt max-file=4

then it no longer starts. It keeps saying that the container is restarting but never succesfully comes online.
When I remove the log lines, then it starts in seconds.

The basic syntax for the command is: docker run [OPTIONS] IMAGE so the options you are adding go in the middle. (Maybe try adding one at a time)

Could you specify where “in the middle” is? Right after the -d?

Anywhere between

docker run -d --restart unless-stopped -p 28967:28967 \

and

--name storagenode storjlabs/storagenode:latest

When was using log-opts I put them right above the wallet address and it worked for me.

Ok thanks. I will try it the next time the node needs a restart.

It should be something like this:

docker run -d --restart unless-stopped -p 28967:28967 \
    -p 14002:14002 \
    -e WALLET="" \
    -e EMAIL="" \
    -e ADDRESS="" \
    -e BANDWIDTH="TB" \
    -e STORAGE="TB" \
    --log-driver local \ 
    --log-opt mode=non-blocking \ 
    --log-opt max-size=100m \ 
    --log-opt max-file=4 \
    --mount type=bind,source="/home/storagenode",destination=/app/identity \
    --mount type=bind,source="/mnt/storj",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

I will try it on the next restart.