0

System information:

Geth version: Geth/1.8.11-unstable
OS & Version: WINDOWS10

I modified the main net Genesis config parameters in DefaultGenesisBlock in genesis.go,
and I replaced the MainnetBootnodes parameters with one line: enode://a4574b52d5ebc4414f1a55e656f66ca5647d891d5989e2bc3660141ec2c3fbed2dcd9bd50fc050915e3b8b96527f3fd9a8dfbcbdc9de3255fb948148ccd67603@192.168.2.210:30303

for learning Purpose.

Run geth.exe on 192.168.2.210 and 192.168.2.52.
The geth.exe on 2.52 can not connect to that on 2.210.
They are the same version that I build it. Cmd is "geth.exe console" with no other paras.
I've tried to use admin.addPeer() in geth and also failed.
net

{
  listening: true,
  peerCount: 0,
  version: "1",
  getListening: function(callback),
  getPeerCount: function(callback),
  getVersion: function(callback)
}

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • You don't get to modify the source code, you can just use --bootnodes flag. – rustyx Jun 3 '18 at 14:31
0

I assume you used admin.addPeer("192.168.2.252").

To connect with other peers you need NodeUrl.

Try this, go to first node cmd

admin.nodeInfo.enode

gives you the enode url. Copy it and in the next peer node cmd use admin.addPeer(NodeUrl)

  • Yes, I tried to use admin.addPeer. But, still no peers: ( 6a606....57fb is my another pc with IP 192.168.1.101, and it is running a geth.exe ) > admin.addPeer("enode://6a606a7a6a81e2a48b8f00b3b24fcd0a6732f3b1ca7f86eb51087c24e7578cebb9638d7340a08534a2f396a9587a881f8ab31bfb86139abeeff f5696766f57fb@192.168.1.101:30303") true > net { listening: true, peerCount: 0, version: "1", .... } > admin { datadir: "E:\\geth\\data", ...., peers: [], addPeer: function(), .... } > – clinton Jun 5 '18 at 3:33
0

I solved it by myself. It is due to the dao fork. The extradata validation does not pass cause the peers can't connect to each others.

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.