Cncli 4.0.4 db sync error

Hi All,

Hoping someone can help me…

I’ve been running on the Testnet for a while and now I’m currently trying to install CNCLI on my BP in order to make use of the helper scripts.

I have followed the ARMada Pi Operators build guide CNCLI instructions from there, but after executing the sync service it fails to create the DB in the designated folder.

Looks like I#m getting the following error:
cncli-sync[841623]: 2022-01-19T15:09:31.079Z ERROR cncli::nodeclient::sync > version data mismatch: NodeToNodeVersionData {networkMagic = NetworkMagic {unNetworkMagic = 1097911063}, diffusionMode = InitiatorAndResponderDiffusionMode} /= NodeToNodeVersionData {networkMagic = NetworkMagic {unNetworkMagic = 764824073}, diffusionMode = InitiatorAndResponderDiffusionMode}

I presume it’s looking to sync the mainnet, but I’m on testnet? Is there anywhere I can change a variable setting or is it something else I did wrong during the install?


did u tried nano ?

I’m not sure where the would be located…?
I followed these instructions and got stuck after deploying it as a service:

The last variables I changed where in the service file:

Description=CNCLI Sync

ExecStart=/home/ada/.local/bin/cncli sync --host --port <cardano_node_port> --db $HOME/pi-pool/cncli/cncli.db


Try here $HOME/.local/bin/cncli

Okay I’ve checked there and only have the cncli binary located there

I get the error when starting the daemon service trying to create the cncli.db in $HOME/pi-pool/cncli/cncli.db

are you using the files for testnet right? Check shelley genesis file (at the end) for network magic

I have discovered that cncli can be started with the --network-magic parameter and noticed this was not specified in the service file creation in the guide
cncli Service File

I have added --testnet-magic 1097911063 and it now has started to sync, but I can’t see the DB file in pi-pool/cncli folder yet…

1 Like

Additional update: for some reason the service was running as root and thus not creating the DB in the correct folder. I updated the cncli-sync.service file from the ARMada guide to run as my user i.e adding the line “User=” in the [Service] section of the file.