Private ethereum network on AWS

by Zincoshine   Last Updated January 20, 2018 20:28 PM

I am having trouble creating a private ethereum network on AWS. I have enabled TCP/UDP for the desired ports in the firewall in AWS.

On one node A(aws instance) I start the geth console by making use of a custom genesis file using command

geth --datadir="ethdata" init fresh.json

I then execute geth on the same node A using the following command

geth --datadir="ethdata" --networkid 1234 console

Now I startup another AWS instance node B. Here to I initilize geth using the custom genesis file

geth --datadir="ethdata" init fresh.json

And then start geth console in node B using

geth --datadir="ethdata" --networkid 1234 console

And then in node B I execute the following command

>admin.addPeer("<enode of the nodeA")

The above command returns me true

However admin.peers in both node A and node B comes up with empty strings.

Occasionally I am able to view other peers connected to either of these nodes (probably because I am executing geth without --nodiscover option), but I am still unsuccessful in establishing a peer-peer connection between my two nodes.

Please advise what could I be going wrong.

PS: I have tried with the bootnode option as well, but still no success.

Question: Can I have just bootnode running on node A and then node B having a geth console running that connects to the enode using bootnodes "enode url" ? Although I did try this, it still didnt result in a proper peer-peer connection.



Answers 1


There is specific port configuration needed for peering.

"Make sure that the two nodes are with the same security group, which allows TCP 30303 (or 30000-30999 as I may use more ports on this range). Port 30303 by default is for peering among nodes."

Reference this article: https://blockgeeks.com/two-node-setup-of-a-private-ethereum/

Also make sure one of the instances are mining.

Nicholas
Nicholas
January 20, 2018 20:01 PM

Related Questions



geth not connecting to private network

Updated September 01, 2017 09:28 AM


Geth: bootnode tool and --nodiscover

Updated April 01, 2018 19:28 PM