6

I have two servers that are connected into local private ethereum blockchain successfully and they do mining as well. After few minutes one of them disconnects and after that it re-connects again and so on. Sometimes both get connected, or both disconnected, or one of the is connected while other one is disconnected. Blockchain is sync for both servers. After the re-connection, they continue to mine.

[Q] What may cause peer disconnections?

Thank you for your valuable time and help.

My client connects into my local private ethereum blockchain successfully. :

> admin.addPeer("enode://<id>@<ip>:3000?discport=0");
true
> net
{
  listening: true,
  peerCount: 1,    ||  0,
  version: "23422",
  getListening: function(callback),
  getPeerCount: function(callback),
  getVersion: function(callback)
}

1 Answer 1

3

https://ethereum.stackexchange.com/a/5931/4575 is answer to my question. My main problem was my local time was incorrect.

"Ethereum nodes (regardless of mining) need to have an accurate time, otherwise they will not be able to connect to peers and to the network "

"Common problems with connectivity

Sometimes you just can’t get connected. The most common reasons are:

  1. Your local time might be incorrect. An accurate clock is required to participate in the Ethereum network. Check your OS for how to resync your clock (example sudo ntpdate -s time.nist.gov) because even 12 seconds too fast can lead to 0 peers.
  2. Some firewall configurations can prevent UDP traffic from flowing. You can use the static nodes feature or admin.addPeer() on the console to configure connections by hand.

To start geth without the discovery protocol, you can use the --nodiscover parameter. You only want this if you are running a test node or an experimental test network with fixed nodes." [1]

[1] http://www.ethdocs.org/en/latest/network/connecting-to-the-network.html#common-problems-with-connectivity

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.