hyperledger-labs / Scorex

Scorex 2.0 Core
Apache License 2.0
544 stars 115 forks source link

Delete outdated peers #320

Closed catena2w closed 5 years ago

catena2w commented 6 years ago

If out node knows some peer (from config or from other peers) it is trying to connect to it every 5 seconds, printing big stacktrace to logs:

13:08:46.085 INFO  [ctor.default-dispatcher-9] s.c.n.NetworkController - Failed to connect to : /127.0.0.1:9001
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at akka.io.TcpOutgoingConnection$$anonfun$connecting$1.$anonfun$applyOrElse$3(TcpOutgoingConnection.scala:98)
    at akka.io.TcpOutgoingConnection.akka$io$TcpOutgoingConnection$$reportConnectFailure(TcpOutgoingConnection.scala:46)
    at akka.io.TcpOutgoingConnection$$anonfun$connecting$1.applyOrElse(TcpOutgoingConnection.scala:98)
    at akka.actor.Actor.aroundReceive(Actor.scala:517)
    at akka.actor.Actor.aroundReceive$(Actor.scala:515)
    at akka.io.TcpConnection.aroundReceive(TcpConnection.scala:31)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:588)

Node should delete this peer from it's database after few unsuccessfull attempts

oskin1 commented 5 years ago

Duplicates #301