Cardano-socket error

I would appreciate someone’s help. I’ve set up my Cardano-node on raspberry pi 4b 4GB following instructions from . However, I cannot get anything done in Cardano-cli, as every time it needs CARDANO_NODE_SOCKET_PATH it shows: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: “CARDANO_NODE_SOCKET_PATH”.

CARDANO_NODE_SOCKET_PATH is set in ~/.bashrc ( export CARDANO_NODE_SOCKET_PATH="/opt/cardano-node/pi-node/db/node.socket") and accessible is using echo $…

Does anyone know what to do with it?

Did you start your node and fully synced up the blockchain (either mainnet or testnet)?

You will need a fully running (relay) node, synced to either testnet or mainnet. When you run the node you also pass the --socket-path param, that usually is set as --socket-path=/db/node.socket.

Once your node is fully synced up, that socket will start working and querying like

CARDANO_NODE_SOCKET_PATH=/db/node.socket cardano-cli shelley query tip --mainnet

Just noticed you’re using rpi 4 4gb. 4gb is very little, you will need to activate swap or you rpi won’t just be enough. I use 8gb and my pi from time to time struggles.

should then work. good luck

1 Like

Thanks, that really helped. Good to know that I can also refer to the socket path in the command. It is a shame that I cannot use the environment variable, though.

I know 4GB is really small. I have already set my swapfile to 4GB, which is mostly enough, but I may as well consider increasing it later.

Anyways, thanks for your help and have a great day.

Sorry, I never meant that you cannot use the env var. Of course you can use the env var. Good luck again.

I didn’t mean it that way :smile:. I was just saying that it’s great I can use “CARDANO_NODE_SOCKET_PATH=/db/node.socket Cardano-cli shelley query tip --mainnet” when the “cardano-cli shelley query tip --mainnet” doesn’t take the env. var and throws the mentioned error. Because that saved me a lot of trouble.

1 Like