Artery outbound connection is not closed when connecting to a non-existing actor system.
#29.537 aperta il 1 set 2020
Metriche repository
- Star
- (13.277 star)
- Metriche merge PR
- (Merge medio 8g 19h) (10 PR mergiate in 30 g)
Descrizione
When I try to watch an actor that is on the system that is already dead and I never made a connection to it, Artery has an issue with closing connection to this non-existing actor system.
Reproduction steps:
Set akka.remote.use-unsafe-remote-features-outside-cluster = on
Watch an actor using:
val resolver = ActorRefResolver.get(context.system)
val ref = resolver.resolveActorRef("akka://DeadActorSystem@127.0.0.1:2553/user/someuser")
context.watch(ref)
Relevant logs:
Outbound message stream to [akka://dead-actor-system] failed. Restarting it. akka.stream.StreamTcpException: Tcp command [Connect(dead-actor-system-ip,None,List(),Some(5000 milliseconds),true)] failed because of java.net.NoRouteToHostException: No route to host
Detected unreachable: [akka://dead-actor-system]
Quarantine of [akka://dead-actor-system] ignored because unknown UID
As a result connection is not properly quarantined and it’s never closed. After the time defined in quarantine-idle-outbound-after last log is being repeated with fixed rate stop-idle-outbound-after/2.
I guess this connection should be closed even if Akka fails to quarantine it.