Refused NodeToNodeV_6

Got all three nodes running on mainnet and noticed the following frequent errors in the relay nodes (not in the bp node)

[RelayNod:cardano.node.ErrorPolicy:Error:91] [2021-06-08 03:12:47.91 UTC] IP 174.112.109.149:38061 ErrorPolicyUnhandledApplicationException (Refused NodeToNodeV_6 “version data mismatch: NodeToNodeVersionData {networkMagic = NetworkMagic {unNetworkMagic = 764824073}, diffusionMode = InitiatorAndResponderDiffusionMode} /= NodeToNodeVersionData {networkMagic = NetworkMagic {unNetworkMagic = 1097911063}, diffusionMode = InitiatorAndResponderDiffusionMode}”)

Is this a sign of an environment issue? Running cardano-node 1.27.0. This is my only topology entry for now

{
  "addr": "relays.stakepool247.eu",
  "port": 3001,
  "valency": 1
}

previously had only this in the topology and got the same errors
“addr”: “relays-new.cardano-mainnet.iohk.io”,
“port”: 3001,
“valency”: 2

System specs
ubuntu 20.04
Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
16GB ram
Using systemd to run as a service

Found a similar error at Using kubernetes and nessus io docker image and k8s for staking pool setup but that’s using Docker on testnet. I’m not using Docker.

I still see the successful messages that the chain was extended with a new tip, so it’s working. Just not sure if Refused NodeToNodeV_6 is something I can ignore.

This error is when someone tries to connect to your node from a testnet node (or vice versa) - can be ignored.

… and you should use some topology buddy scripts to have more than 1 node (for relays) in your topology file.

Thanks @lauris. I do have the topologyUpdater script. Will need to convert it’s config from testnet to mainnet

1 Like

Any update on this?

Hi @laplasz , was that a question for me or for @lauris? In my case, I ended up adding the IP addresses to iptables, ex:

sudo iptables -A INPUT -s 35.158.22.72 -j DROP

Stopped getting the error message. As lauris said, this could occur if a testnet node called my mainnet node. I can see this happening since I’ve converted my testnet to mainnet on the same server without changing ports, and maybe those other testnet nodes had not updated their topology.

1 Like

hmm - good solution - even you also indicate one of the answers as solution

here is a good solution by Martin (ATADA pool) to automatically temporarily ban nodes with “wrong” versions using Fail2Ban: scripts/BlockNodesViaFail2Ban.md at master · gitmachtl/scripts · GitHub

you will need to indicate in the topologyBuddy config file which network you want to connect (network magic number)

Another update: the iptables solution I used to avoid the “Refused NodeToNodeV_6” warning was only temporary. I learned after a restart of the relay node that the rules were not persisted. Instead of finding a way to make the iptables rules persist (I’m sure there is a way), I ended using the Fail2Ban solution that @lauris mentioned. Six ip’s blocked. So far so good.

sudo netfilter-persistent save

also another solution to restore iptables rules:

1 Like