akka/akka-core

Artery outbound connection is not closed when connecting to a non-existing actor system.

Open

#29 537 ouverte le 1 sept. 2020

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Scala (3 547 forks)batch import
1 - triagedhelp wanted

Métriques du dépôt

Stars
 (13 277 stars)
Métriques de merge PR
 (Merge moyen 8j 19h) (10 PRs mergées en 30 j)

Description

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.

Guide contributeur