I have a virtual machine with VB where I have three nodes of ethereum the node Node01 is the miner and the rest are peers of it. They are interconnected between them and I can connect via rcp from Remix, deploy contracts, make calls to their functions, and from eth-scan see how blocks are being mined. Inside this machine everything is working. I have the following ports mapped to be able to access from my physical machine and from a second VM.


Now once everything is working from the same virtual machine. I am trying to connect a fourth node to the network from a second VM, for this I have copied the contents of the genesis file of the first machine and I have initialized the peer. Then I have launched geth and I have launched this command with the enode address of the Node01 machine (the one I used to connect the Node02 and Node03 machine). In the other ssh terminal, after launching the command with the enode as a parameter, the terminal shows me constant attempts to search for peer without satisfactory results.

geth --datadir "/home/user/test-network/node04" init "/home/user/test-network/genesis.json"
geth --identity "node04" --allow-insecure-unlock --rpc --rpcaddr "" --rpcport "8003" --rpccorsdomain "*" --rpcapi "eth,net,web3,personal,miner,admin" --http --datadir "/home/user/test-network/node04" --port "30306" --nodiscover --networkid 1900 --nat "any"
geth attach

> admin.addPeer("enode://e33253033fcb3689ced690f492c25feccba0cb8af33fb1f8fdea91787e1bc1bd272959aba601d4a9704048e11abcb1e027ab91106ef4df31102842c183aaf659@")

Response from Node04

These are the open ports from the second VM


At this moment it does not connect with the Node01 peer and is constantly making requests. I read that it could be for some of the reasons that I will put below, and then I even have doubts whether I have the correct ports redirected, but no matter how hard I look, I would say that they are correct.

  • Discrepancy in the time of the machines
  • Ports configuration error

What I can be doing wrong? I leave an image with the summary of the network


EDIT genesis.json content

      "byzantiumBlock": 0,
      "constantinopleBlock": 0

The value from the address I change each time in test's when i redeploy de network. So there the value is not 0x0000....


In the second VM the road map that I do is:

1- Generate a new folder, node04

2- Copy only the genesis file same as the other nodes inside the second VM node04 folder

3-I execute "geth --datadir "/home/user/test-network/node04" init "/home/user/test-network/node04/genesis.json"" in second VM

4- geth --identity "node04" --allow-insecure-unlock --rpc --rpcaddr "" --rpcport "8003" --rpccorsdomain "*" --rpcapi "eth,net,web3,personal,miner,admin" --http --datadir "/home/user/test-network/node04" --port "30306" --nodiscover --networkid 1900 --nat "any" --ethstats node01:s3cr3t@localhost:3000 &

5- geth attach


Start looking for the node01 peer

  • 1
    When you copied the genesis files from node01 to node04, did you also copy the nodekey file?
    – Undead8
    Sep 7 at 14:44
  • No, I don't set the value in the genesis. How can I get that value. Sep 7 at 18:05
  • I'm going to edit the post with the genesis that I use in 4 nodes Sep 7 at 18:09
  • In the node folder, there is a nodekey file. You must not copy it when you create node04 because otherwise node04 will have the same enode as node01. Delete the nodekey file in node04 folder and try again.
    – Undead8
    Sep 7 at 20:32
  • @Undead8 Inside the node04 folder of the second virtual machine, I don't have any keystore and I don't set inside the genesis file in any execution of the other nodes. Maybe I don't understand you to find what you are telling me. I update the post with the commands that I execute when I create the 2 VM Sep 7 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.