How to update cncli to the latest version on Github for Cntools users?

Cnode already updated to 1.26.1
Current version installed via CNTOOLS is 1.5.1

Hi! just did it yesterday manually by following this guide (click on show original to get the proper commands):

but sure @Alexd1985 will help you out!

Run prereq with -c flag

cd ~/tmp

ls -l
./prereqs.sh -c

Cheers,

3 Likes

That worked, THX!

2 Likes

This did not work for me.

Environment Variable already set up!
Installing CNCLI
previous CNCLI installation found, pulling latest version from GitHub…
installed version: v1.4.0 | latest version: v2.0.2
updating RUST if needed…
building CNCLI v2.0.2 …
cncli 2.0.2 installed!
Downloading files…
sed: can’t read ./cncli.sh.tmp: No such file or directory
sed: can’t read ./env.tmp: No such file or directory
awk: cannot open env.tmp (No such file or directory)
awk: cannot open cncli.sh.tmp (No such file or directory)

when I try to start ./cncli.sh in the $CNODE_HOME/scripts folder nothing happens.

Hi, u will need to bkp the env file … then

cd $CNODE_HOME

ls -l and remove the all scripts folder (u didn’t updated for the last version)

sudo rm -R scripts

then downlod the scripts again

cd ~/tmp
./prereqs.sh

After that, edit again env start again the node and try to run cncli again

1 Like

How are you guys using the CNCLI tool? Is it deployed on a relay or on the block producer?
I’m curios as using it on the block producer together with the PoolTool features wouldn’t expose the IP of the BP?

I’m trying to run cncli sync I keep getting a message that script update(s) detected but my current version is 5.1.0

if I use ./cncli.sh -u sync I get :
Failed to query protocol-parameters from node, not yet fully started?
sleeping for 10s and testing again…
Failed to query protocol-parameters from node, not yet fully started?

The only thing that I changed is that I’m using p2p.
does p2p cause cncli to not work? If so are there any work arounds?

How did you compile your version of cardano-node that you are running in P2P mode?

Check that your cardano-cli command works properly whilst in P2P mode:

CARDANO_NODE_SOCKET_PATH='/run/cardano/mainnet-node.socket' cardano-cli query tip --mainnet

If you get an error like:

MuxError (MuxIOException writev: resource vanished (Broken pipe)) “(sendAll errored)”
cardano-cli: MuxIOException writev: resource vanished (Broken pipe) “(sendAll errored)”

Then this is a known bug with version 1.34.1 when running in P2P mode.

cardano-cli works in P2P mode if you compile cardano-node with the following change to cabal.project:

sed -i 's/tag: 4fac197b6f0d2ff60dc3486c593b68dc00969fbf/tag: 48ff9f3a9876713e87dc302e567f5747f21ad720/g' cabal.project

This compiles a different git tag version of ouroboros-network which has fixed the bug.

Thanks goes to @weebl2000 for how to do this.

1 Like

I just modified the config.json with this:

cd ${HOME}/Cardano-node-docker/node/files
sed -i ‘s+“TurnOnLogging”: true,+“TurnOnLogging”: true,\n “TestEnableDevelopmentNetworkProtocols”: true,\n “EnableP2P”: true,\n “MaxConcurrencyBulkSync”: 2,\n “MaxConcurrencyDeadline”: 4,\n “TargetNumberOfRootPeers”: 50,\n “TargetNumberOfKnownPeers”: 50,\n “TargetNumberOfEstablishedPeers”: 25,\n “TargetNumberOfActivePeers”: 10,+’ *-config.json

Then changed my BP to this format:

{
“LocalRoots”: {
“groups”: [
{
“localRoots”: {
“accessPoints”: [
{
“address”: “[IP Relay 1]”,
“port”: [Port Relay 1]
},
{
“address”: “[IP Relay 2]”,
“port”: [Port Relay 2]
}
],
“advertise”: false
},
“valency”: 2
}
]
},
“PublicRoots”:
}

And this for my relays:
{
“LocalRoots”: {
“groups”: [
{
“localRoots”: {
“accessPoints”: [
{
“address”: “[IP block Production node]”,
“port”: [Port block production node]
}
],
“advertise”: false
},
“valency”: 1
}
]
},
“PublicRoots”: [
{
“publicRoots” : {
“accessPoints”: [
{
“address”: “relays-new.cardano-mainnet.iohk.io”,
“port”: 3001
}
],
“advertise”: true
},
“valency”: 1
}
],
“useLedgerAfterSlot”: 0
}

I built the BP and one one relay using Alexd1985’s guide

Everything seems to be working one (relay is still syncing)

I just can’t get cncli working to check my leaderlogs.

I got the error but everything seems to be working according to glive?
I don’t know what this error means.

3@r3:/opt/cardano/cnode/sockets$ CARDANO_NODE_SOCKET_PATH=‘/opt/cardano/cnode/sockets/node0.socket’ cardano-cli query tip --mainnet
MuxError (MuxIOException writev: resource vanished (Broken pipe)) “(sendAll errored)”

cardano-cli: MuxIOException writev: resource vanished (Broken pipe) "(sendAll errored)"r3@r3:/opt/cardano/cnode/sockets$

Exactly the problem I had when I initially compiled cardano-node 1.34.1 and ran it in P2P mode several months ago.

cncli relies on cardano-cli to pull information about the nonce value as well as your stake pool total stake etc. But cardano-cli version 1.34.1 doesn’t work properly with the node in P2P mode if it was compiled with the default ouroboros-network code specified in cabal.project.

The sed command in my previous post tells the build process to pull a tagged version of ouroboros-network code which has the bug fixed.

You need to recompile cardano-node 1.34.1 with that change to cabal.project if you want to run in P2P mode and have cardano-cli work properly. Otherwise, reconfigure your node to run in normal mode (not P2P) and then cncli-leaderlog will be able to pull the data using cardano-cli.

I can confirm that cardano-cli works properly with the node in P2P mode if you recompile with that change. I have been running several 1.34.1 nodes in P2P mode for months.

The problem is due to a bug in cardano-node that rears its head when the node is running in P2P mode. It is not a bug in cncli.

1 Like