I have a cluster with 2 nodes and I would like to create a testnet by connecting them with geth.

I am using the following command:

geth --datadir node1 --port 30302 --rpc --rpcport 3003 --rpcaddr --ipcpath node1/geth.ipc --rpcapi="db,eth,net,web3,personal" --networkid 15 --rpccorsdomain "*" --ws --wsaddr --wsport 3002 --wsorigins "*"

geth --datadir node2 --port 30304 --rpc --rpcport 3005 --rpcaddr --ipcpath node2/geth.ipc --rpcapi="db,eth,net,web3,personal" --networkid 15 --rpccorsdomain "*" --ws --wsaddr --wsport 3004 --wsorigins "*"

and both work individually. When I try to add them as peer, if does not work


Although the exit of this command is true, the peer is not added. Any idea?

  • You should add your solution as an answer, so it can help others.
    – Ismael
    Jan 14 '19 at 6:48

SOLUTION: It is necessary to check the ip address of each node and write it to --rcpaddr yourip. Then: admin.addPeer("....@yourip:yourport")

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.