scala
scala

Reputation: 545

ethereum local cluster with bootnodes

Geth 1.6.7. I have used this manual

https://github.com/ethereum/go-ethereum/wiki/Setting-up-private-network-or-local-cluster

looks very simple

  1. run bootnode

./bootnode -nodekeyhex dc90f8f7324f1cc7ba52c4077721c939f98a628ed17e51266d01c9cd0294033a

UDP listener up
self=enode://890b6b5367ef6072455fedbd7a24ebac239d442b18c5ab9d26f58a349dad35ee5783a0dd543e4f454fed22db9772efe28a3ed6f21e75674ef6203e47803da682@[::]:30301

run 2 geth`s on the local machine

geth --bootnodes enode://890b6b5367ef6072455fedbd7a24ebac239d442b18c5ab9d26f58a349dad35ee5783a0dd543e4f454fed22db9772efe28a3ed6f21e75674ef6203e47803da682@127.0.0.1:30301 --datadir "./node1" --port 30310 --rpcport 8110 --ipcdisable --networkid 1024 --cache=512 --rpcapi personal,db,eth,net,web3 --rpc console 2>> ./node1/geth1.log

geth --bootnodes enode://890b6b5367ef6072455fedbd7a24ebac239d442b18c5ab9d26f58a349dad35ee5783a0dd543e4f454fed22db9772efe28a3ed6f21e75674ef6203e47803da682@127.0.0.1:30301 --datadir "./node1" --port 30311 --rpcport 8111 --ipcdisable --networkid 1024 --cache=512 --rpcapi personal,db,eth,net,web3 --rpc console 2>> ./node1/geth1.log

checked peers via console

admin.peers []

As you can see nodes do not see each other. What have I done wrong?

Thanks.

Upvotes: 1

Views: 1400

Answers (1)

Jake Henningsgaard
Jake Henningsgaard

Reputation: 702

You have to add the second instance to your admin node (i.e. your first instance). Run the command admin.addPeer(enodeUrlOfFirstInstance).

Upvotes: 0

Related Questions