akka/akka-core

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

Open

#29,537 opened on 2020年9月1日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Scala (3,547 forks)batch import
1 - triagedhelp wanted

Repository metrics

Stars
 (13,277 stars)
PR merge metrics
 (平均マージ 8d 19h) (30d で 10 merged PRs)

説明

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.

コントリビューターガイド