Akka远程`system.shutdown()`导致EndpointDisassociatedException吗? [英] Akka remote `system.shutdown()` leads to EndpointDisassociatedException?

查看:61
本文介绍了Akka远程`system.shutdown()`导致EndpointDisassociatedException吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有简单的客户端和服务器设置,并且在发送所有异步请求之后,服务器确认后,客户端会调用 system.shutdown()。这将导致服务器出现 akka.remote.EndpointDisassociatedException 和许多日志错误,如下所示。我对日志中的一堆错误不满意,所以我想知道是什么原因造成的。系统整体上的结果成功运行,该错误仅显示在客户端关闭的位置。

I have simple Client and Server setup and at some point after sending all the asynchronous requests and upon the Server acknowledging it, the Client invokes system.shutdown(). This leads the Server to akka.remote.EndpointDisassociatedException and a bunch of log errors as shown below. I'm not happy with a bunch of errors in my logs so I would like to know what's causing all this. The outcome of the system as a whole works successfully, the error only shows at the point where the Client shutdown.

28.Jun.2013-10:13:01 ERROR EndpointWriter - AssociationError [akka.tcp://MapReduceApp@127.0.0.1:2552] <- [akka.tcp://WordCountClientApp@192.168.224.65:2552]: Error [Disassociated] [
akka.remote.EndpointDisassociatedException: Disassociated
]
28.Jun.2013-10:13:01 DEBUG EndpointWriter - Disassociated [akka.tcp://MapReduceApp@127.0.0.1:2552] <- [akka.tcp://WordCountClientApp@192.168.224.65:2552]
28.Jun.2013-10:13:01 ERROR EndpointWriter - AssociationError [akka.tcp://MapReduceApp@127.0.0.1:2552] -> [akka.tcp://WordCountClientApp@192.168.224.65:2552]: Error [Association failed with [akka.tcp://WordCountClientApp@192.168.224.65:2552]] [
akka.remote.EndpointAssociationException: Association failed with [akka.tcp://WordCountClientApp@192.168.224.65:2552]
Caused by: akka.remote.transport.netty.NettyTransport$$anonfun$associate$1$$anon$2: Connection refused: /192.168.224.65:2552
]
28.Jun.2013-10:13:01 DEBUG EndpointWriter - Disassociated [akka.tcp://MapReduceApp@127.0.0.1:2552] -> [akka.tcp://WordCountClientApp@192.168.224.65:2552]
28.Jun.2013-10:13:01 ERROR EndpointWriter - AssociationError [akka.tcp://MapReduceApp@127.0.0.1:2552] -> [akka.tcp://WordCountClientApp@192.168.224.65:2552]: Error [Association failed with [akka.tcp://WordCountClientApp@192.168.224.65:2552]] [
akka.remote.EndpointAssociationException: Association failed with [akka.tcp://WordCountClientApp@192.168.224.65:2552]
Caused by: akka.remote.transport.netty.NettyTransport$$anonfun$associate$1$$anon$2: Connection refused: /192.168.224.65:2552
]
28.Jun.2013-10:13:01 DEBUG EndpointWriter - Disassociated [akka.tcp://MapReduceApp@127.0.0.1:2552] -> [akka.tcp://WordCountClientApp@192.168.224.65:2552]
28.Jun.2013-10:13:01 ERROR EndpointWriter - AssociationError [akka.tcp://MapReduceApp@127.0.0.1:2552] -> [akka.tcp://WordCountClientApp@192.168.224.65:2552]: Error [Association failed with [akka.tcp://WordCountClientApp@192.168.224.65:2552]] [
akka.remote.EndpointAssociationException: Association failed with [akka.tcp://WordCountClientApp@192.168.224.65:2552]
Caused by: akka.remote.transport.netty.NettyTransport$$anonfun$associate$1$$anon$2: Connection refused: /192.168.224.65:2552
]
28.Jun.2013-10:13:01 DEBUG EndpointWriter - Disassociated [akka.tcp://MapReduceApp@127.0.0.1:2552] -> [akka.tcp://WordCountClientApp@192.168.224.65:2552]

更新:我正在使用Akka版本2.2.0-RC1和Scala版本是2.10.0,但是在Scala版本2.10.1中也会发生。我使用Maven,软件版本为:

UPDATE: I'm using Akka version 2.2.0-RC1 and the Scala version is 2.10.0 but it also happens with Scala version 2.10.1. I use Maven and the software versions are:

<properties>
    <scala.version>2.10.0</scala.version>
    <akka.version>2.2.0-RC1</akka.version>
    <scalatest.version>2.0.M6-SNAP16</scalatest.version>
    <log4j.version>1.2.17</log4j.version>
    <slf4j.version>1.7.5</slf4j.version>
    <commons-lang3.version>3.1</commons-lang3.version>
    <guava.version>14.0.1</guava.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

及其相应的依存关系:

<dependencies>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala.version}</version>
    </dependency>
    <dependency>
        <groupId>com.typesafe.akka</groupId>
        <artifactId>akka-actor_2.10</artifactId>
        <version>${akka.version}</version>
        <exclusions>
                <exclusion>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.typesafe.akka</groupId>
        <artifactId>akka-remote_2.10</artifactId>
        <version>${akka.version}</version>
        <exclusions>
                <exclusion>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.typesafe.akka</groupId>
        <artifactId>akka-kernel_2.10</artifactId>
        <version>${akka.version}</version>
        <exclusions>
                <exclusion>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.typesafe.akka</groupId>
        <artifactId>akka-agent_2.10</artifactId>
        <version>${akka.version}</version>
        <exclusions>
                <exclusion>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.typesafe.akka</groupId>
        <artifactId>akka-zeromq_2.10</artifactId>
        <version>${akka.version}</version>
        <exclusions>
                <exclusion>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.typesafe.akka</groupId>
        <artifactId>akka-slf4j_2.10</artifactId>
        <version>${akka.version}</version>
        <exclusions>
                <exclusion>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
    </dependency>
    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
    </dependency>
    <!-- Test dependencies -->
    <dependency>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest_2.10</artifactId>
        <version>${scalatest.version}</version>
        <scope>test</scope>
    </dependency>
</dependencies>


推荐答案

您可以使用配置属性$ b禁用此日志记录$ b akka.remote.log-remote-lifecycle-events = off

You can disable this logging with configuration property: akka.remote.log-remote-lifecycle-events=off

这篇关于Akka远程`system.shutdown()`导致EndpointDisassociatedException吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆