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

Hello, I am setting up my first stake pool on the testnet by following Stake Pool Course.

I am running the node and now want to check if the node is syncing. However, when I run
~/relay$ cardano-cli query tip --testnet-magic 1097911063

I get the following error:

Shelley command failed: query tip Error: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: "CARDANO_NODE_SOCKET_PATH"

What is causing this error and how can I fix it? There is another forum post with this type of issue but I didn’t find anything that helped me there: CARDANO_NODE_SOCKET_PATH Error

Thanks!

The path for the socket

Hi, I’m having the same issue, I’m building a transaction to send ada to another wallet, that works well but when I try to submit the transaction got the:

cardano-cli transaction submit --tx-file $NODE_HOME/send/send1.signed --mainnet

Shelley command failed: transaction submit Error: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: “CARDANO_NODE_SOCKET_PATH”

This is the current socket I had defined:
export CARDANO_NODE_SOCKET_PATH=/home/user/relay/db/node.socket

The node is up? Try to locate shere the socket is first

Type sudo systemctl status cardano-node and check which path is used for socket (use right arrow from keyboard to navigate ro the right)