--user $(id -u):$(id -g) \

Hello, my node was running very old configuration:

docker run -d --restart unless-stopped --stop-timeout 300
-p xxxxx:28967/tcp
-p xxxxx:28967/udp
-p 14002:14002
-e WALLET=“xxxxxxxxxxxxxxxxxxx”
-e EMAIL=“xxxx@xxxx”
-e ADDRESS=“xxxxxxxx:xxx”
-e STORAGE=“xxTB”
–memory=650m
–log-opt max-size=50m
–log-opt max-file=10
–mount type=bind,source=“/home/”,destination=/app/identity
–mount type=bind,source=“/home/”,destination=/app/config
–name storagenode storjlabs/storagenode:latest

I see that now, these 3 lines are not needed anymore:

--memory=650m \
--log-opt max-size=50m \
--log-opt max-file=10 \

As well i see missing new line:

--user $(id -u):$(id -g) \

But the problem is, that when i remove those 3 lines and add 1 extra, my docker does not start at all. It gives error about the permissions:

Error: trust: open config/trust-cache.json: permission denied
2022-10-22 06:50:33,814 INFO exited: storagenode (exit status 1; not expected)
2022-10-22 06:50:35,824 INFO spawned: ‘storagenode’ with pid 71
2022-10-22T06:50:36.038Z INFO Configuration loaded {“Process”: “storagenode”, “Location”: “/app/config/config.yaml”}
2022-10-22T06:50:36.039Z INFO Anonymized tracing enabled {“Process”: “storagenode”}
2022-10-22T06:50:36.044Z INFO Operator email {“Process”: “storagenode”, “Address”: “xxx@xxxx”}
2022-10-22T06:50:36.045Z INFO Operator wallet {“Process”: “storagenode”, “Address”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”}
Error: trust: open config/trust-cache.json: permission denied
2022-10-22 06:50:36,374 INFO exited: storagenode (exit status 1; not expected)
2022-10-22 06:50:39,385 INFO spawned: ‘storagenode’ with pid 80
2022-10-22T06:50:39.589Z INFO Configuration loaded {“Process”: “storagenode”, “Location”: “/app/config/config.yaml”}
2022-10-22T06:50:39.590Z INFO Anonymized tracing enabled {“Process”: “storagenode”}
2022-10-22T06:50:39.594Z INFO Operator email {“Process”: “storagenode”, “Address”: “xxx@xxxx”}
2022-10-22T06:50:39.595Z INFO Operator wallet {“Process”: “storagenode”, “Address”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”}
Error: trust: open config/trust-cache.json: permission denied
2022-10-22 06:50:40,169 INFO exited: storagenode (exit status 1; not expected)
2022-10-22 06:50:41,171 INFO gave up: storagenode entered FATAL state, too many start retries too quickly
2022-10-22 06:50:42,175 WARN received SIGQUIT indicating exit request
2022-10-22 06:50:42,177 INFO waiting for processes-exit-eventlistener, storagenode-updater to die
2022-10-22T06:50:42.177Z INFO Got a signal from the OS: “terminated” {“Process”: “storagenode-updater”}
2022-10-22 06:50:42,184 INFO stopped: storagenode-updater (exit status 0)
2022-10-22 06:50:43,188 INFO stopped: processes-exit-eventlistener (terminated by SIGTERM)

Should i run it without this line:

--user $(id -u):$(id -g) \

???

Thank you.

Yes, do not add this for a node already in operation

1 Like

The other way is to configure your system to run docker commands rootless and update permissions to your user and group for all node’s files, include identity.

if you use a raspberry Pi3, they are still needed, at least a memory limit option. Two other - are limits for log files, if you did not redirect logs to the file. It some kind of LogRotate integrated to the docker daemon.

i believe i already did.
Did i screw it up?

Should i divide equally for both nodes?

i mean, i have RPI with 2GB of RAM, i reserve some for OS, lets say 500Mb, rest 1,5Gb / 2 (two nodes) = 750Mb each?
–memory=750m \ ?

Or i make a mistake somewhere?

p.s. i only now, notice that you @Alexey mentioned RPi3. So this line is not needed for RPi4?

Yes, the memory limit makes sense only when you have less or equal to 1GB of RAM (OS would take at least 150MB in the GUI-less mode), so if you have more than 1GB of RAM, you may not limit the RAM usage by the container.

1 Like