1

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.

  • 2
    Are you able to ping between the two instances? – Richard Horrocks Mar 25 '17 at 19:07
0

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.

0

Try this for detailed instructions for setting up a private network on AWS. It uses PoA consensus. You should be able to use pow too.

https://github.com/chainhead/poc

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.