Node is not syncing - CNTools

Hello community,

I’m working on getting my first node up and running. I’m following the instructions by CNTools
https://cardano-community.github.io/guild-operators/#/Build/node-cli

But I’m having trouble getting the node to sync with the network. At first there was an issue with the git commit, so I had to do that part again.

I have port 6002 open for tcp, the commit is correct, topology and cnode files look good.
Any idea what might be failing?

not syncing :frowning:

Thanks in advance,
Martin.

Hi,

there could be many reasons…

but from your screenshot I see that you are not connected to any peer - therefore it is not syncing.

What do you have in your topology file?
Also, i see that you are using root user by default - it’s a really bad idea, i wold suggest to create a new user and do the installation from that one.

for example to create a user “cardano”:

sudo adduser cardano
sudo usermod -aG sudo cardano

then you can swith to that one using

sudo su - cardano

and then perform the installation process and whenever you need root privileges, just add the “sudo” in front of the command.

I’m running into a similar issue. I have deleted & re-pulled the topology file. This is the current content of my topology.json file:

{
“Producers”: [
{
“addr”: “relays-new.cardano-testnet.iohkdev.io”,
“port”: 3001,
“valency”: 2
}
]
}

I was following the eden pool guide on youtube which began with some ufw steps to open ssh & the node ports, but did not touch 3001. However, after opening 3001, I still have zero peers and the sync has stalled at block 20335. I originally had one or two peers when the syncing began but now it lists zero. It’s been like that for 10 minutes or so.

If you are syncing for Mainnet, then you are pointing to wrong IOHK relay:
here is the relay for Mainnet:

{
“Producers”: [
{
“addr”: “relays-new.cardano-mainnet.iohk.io”,
“port”: 3001,
“valency”: 2
}
]
}

1 Like

I updated to that relay and it still had zero peers. I was looking at some of the json files the instructions were listing and three of the four had “testnet” in the names:

testnet-byron-genesis.json
testnet-shelley-genesis.json
testnet-topology.json
ptn0-combinator.json

This is likely where I got the incorrect topology file, but what about the testnet-byron-genesis.json file and tesnet-shelley-genesis.json files?

Here are the instructions I’ve been following:
https://cardano-community.github.io/guild-operators/#/basics

On a hunch, I swapped “mainnet” with “testnet” in all of the curl’ed json files. I verified that the topology.json file still pointed to the relay you mentioned above.

Anyway, same behavior: 2 peers until block 21k-ish then the peers drop to zero and the syncing stops. This behavior seems as though I’m running into the same problem. Is it possible anything else is pointing to the testnet over the mainnet?

did you delete the DB folder after swaping files?
stop the node, delete the DB files and try again with correct config files, just check the start script to be sure you are running with the correct files

Yes, I saw your response on another post to do so. Here are my steps between attempts at syncing:

rm $CNODE_HOME/sockets/node0.socket
ps aux | grep cardano-node
! # if there is no other process and you still get that error - then try to move the old db folder and create a new one as you will need to re-sync the db
cd $CNODE_HOME/
mv db db-old && mkdir db
! # make sure topology.json points to relays-new.cardano-mainnet.iohk.io
cd $CNODE_HOME/scripts
tmux
./cnode.sh

I think I may have found the issue with the curl’ed json files. I was watching EDEN pool’s tutorial video and you can see the following json files being pulled. https://youtu.be/VXosFfUIWi0?t=636

mainnet-byron-genesis.json
mainnet-shelley-genesis.json
mainnet-topology.json
ptn0-mainnet.json

However, if you go to the current instructions, the first three point to testnet instead of mainnet, and the last file is titled “ptn0-combinator.json” instead of “ptn0-mainnet.json”. This would have given me the wrong config.json file.

I’ll delete the old db file & curl the ptn0-mainnet.json file and try again.

That resolved the issue. The instructions on the guild operator’s github currently point the user to testnet resources.

these are the resources that I had to curl for it to work:

mainnet-byron-genesis.json
mainnet-shelley-genesis.json
mainnet-topology.json
ptn0-mainnet.json

For instance: curl -sL -o $CNODE_HOME/files/byron-genesis.json https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/testnet-byron-genesis.json

Becomes: curl -sL -o $CNODE_HOME/files/byron-genesis.json https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/mainnet-byron-genesis.json

Do this for all four json files and it should sync past the first epoch.

…making sure to remove the old db before attempting to sync again.

1 Like

Thanks I think this will resolve my issue as well. When you say “remove the old db before attempting to sync again” are you saying I should delete the files inside the folder?

rm $CNODE_HOME/sockets/node0.socket
cd $CNODE_HOME/
mv db db-old && mkdir db

These commands came from Lauris on another thread.

This removes the improperly sync’ed db and starts a fresh one.