CARDANO_NODE_SOCKET_PATH not found error when trying to generate operational certificate

I built my node server and relay server and created my pool-keys. Now I am trying to generate an operational certificate based on this link.

I am trying to find out the slotNo, so I run “cardano-cli shelley query tip --mainnet”, but I get an error that it can’t find my socket node path:

bosr@node:~$ cardano-cli shelley query tip --mainnet
WARNING: The “shelley” subcommand is now deprecated and will be removed in the future. Please use the top-level commands instead.
Shelley command failed: query tip Error: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: “CARDANO_NODE_SOCKET_PATH”

I am stuck there. Also, what “top-level command” does it want me to use instead of “shelley”?

Thanks in advance,

Roger

You need to do something like

export CARDANO_NODE_SOCKET_PATH=/home/cardano/node/db/node.socket

The “file” node.socket is not really a file but a way for cardano-cli to find and talk to a running cardano node.

The warning means that newer versions of cardano-cli need to be called like

cardano-cli query tip --mainnet

instead of

cardano-cli shelley query tip --mainnet

Check here:

https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node

You could run your node like this … (i.e. no build required)

docker run --detach \
    --name=relay \
    -p 3001:3001 \
    -e CARDANO_UPDATE_TOPOLOGY=true \
    -v /mnt/disks/data00:/opt/cardano/data \
    nessusio/cardano run

docker logs -f relay

It has built-in …

  • gLiveView monitoring
  • topology updates
  • cardano-cli access

Details about this are here