Starting cardano-node gives an error - node.socket removeLink permission denied


when I start the cardano-node run gives me this error, someone who knows how to fix it?


list your socket file with this command:
ls -l /home/cardano/cnode/sockets/node.socket


how did you start the node? show the command, please…

cardano-node run --topology /home/cardano/cnode/config/mainnet-topology.json --database-path /home/cardano/cnode/db --socket-path /home/cardano/cnode/sockets/node.socket --host-addr --port 3001 --config /home/cardano/cnode/config/mainnet-config.json

and what lsof /home/cardano/cnode/sockets/node.socket gives back?

It says that there is no file but I really do have it, I can show you screenshots of the file on there

What about lsof | grep node.socket ?

1 Like

ok - lets just remove that file by rm -rf /home/cardano/cnode/sockets/node.socket
and start the node again - the execution will generate a new one…

Now at least there is no socket problem, but appears address already in use and openFd: permission denied

hmm - this deserve a new topic:) with title cardano-node lock: openFd: permission denied

omg I’m gonna kill myself

at least you contribute to this project with your topics really - it is useful for others as well!

That’s why you should have checked first with lsof to see if the socket was already in use. Now you can kill the previous instance of the node using pkill.

rm -rf /home/cardano/cnode/db/*

With this command seems that I resolved the error

And caused another one in the process… Which could have been avoided by making sure there wasn’t any program already using it. So you can kill the node, remove the lock file and you should be ok. Always be careful when removing files especially when using -rf (means recursive and force), when you have a doubt it’s better to move or rename.

1 Like

the real problem is that node.socket owner is different from the current user: related: