Stake pool setup errors - cardano-cli version -bash: cardano-cli: command not found

Have one node running which will be the prod node am following the guild instructions

https://cardano-community.github.io/guild-operators/Build/node-cli/

echo $PATH

/home/matt/.cabal/bin:/home/matt/.ghcup/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Last command ran :slight_smile:

cd ~/git
git clone GitHub - input-output-hk/cardano-node: The core component that is used to participate in a Cardano decentralised blockchain.
cd cardano-node

git fetch --tags --all
git pull
# Replace tag against checkout if you do not want to build the latest released version
git checkout $(curl -s https://api.github.com/repos/input-output-hk/cardano-node/releases/latest | jq -r .tag_name)

# Use `-l` argument if you'd like to use system libsodium instead of IOG fork of libsodium while compiling
$CNODE_HOME/scripts/cabal-build-all.sh

Worked on first node then on second and third not able to use Cardano-cli ???

Same on second node

~/git/cardano-node$ ls
cardano-cli configuration docker-compose.yml flake.nix trace-forward
cardano-testnet doc flake.lock supported-systems.nix
:~/git/cardano-node$ cardano-cli version
-bash: cardano-cli: command not found

Am thinking of Snapshotting the VM to bypass this also the sync has been well over 24 hrs on the active node so I read somewhere its much quicker to copy the db folder which made me think perhaps just clone the VM ?

Node synced after almost 24hrs then will not start up when I check it in systemctl this is what I see.

cnode.service - Cardano Node
Loaded: loaded (/etc/systemd/system/cnode.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-01-28 10:13:38 UTC; 12min ago
Main PID: 13347 (bash)
Tasks: 10 (limit: 4915)
Memory: 5.7G
CGroup: /system.slice/cnode.service
├─13347 bash /opt/cardano/cnode/scripts/cnode.sh
└─13482 /home/matt/.cabal/bin/cardano-node run --topology /opt/cardano/cnode/files/topology.json --config /opt/cardano/cnode/files/config.json --database-path /opt/cardano/cnode/db --socket-path /opt/cardano/cnode/sockets/node0.socket --port 6333 --host-addr 0.0.0.0

Jan 28 10:13:38 vlvpeter01 systemd[1]: Started Cardano Node.
Jan 28 10:13:38 vlvpeter01 cnode[13347]: WARN: A prior running Cardano node was not cleanly shutdown, socket file still exists. Cleaning up.
Jan 28 10:13:43 vlvpeter01 cnode[13347]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just 0.0.0.0, ncNodeIPv6Addr = Nothing, ncNodePortNumber = Just 6333, ncConfigFile = “/opt/cardano/cnode/files/config.json”, ncTopologyFile = “/opt/cardano/cnode/files/topology.json”, ncDatabaseFile = “/opt/cardano/cnode/db”, ncProtocolFiles = ProtocolFilepaths {byronCertFile = Nothing, byronKeyFile = Nothing, shelleyKESFile = Nothing, shelleyVRFFile = Nothing, shelleyCertFile = Nothing, shelleyBulkCredsFile = Nothing}, ncValidateDB = False, ncShutdownIPC = Nothing, ncShutdownOnSlotSynced = NoMaxSlotNo, ncProtocolConfig = NodeProtocolConfigurationCardano (NodeByronProtocolConfiguration {npcByronGenesisFile = “/opt/cardano/cnode/files/byron-genesis.json”, npcByronGenesisFileHash = Nothing, npcByronReqNetworkMagic = RequiresNoMagic, npcByronPbftSignatureThresh = Nothing, npcByronApplicationName = ApplicationName {unApplicationName = “cardano-sl”}, npcByronApplicationVersion = 1, npcByronSupportedProtocolVersionMajor = 3, npcByronSupportedProtocolVersionMinor = 0, npcByronSupportedProtocolVersionAlt = 0}) (NodeShelleyProtocolConfiguration {npcShelleyGenesisFile = “/opt/cardano/cnode/files/shelley-genesis.json”, npcShelleyGenesisFileHash = Nothing}) (NodeAlonzoProtocolConfiguration {npcAlonzoGenesisFile = “/opt/cardano/cnode/files/alonzo-genesis.json”, npcAlonzo

./sLiveView.sh

±------------------------------------------+
| Simple Node Stats |
±------------------------------------------+
| Name: RTFM Lazy Guy - Relay |
±----------------------±------------------+
| Version / Revision | 1.33.0 / 814df2c1 |
±----------------------±------------------+
| Port | 6333 |
±----------------------±------------------+
| Peers (Out / In) | 0 / 0 |
±----------------------±------------------+
| Epoch / Slot | 0 / 0 |
±----------------------±------------------+
| Block | 0 |
±----------------------±------------------+
| Density | 0*10 % |
±----------------------±------------------+
| Uptime (D:H:M:S) | 00:00:20:21 |
±----------------------±------------------+
| Transactions | 0 |
±----------------------±------------------+
±------------------------------------------+

Press [CTRL+C] to stop…

Am concerned as there was Stats updating before it shutdown and now there are none has it lost sync to db ?

After restart it’ll take a bit (can be a minute or two) for the node to start. There are no errors in the log above.

You have no Outgoing and Incoming peers. Was the node still in “starting” when you copied the LiveView data? Outgoing peers are specified in the topology file. Incoming connections you get if you share your relay connections with other SPOs or what’s more popular by using “topologyUpdater”.

Hi thanks for your input not run the typology updater yet if that matters ?
I was waiting for the node sync to finish then checking its progress .
So early installation steps is all I have done.
Whats the best nexts steps ?

So LiveView still displays the status as “starting” or is it running now?

What does the syncProgress display after running the command: cardano-cli query tip --mainnet

There is a long discussion on the forum about whether the topology updater is needed, but until P2P functionality comes the majority seems to be using it.

that command wont run and gives an error

Isnt Liveview the one I pasted ?

Yes, but I don’t see the status column. I guess it says “starting”.

I guess the node is not running. Try checking the logs journalctl -u cnode.service also check the process list for running cardano-node ps auxf | grep -i cardano and service status systemctl status cnode.service

I think the above is the systemctl status which says active
Is it worth me doing a ps -ax grep node and then kill the process and restart the node manually

Am concerned about this initial instability.

How did you build your nodes from binary or CNtools ?

I thought the deploy script was meant to make it stable by launching it in systemctl ?

Yes, systemctl is the way to go.

I built it manually, but there shouldn’t be any issues when using CNTOOLS… it’s just more user friendly experience.

Q1: What error do you get when running cardano-cli query tip --mainnet ?
Q2: After starting LiveView, does it say starting or is the node running?
Q3: Please paste the last 20 lines from the logs: journalctl -u cnode.service -n 20

This new Error came up
COULD NOT CONNECT TO A RUNNING INSTANCE! PLEASE CHECK THE PROMETHEUS PORT AND TRY AGAIN!

  1. Command failed: query tip Error: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: “CARDANO_NODE_SOCKET_PATH”

Screenshot 2022-01-28 at 20.28.45

±------------------------------------------+
| Simple Node Stats |
±------------------------------------------+
| Name: RTFM Lazy Guy - Relay |
±----------------------±------------------+
| Version / Revision | 1.33.0 / 814df2c1 |
±----------------------±------------------+
| Port | 6333 |
±----------------------±------------------+
| Peers (Out / In) | 0 / 0 |
±----------------------±------------------+
| Epoch / Slot | 0 / 0 |
±----------------------±------------------+
| Block | 0 |
±----------------------±------------------+
| Density | 0*10 % |
±----------------------±------------------+
| Uptime (D:H:M:S) | 00:00:24:26 |
±----------------------±------------------+
| Transactions | 0 |
±----------------------±------------------+
±------------------------------------------+

Press [CTRL+C] to stop…
^C
matt@vlvpeter01:/opt/cardano/cnode/scripts$ journalctl -u cnode.service -n 20

-- Logs begin at Fri 2022-01-28 18:57:25 UTC, end at Fri 2022-01-28 20:21:28 UTC. --
Jan 28 18:57:27 vlvpeter01 systemd[1]: Started Cardano Node.
Jan 28 18:57:29 vlvpeter01 cnode[509]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just 0
Jan 28 19:31:26 vlvpeter01 cnode[509]: /opt/cardano/cnode/scripts/cnode.sh: line 140:   882 Killed   
Jan 28 19:31:26 vlvpeter01 systemd[1]: cnode.service: Main process exited, code=exited, status=137/n/
Jan 28 19:31:26 vlvpeter01 systemd[1]: cnode.service: Failed with result 'exit-code'.
Jan 28 19:31:31 vlvpeter01 systemd[1]: cnode.service: Service RestartSec=5s expired, scheduling resta
Jan 28 19:31:31 vlvpeter01 systemd[1]: cnode.service: Scheduled restart job, restart counter is at 1.
Jan 28 19:31:31 vlvpeter01 systemd[1]: Stopped Cardano Node.
Jan 28 19:31:31 vlvpeter01 systemd[1]: Started Cardano Node.
Jan 28 19:31:31 vlvpeter01 cnode[19457]: WARN: A prior running Cardano node was not cleanly shutdown,
Jan 28 19:31:36 vlvpeter01 cnode[19457]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just
Jan 28 20:04:34 vlvpeter01 cnode[19457]: /opt/cardano/cnode/scripts/cnode.sh: line 140: 19592 Killed 
Jan 28 20:04:34 vlvpeter01 systemd[1]: cnode.service: Main process exited, code=exited, status=137/n/
Jan 28 20:04:34 vlvpeter01 systemd[1]: cnode.service: Failed with result 'exit-code'.
Jan 28 20:04:39 vlvpeter01 systemd[1]: cnode.service: Service RestartSec=5s expired, scheduling resta
Jan 28 20:04:39 vlvpeter01 systemd[1]: cnode.service: Scheduled restart job, restart counter is at 2.
Jan 28 20:04:39 vlvpeter01 systemd[1]: Stopped Cardano Node.
Jan 28 20:04:39 vlvpeter01 systemd[1]: Started Cardano Node.
Jan 28 20:04:39 vlvpeter01 cnode[19663]: WARN: A prior running Cardano node was not cleanly shutdown,
Jan 28 20:04:41 vlvpeter01 cnode[19663]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just
lines 1-21/21 (END)...skipping...
-- Logs begin at Fri 2022-01-28 18:57:25 UTC, end at Fri 2022-01-28 20:21:28 UTC. --
Jan 28 18:57:27 vlvpeter01 systemd[1]: Started Cardano Node.
Jan 28 18:57:29 vlvpeter01 cnode[509]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just 0.0.0.0, ncNodeIPv6Addr = Nothing, ncNodePortNumber = Just 6333, ncConfigFile = "/opt/cardano/cnode/files/config.json"
Jan 28 19:31:26 vlvpeter01 cnode[509]: /opt/cardano/cnode/scripts/cnode.sh: line 140:   882 Killed                  "${CNODEBIN}" "${CPU_RUNTIME[@]}" run --topology "${TOPOLOGY}" --config "${CONF
-- Logs begin at Fri 2022-01-28 18:57:25 UTC, end at Fri 2022-01-28 20:21:28 UTC. --
Jan 28 18:57:27 vlvpeter01 systemd[1]: Started Cardano Node.
Jan 28 18:57:29 vlvpeter01 cnode[509]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just 0.0.0.0, ncNodeIPv6Addr = Nothing, ncNodePortNumber = Just 6333, ncConfigFile = "/opt/cardano/c
Jan 28 19:31:26 vlvpeter01 cnode[509]: /opt/cardano/cnode/scripts/cnode.sh: line 140:   882 Killed                  "${CNODEBIN}" "${CPU_RUNTIME[@]}" run --topology "${TOPOLOGY}" --config "${CONF
Jan 28 19:31:26 vlvpeter01 systemd[1]: cnode.service: Main process exited, code=exited, status=137/n/a
Jan 28 19:31:26 vlvpeter01 systemd[1]: cnode.service: Failed with result 'exit-code'.
Jan 28 19:31:31 vlvpeter01 systemd[1]: cnode.service: Service RestartSec=5s expired, scheduling restart.
Jan 28 19:31:31 vlvpeter01 systemd[1]: cnode.service: Scheduled restart job, restart counter is at 1.
Jan 28 19:31:31 vlvpeter01 systemd[1]: Stopped Cardano Node.
Jan 28 19:31:31 vlvpeter01 systemd[1]: Started Cardano Node.
Jan 28 19:31:31 vlvpeter01 cnode[19457]: WARN: A prior running Cardano node was not cleanly shutdown, socket file still exists. Cleaning up.
Jan 28 19:31:36 vlvpeter01 cnode[19457]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just 0.0.0.0, ncNodeIPv6Addr = Nothing, ncNodePortNumber = Just 6333, ncConfigFile = "/opt/cardano
Jan 28 20:04:34 vlvpeter01 cnode[19457]: /opt/cardano/cnode/scripts/cnode.sh: line 140: 19592 Killed                  "${CNODEBIN}" "${CPU_RUNTIME[@]}" run --topology "${TOPOLOGY}" --config "${CO
Jan 28 20:04:34 vlvpeter01 systemd[1]: cnode.service: Main process exited, code=exited, status=137/n/a
Jan 28 20:04:34 vlvpeter01 systemd[1]: cnode.service: Failed with result 'exit-code'.
Jan 28 20:04:39 vlvpeter01 systemd[1]: cnode.service: Service RestartSec=5s expired, scheduling restart.
Jan 28 20:04:39 vlvpeter01 systemd[1]: cnode.service: Scheduled restart job, restart counter is at 2.
Jan 28 20:04:39 vlvpeter01 systemd[1]: Stopped Cardano Node.
Jan 28 20:04:39 vlvpeter01 systemd[1]: Started Cardano Node.
Jan 28 20:04:39 vlvpeter01 cnode[19663]: WARN: A prior running Cardano node was not cleanly shutdown, socket file still exists. Cleaning up.
Jan 28 20:04:41 vlvpeter01 cnode[19663]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just 0.0.0.0, ncNodeIPv6Addr = Nothing, ncNodePortNumber = Just 6333, ncConfigFile = "/opt/cardano

~
~
~
~
~
~
~
~
~
~
~
~
lines 1-21/21 (END)

Not sure why Cntools would need Prometheus, you need to look up the docs.

Btw if you want to build everything manually, see detailed instructions here.

[2] I see now that is some slimmed-down LiveView. In case you will install everything manually from the link above, look up the section for installing gLiveView. Otherwise check Cntools docs about how to install it.

[1] From what I see Cntools installed node has the socket at ${CNODE_HOME}/sockets/node0.socket

Add that environment variable to bashrc by running:

echo export CARDANO_NODE_SOCKET_PATH="${CNODE_HOME}/sockets/node0.socket" >> $HOME/.bashrc
source $HOME/.bashrc

See how it goes after you add the env variable from point (2). Try running the node again and executing cardano-cli query tip --mainnet

Ok thanks for the manual link what is the Cardano node run manual command again please ?

Try with systemctl: sudo systemctl start cnode.service

You can run it manually (without systemctl) as well but you would need to provide the required parameters.

Sorry that I am not able to do some deeper research for you, no time here, just trying to give you hints so you can do further research.

1 Like

Ideal thanks

np, keep us updated

Hi getting back to Stake pools today so lets start with the status report
with sudo systemctl status cnode.service that looks to be running ok would you agree ?

● cnode.service - Cardano Node
Loaded: loaded (/etc/systemd/system/cnode.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-02-02 11:32:41 UTC; 21min ago
Main PID: 475 (bash)
Tasks: 10 (limit: 4915)
Memory: 7.3G
CGroup: /system.slice/cnode.service
├─475 bash /opt/cardano/cnode/scripts/cnode.sh
└─875 /home/matt/.cabal/bin/cardano-node run --topology /opt/cardano/cnode/files/topology.json --conf