akka/akka-core

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

Open

#29,537 创建于 2020年9月1日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Scala (3,547 fork)batch import
1 - triagedhelp wanted

仓库指标

Star
 (13,277 star)
PR 合并指标
 (平均合并 8天 19小时) (30 天内合并 10 个 PR)

描述

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.

贡献者指南