There can be 2 reasons:
- Your cardano-node service is not running, and this is why the socket file does not exist
- The “CARDANO_NODE_SOCKET_PATH” environment variable is not pointing to socket file.
Try to see if the socket file exists:ls -l /opt/cardano/cnode/sockets/node0.socket
if it exists, put:
export CARDANO_NODE_SOCKET_PATH=/opt/cardano/cnode/sockets/node0.socket
in your ~/.bashrc file.
If it does not exist, try to watch the logs withjournalctl -f -u cnode.service
to see if you understand from the log messages what the problem is.