Cardano-node socket


Can someone please help, I’m a novice and this is driving me mad.

I connected to the haskell testnet and set up a relay node. When i create a wallet, i can’t see the transactions as it can’t find the socket.

i put in;

export CARDANO_NODE_SOCKET_PATH=~/Downloads/cardano-node/relay/db/socket

when i put in command for the wallet transactions, i receive;
cardano-cli: Network.Socket.connect: <socket: 11>: does not exist (Connection refused)

Can someone please help?

It seems you’re pointing to a folder instead of a file.

Create a dummy file and call it node.socket and point to that.



it’s definitely not a folder

ls -a, is there.

I have a similar situation. :thinking: @Psychomb

This should point to the socket file you specified when running the node. I do not see anything particularly wrong there.

May be modify your /etc/environment file with the CARDANO_NODE_SOCKET_PATH and use the absolute path instead of the relative ~ ?

logout and login again.

1 Like

I have run into the same error, and i have redone everything from different guide, this time from but i ran into the verry same error. I have tryed to make the file node.socket manually and then to export but with no succes. What else i can try?

Can you show your cardano-run to verify?

i also tried to add the export command in .bashrc with no succes resolving that error, any other ideas?

Make sure that:

  • socket path is set correctly (pointing to the socket file)
  • all parameters supplied to the node (for starting node) are correct. Check the paths & ports

A typo can be easily introduced and can be hard to spot.

it could be that, but the thing is that the export CARDANO_NODE_SOCKET_PATH=path/to/db/node.socket does not work regardless of the path, i cannot find any file named node.socket, after i use the export command, not even if i put that command in .bashrc or if i make manually a file named node.socket and them export, the file remain emty

That’s why I said check out the parameters supplied to the node. If something’s wrong there the file won’t be created. There’s no magic. If you follow the procedure to the point it should work. I also had this issue and in my case it was what I am saying.

thank you so much! just to be sure - you mean the config files? genesis, topology and config files, right?

Yes, I mean those. If you use variables for the path names, print those out as a way to debug, so you can really see if the variables contain the correct values.

Thank you for your time and answer. really helpful!

1 Like

I have the same issue, again…

Yesterday, I managed to solve it by putting CARDANO_NODE_SOCKET_PATH /etc/environment and it worked.

Today, I’m having it again… the variable is still in the /etc/environment, echoing return its path. Yet, prompt displays :

Do you guys have any idea about it ? The node is running fine but I can’t do any command that requires the --testnet-magic parameter

Hello all!!
I just got my node up and running, and synced to the network displaying the latest block numbers.
But when I query utxo I get this same message.
I followed the instructions by @Tuan_Lam :

…but I get the same error:

milo@inst-1:~$ cardano-cli shelley query tip --mainnet
Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: “CARDANO_NODE_SOCKET_PATH”

milo@inst-1:~$ export CARDANO_NODE_SOCKET_PATH=rl/db/node.socket

milo@inst-1:~$ cardano-cli shelley query tip --mainnet

“blockNo”: 4578530,
“headerHash”: “5a97bc753a40e8194f0e6d7472bdd983662e02aeb42def99a3aa5c5aea8fd9dc”,
“slotNo”: 6262994

milo@inst-1:~$ cd keyz/

milo@inst-1:~/keyz$ cardano-cli shelley query utxo --address $(cat payment.addr) --mainnet

cardano-cli: Network.Socket.connect: <socket: 11>: does not exist (No such file or directory)

milo@inst-1:~/keyz$ export CARDANO_NODE_SOCKET_PATH=rl/db/node.socket

milo@inst-1:~/keyz$ cardano-cli shelley query utxo --address $(cat payment.addr) --mainnet

cardano-cli: Network.Socket.connect: <socket: 11>: does not exist (No such file or directory)

Please help!
Thank you

This is a relative path. In your case if you want to access to it from the folder keyz, then please try this:


Or keep what you have now, and use the next command from the root (thus not from the folder keyz):

1 Like

It worked like a charm!! :smiley:

Thank you so much @Tuan_Lam!!!

1 Like