I would like to check the sync progress of the cardano node from within a cardano-node-ogmios docker container that I installed. When I open the docker CLI and I run the command cardano-cli query tip --mainnet
I get that $CARDANO_NODE_SOCKET_PATH environment variable is not defined. I've tried locating /db/node.socket path, but I cannot seem to find it. Any clue as to where it may be located?
3 Answers
After checking the Ogmios documentation again I finally found it in /ipc/node.socket. (Post can be deleted or remain in case for future reference)
-
Including the snippet of the documentation would improve your answer and remember you can mark your own answer as accepted.– gRebelCommented May 6, 2022 at 0:29
A note for other people, when starting your node the --socket-path
option will contain the path to the socket.
CARDANO_NODE_SOCKET_PATH should match this value.
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
Just create db folder inside your cardano-node, and pointing your script to that folder, the node.socket will be created once after you node is sync 100%
docker exec -ti test-producer /usr/local/bin/cardano-cli query tip --testnet-magic 1097911063