Precompiled executables giving error "Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: "CARDANO_NODE_SOCKET_PATH""

I’m using the precompiled cardano-node and cli and am receiving the error:

Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH  Error: "CARDANO_NODE_SOCKET_PATH"

I wasn’t sure what to set the environment variable to so I started following this thread that was seeing the same errors:

I went through the thread but still can’t figure it out. My cardano node is running on a separate tmux window but I’m not seeing anything when I type sudo lsof | grep "node.socket"

So when you start cardano-node you pass the socket path as a parameter --socket-path.

Take that same path and add it as an environment variable inside ~/.bashrc at the bottom of the file.

Example of ~/.bashrc

export CARDANO_NODE_SOCKET_PATH=/home/user/cardano/db/socket

after that login again or type source ~/.bashrc to reload the changes

p.s. in that topic provided the user set the wrong path so it didn’t work…

1 Like

Guess I’m confused what file needs to be passed here. Is there a default one that comes with the precompiled zip? I was just running cardano-node run and it started its thing.

Something like this:

cardano-node run \
   --topology path/to/mainnet-topology.json \
   --database-path path/to/db \
   --socket-path path/to/db/node.socket \
   --host-addr x.x.x.x \
   --port 3001 \
   --config path/to/mainnet-config.json

See here: How to run cardano-node | Cardano Developer Portal

Do these files come with the pre-compiled zip, or do I need to create them?

Some of them are downloaded as per installation instructions, some will be created by the process.


The easiest way is to follow the initial part of the Coincashew tutorial:

1 Like