Docker initialization problem ( Error: storagenode configuration already exists (/app/config) )

I’m new here and I would like to say hello everyone! :slight_smile:

I am running fedora 32 and docker 19.03.

My setup command:

docker run -d --restart unless-stopped --stop-timeout 300
-p 28967:28967
-p 127.0.0.1:14002:14002
-e WALLET=“0xCENSOR”
-e EMAIL="CENSOR@CENSOR.com"
-e ADDRESS=“CENSOR:28967”
-e STORAGE=“20TB”
–mount type=bind,source="/mnt/storj/storagenode-backup/",destination=/app/identity
–mount type=bind,source="/mnt/storj/storage/",destination=/app/config
–name sn storjlabs/storagenode:beta

Gives an error:

Error: storagenode configuration already exists (/app/config)
Error: storagenode configuration already exists (/app/config)
2020-05-31T13:31:39.849Z INFO tracing disabled
2020-05-31T13:31:40.705Z INFO tracing disabled
Error: storagenode configuration already exists (/app/config)
2020-05-31T13:31:41.733Z INFO tracing disabled

I tried finding app/config but no avail (it’s within docker instance?)
What can I do to troubleshoot / solve and run my node. Now it just restarts endlessly.
Thank you for any tips that can help me solve this problem.

Koekje

Welcome to the forum @koekje!

Can you show content of /mnt/storj/storage & /mnt/storj/storagenode-backup?

Also remove the / from the end of the paths so they look like /mnt/storj/storagenode-backup & /mnt/storj/storage from your docker run command.

ls /mnt/storj/storage

Is empty :cricket:

ls storagenode-backup

ca.1590785842.cert ca.cert ca.key identity.1590785842.cert identity.cert identity.key

When remove the ’ \ ’ at the end of the it still gives the same error

Error: storagenode configuration already exists (/app/config)
2020-05-31T14:00:54.818Z INFO tracing disabled

Please, show the result of the command:

docker ps -a
ls -l /mnt/storj

docker ps -a

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e12110821030 storjlabs/storagenode:beta “/entrypoint” 52 minutes ago Restarting (1) 55 seconds ago sn

ls -l /mnt/storj

drwxr–r--. 2 koekje root 4096 31 mei 13:45 home
drwx------. 2 koekje root 16384 29 mei 21:50 lost+found
drwxr-xr-x. 2 root root 4096 31 mei 15:26 storage
drwxr–r--. 2 root root 4096 31 mei 15:04 storagenode-backup

Is this helpful?

Yes.
Please, give me the logs of the container

docker logs --tail 20 storagenode

[root@192 storj]# docker logs --tail 20 sn

2020-05-31T15:14:33.987Z INFO tracing disabled
Error: storagenode configuration already exists (/app/config)
Error: storagenode configuration already exists (/app/config)
2020-05-31T15:15:34.705Z INFO tracing disabled
Error: storagenode configuration already exists (/app/config)
2020-05-31T15:16:35.430Z INFO tracing disabled
2020-05-31T15:17:36.135Z INFO tracing disabled
Error: storagenode configuration already exists (/app/config)
Error: storagenode configuration already exists (/app/config)
2020-05-31T15:18:36.817Z INFO tracing disabled
2020-05-31T15:19:37.500Z INFO tracing disabled
Error: storagenode configuration already exists (/app/config)
Error: storagenode configuration already exists (/app/config)
2020-05-31T15:20:38.211Z INFO tracing disabled
Error: storagenode configuration already exists (/app/config)
2020-05-31T15:21:38.894Z INFO tracing disabled
2020-05-31T15:22:39.568Z INFO tracing disabled
Error: storagenode configuration already exists (/app/config)
2020-05-31T15:23:40.317Z INFO tracing disabled
Error: storagenode configuration already exists (/app/config)

Try to rename the config.yaml to config.yaml.bak file and restart your node. Restarting will create a new config.yaml file. Then check status through docker ps -a

Where can I find my config.yaml file? Thank you.

I did not find the file within my storj folder.

Do you run a docker with sudo?
Because the folder /mnt/storj/storage have rights only for root.
Please, remove the container

docker stop -t 300 storagenode
docker rm storagenode

Then try again your full docker run command but with sudo.

2 Likes

Even with Sudo the same error repeat:

Error: storagenode configuration already exists (/app/config)

Ok, let’s check this folder with sudo

sudo ls -l /mnt/storj/storage

Also, please, make sure that you do not have any curly quotes like instead of straight ones " in your docker run command and no one hyphen like instead of double dashes --
If you put every part of the docker run command on own line you must add line break with \ symbol.
For example:

docker run -d --restart unless-stopped --stop-timeout 300 \
-p 28967:28967 \
-p 127.0.0.1:14002:14002 \
-e WALLET="0xCENSOR" \
-e EMAIL="CENSOR@CENSOR.com" \
-e ADDRESS="CENSOR:28967" \
-e STORAGE="20TB" \
--mount type=bind,source="/mnt/storj/storagenode-backup/",destination=/app/identity \
--mount type=bind,source="/mnt/storj/storage/",destination=/app/config \
--name sn storjlabs/storagenode:beta

Dear Alexey,

Thank you for trying but still no succes.

’sudo ls -l /mnt/storj/storage’

Does not return any files. Total 0 files.

Because I run fedora 32 I had to change in the kernel:

systemd.unified_cgroup_hierarchy=0

And install

dnf install moby-engine

Can this have anything to do with it?

See guide: https://www.linuxuprising.com/2019/11/how-to-install-and-use-docker-on-fedora.html

Please, check your docker run command, because the posted seems have a curly quotes and hyphens, I can expect any unusual behavior, because those symbols are not allowed in the shell.

This was the solution. With moby client instead of docker-ce/cli I got this error.

Solution: install on fedora 31 with standard docker because it does not have cgroupv2 or downgrade within fedora 32 and add tag. See guide.

Thank you everyone in thread.