Hazelcast - 连接成功后客户端断开连接

时间:2016-10-31 17:41:46

标签: java spring hazelcast

我正在使用带弹簧的HZ 3.4。连接成功后客户端断开连接。这是服务器日志中的例外情况"现有连接被远程主机强行关闭"。

这是我的HZ服务器配置:

<hazelcast
    xsi:schemaLocation="http://www.hazelcast.com/schema/config http://www.hazelcast.com/schema/config/hazelcast-config-3.4.xsd"
    xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <group>
        <name>test-local</name>
        <password>test-local</password>
    </group>

    <properties>
        <property name="hazelcast.logging.type">log4j</property>
    </properties>

    <network>
        <port>5701</port>
        <join>
            <multicast enabled="false" />
            <tcp-ip enabled="true">
                <members>localhost</members>
            </tcp-ip>
        </join>
    </network>

    <map name="*">
        <eviction-policy>NONE</eviction-policy>
        <read-backup-data>true</read-backup-data>
    </map>
</hazelcast>

这是服务器日志:

WARN  [hz._hzInstance_1_test-local.IO.thread-in-0] 2016-10-31 13:05:04,424 - [localhost]:5701 [test-local] [3.4] hz._hzInstance_1_test-local.IO.thread-in-0 Closing socket to endpoint Address[127.0.0.1]:56219, Cause:java.io.IOException: An existing connection was forcibly closed by the remote host

这是客户端日志中的错误消息:

INFO: HazelcastClient[hz.client_0_test-local][3.4] is STARTING
Oct 31, 2016 1:05:01 PM com.hazelcast.core.LifecycleService
INFO: HazelcastClient[hz.client_0_test-local][3.4] is STARTED
Oct 31, 2016 1:05:01 PM com.hazelcast.core.LifecycleService
INFO: HazelcastClient[hz.client_0_test-local][3.4] is CLIENT_CONNECTED
Oct 31, 2016 1:05:01 PM com.hazelcast.client.spi.impl.ClusterListenerThread
INFO: 
Members [1] {
    Member [localhost]:5701
}
Oct 31, 2016 1:05:04 PM com.hazelcast.client.connection.nio.ClientConnection
WARNING: Connection [null] lost. Reason: Socket explicitly closed
Oct 31, 2016 1:05:04 PM com.hazelcast.core.LifecycleService
INFO: HazelcastClient[hz.client_0_test-local][3.4] is CLIENT_DISCONNECTED
Oct 31, 2016 1:05:04 PM com.hazelcast.client.connection.nio.ClientConnection
WARNING: Connection [localhost/127.0.0.1:5701] lost. Reason: Socket explicitly closed
Oct 31, 2016 1:05:04 PM com.hazelcast.core.LifecycleService
INFO: HazelcastClient[hz.client_0_test-local][3.4] is SHUTDOWN

0 个答案:

没有答案