1

There are 2 nodes(10.0.50.90, 10.0.50.91), and they can ping each other well. There are geth in every node and their genesis json file is same.Then I run geth in evey node. In 90's geth console:

> admin.nodeInfo.enode

"enode://22417b070ba9e8558ef37acc4fa9818735509ff23c0608cdc03d78c7ff3670fad5277806f35343f7dfe7b58eec7f5faafecc10384af26195ac469ea3dcc535ff@[::]:30303"

In 91's geth console:

> admin.nodeInfo.enode
"enode://f08d120a6edbb0f4f4859fc480c7377cf78593e71ad1de2f9a7b92f04f5d97fffa9e065224e93b2142f4489f649720a84b6de5f496e8c12bf98bc6aaf0883e3e@[::]:30303"

then I add 91 in 90's geth console here:

> admin.addPeer("enode://f08d120a6edbb0f4f4859fc480c7377cf78593e71ad1de2f9a7b92f04f5d97fffa9e065224e93b2142f4489f649720a84b6de5f496e8c12bf98bc6aaf0883e3e@10.0.50.91:30303")
true
> admin.peers
[]
> admin.peers
[]
> admin.peers
[]
> admin.peers
[]
> admin.peers
[]
> admin.peers
[{
    caps: ["eth/62", "eth/63"],
    id: "182cf8aaadbe949e9dada0874a990f86fe61043738164757ca1d4c007a81585dfee0d517e4211000fc06034de2c42cdfef90c8b020f4fdabb4abd97d0d81a8cd",
    name: "Geth/azureNode/v1.6.1-stable-021c3c28/linux-amd64/go1.8.1",
    network: {
      localAddress: "10.0.50.90:49936",
      remoteAddress: "13.90.198.214:30303"
    },
    protocols: {
      eth: "handshake"
    }
}, {
    caps: ["eth/62", "eth/63"],
    id: "9067508301728d7ad21871e38d71a2b2949b9f924d4358569b213b27f8a97119a02d490639c0f97a2445191ec78df64e2fd08f0a9479895711d24416884485e8",
    name: "Geth/v3.3.0-1-gdd95f05/linux/go1.7",
    network: {
      localAddress: "10.0.50.90:42046",
      remoteAddress: "46.101.153.17:30303"
    },
    protocols: {
      eth: "handshake"
    }
}]

so you can be clear from above that when I type admin.peers the first few times, it shows [], but it shows something at the end.But there is no 91's information in the result. So I can't addpeer in a private chain, why? and why it can show some remote nodes I didn't add before at the last time?(is it the auto discovery mechanism' function?) how to add 91's node when I type admin.peers it can show 91's information? Many thanks.

Your Answer

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

Browse other questions tagged or ask your own question.