Add Peers does not add a peer in Geth console

0 votes

I am trying to add a peer. I created two nodes using the following commands on geth.The boot node creation command is

geth --datadir ./chaindata3 --port 30304 --nodiscover --networkid 12 --rpc --rpcport "8546" --rpccorsdomain "*" --ipcdisable console

The other node creation command

geth --datadir ./chaindata4 --port 30307 --nodiscover --networkid 12 --ipcdisable --bootnodes "enode://7143091f47a3d4aae216ce781e28b53c1faa9daa08bbeaa9a01adbd9b3933fb3b83acff00a375bf0a4b30b1135b7aabef422c28c60279de34e9399a3d91d7c88@127.0.0.1:30304" console

When i type the command admin.peers it returns an empty list. Can someone please help me with this?

Sep 28, 2018 in Blockchain by digger
• 26,600 points

retagged Nov 22, 2018 by Priyaj 394 views

1 answer to this question.

0 votes

Setup actual boot node, don't treat base node (first full node as boot node).

bootnode -genkey boot.key

bootnode -addr localhost:port -nodekey boot.key  -verbosity 9

Start other nodes pointing the boot node

ex:

geth --datadir "data" --syncmode "full" --rpcport port --rpc --rpcaddr "localhost"  --port port --rpccorsdomain "*" --rpcapi "personal,eth,net,db,web3,txpool,miner" --bootnodes "enode://************@localhost:port" --networkid 100  --ipcdisable --mine console

answered Sep 28, 2018 by slayer
• 29,240 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

Not able to invoke a contract in Ethereum Private chain using geth

Hope this helps: contract mortal { /* ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 68,160 points
51 views
0 votes
1 answer

Can not make a peer in Hyperledger Fabric

You have not installed jdk on your system. ...READ MORE

answered Nov 22, 2018 in Blockchain by Omkar
• 68,160 points
52 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,600 points
95 views
+1 vote
1 answer
0 votes
1 answer
+1 vote
3 answers

How to connect peers to a private network using geth?

Follow the below steps to connect peers ...READ MORE

answered Jul 13, 2018 in Blockchain by slayer
• 29,240 points
1,344 views