I followed all the steps of adding trusted and static peers:

  1. Manually adding the peers to configuration file config.toml
  2. Using addTrustedPeers and addPeers of the geth console
  3. set the --nodiscover flag

The net.PeerCount returns 0 everytime I try to see if the node is connected to any of the added peers.

I also checked the security groups and firewall just to make sure nothing is being blocked.

Any idea how to fix that issue?

Note the command to start geth client is as follows: sudo geth --mainnet --syncmode full --datadir /data/ethereum --http --http.addr= --http.port=8545 --http.vhosts=* --http.api=admin,personal,eth,net,web3,txpool --authrpc.vhosts=* --authrpc.addr= --authrpc.port=8551 --authrpc.jwtsecret=/home/ubuntu/.setup/secret/jwtsecret --nodiscover --config /data/ethereum/config.toml

  • It the node behind a proxy, nat network or firewall?
    – Ismael
    Commented Dec 5, 2022 at 22:37
  • No, it is not @Ismael
    – Malak
    Commented Dec 6, 2022 at 6:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.