Hazelcast节点不加入集群

时间:2018-12-12 06:11:10

标签: hazelcast

我的hazlecast节点已经建立了套接字。但是他们没有加入集群

2018-12-12 06:32:24.568  INFO 11 --- [thread-Acceptor] com.hazelcast.nio.tcp.TcpIpAcceptor      : [10.1.0.68]:5701 [dev] [3.10.4] Accepting socket connection from /10.1.0.67:44313
2018-12-12 06:32:24.568  INFO 11 --- [thread-Acceptor] c.h.nio.tcp.TcpIpConnectionManager       : [10.1.0.68]:5701 [dev] [3.10.4] Established socket connection between /10.1.0.68:5701 and /10.1.0.67:44313 

我正在使用TCP-IP网络连接

enter image description here

enter image description here

我的配置如下:

<network>
    <port auto-increment="false" port-count="100">5701</port>
    <outbound-ports>
        <ports>0</ports>
    </outbound-ports>
    <join>
        <multicast enabled="false">
            <multicast-group>224.2.2.3</multicast-group>
            <multicast-port>54327</multicast-port>
        </multicast>
        <tcp-ip enabled="true">
            <member>task-controller-backup</member>
            <member>cdipp-task-controller</member>
        </tcp-ip>
        <aws enabled="false">
        </aws>
        <discovery-strategies>
        </discovery-strategies>
    </join>
    <interfaces enabled="false">
        <interface>10.10.1.*</interface>
    </interfaces>
    <ssl enabled="false"/>
    <socket-interceptor enabled="false"/>
    <symmetric-encryption enabled="false">
        <algorithm>PBEWithMD5AndDES</algorithm>
        <salt>thesalt</salt>
        <password>thepass</password>
        <iteration-count>19</iteration-count>
    </symmetric-encryption>
</network>

日志如下,我将日志推入ELk堆栈,所以顺序递增

December 12th 2018, 15:44:38.632[10.1.0.69]:5701 [dev] [3.10.4] [10.1.0.69]:5701 is STARTED
December 12th 2018, 15:44:38.609[10.1.0.69]:5701 [dev] [3.10.4] Hazelcast will connect to Hazelcast Management Center on address: 
http://hazelcast-mancenter:8085/hazelcast-mancenter
December 12th 2018, 15:44:38.559[10.1.0.69]:5701 [dev] [3.10.4] 
Members {size:1, ver:1} [
    Member [10.1.0.69]:5701 - 1294beca-b2d3-43ba-9435-1f4439615f40 this
]
December 12th 2018, 15:44:38.558[10.1.0.69]:5701 [dev] [3.10.4] Cluster version set to 3.10
December 12th 2018, 15:44:33.549[10.1.0.69]:5701 [dev] [3.10.4] Connecting to task-controller-backup/10.104.212.10:5701, timeout: 0, bind-any: false
December 12th 2018, 15:44:33.535[10.1.0.69]:5701 [dev] [3.10.4] Established socket connection between /10.1.0.69:42573 and cdipp-task-controller/10.98.68.83:5701
December 12th 2018, 15:44:33.533[10.1.0.68]:5701 [dev] [3.10.4] Established socket connection between /10.1.0.68:5701 and /10.1.0.69:42573
December 12th 2018, 15:44:33.531[10.1.0.68]:5701 [dev] [3.10.4] Accepting socket connection from /10.1.0.69:42573
December 12th 2018, 15:44:33.530[10.1.0.69]:5701 [dev] [3.10.4] Connecting to cdipp-task-controller/10.98.68.83:5701, timeout: 0, bind-any: false
December 12th 2018, 15:44:33.495[10.1.0.69]:5701 [dev] [3.10.4] [10.1.0.69]:5701 is STARTING
December 12th 2018, 15:44:33.493[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active: period-millis:10000 max-deviation:33%
December 12th 2018, 15:44:33.482[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active, period-millis:10000
December 12th 2018, 15:44:33.475[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active: logPartitions:false
December 12th 2018, 15:44:33.472[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active, period-millis:60000
December 12th 2018, 15:44:33.466[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active, period-millis:60000
December 12th 2018, 15:44:33.464[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active, period-millis:60000
December 12th 2018, 15:44:33.459[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active
December 12th 2018, 15:44:33.457[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active
December 12th 2018, 15:44:33.451[10.1.0.69]:5701 [dev] [3.10.4] Plugin:active
December 12th 2018, 15:44:33.450[10.1.0.69]:5701 [dev] [3.10.4] Diagnostics started
December 12th 2018, 15:44:33.438[10.1.0.69]:5701 [dev] [3.10.4] Starting 2 partition threads and 3 generic threads (1 dedicated for priority tasks)
December 12th 2018, 15:44:33.131[10.1.0.69]:5701 [dev] [3.10.4] Creating TcpIpJoiner
December 12th 2018, 15:44:32.031[10.1.0.69]:5701 [dev] [3.10.4] Running with 2 response threads
December 12th 2018, 15:44:31.960[10.1.0.69]:5701 [dev] [3.10.4] Backpressure is disabled
December 12th 2018, 15:44:31.499[10.1.0.69]:5701 [dev] [3.10.4] A non-empty group password is configured for the Hazelcast member. Starting with Hazelcast version 3.8.2, members with the same group name, but with different group passwords (that do not use authentication) form a cluster. The group password configuration will be removed completely in a future release.
December 12th 2018, 15:44:31.498[10.1.0.69]:5701 [dev] [3.10.4] Configured Hazelcast Serialization version: 1
December 12th 2018, 15:44:31.497[10.1.0.69]:5701 [dev] [3.10.4] Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved.
December 12th 2018, 15:44:31.496[10.1.0.69]:5701 [dev] [3.10.4] Hazelcast 3.10.4 (20180727 - 0f51fcf) starting at [10.1.0.69]:5701
December 12th 2018, 15:44:31.465[LOCAL] [dev] [3.10.4] Picked [10.1.0.69]:5701, using socket ServerSocket[addr=/0.0.0.0,localport=5701], bind any local is true
December 12th 2018, 15:44:31.453[LOCAL] [dev] [3.10.4] Could not find a matching address to start with! Picking one of non-loopback addresses.
December 12th 2018, 15:44:31.450[LOCAL] [dev] [3.10.4] Prefer IPv4 stack is true.
December 12th 2018, 15:44:31.449[LOCAL] [dev] [3.10.4] Interfaces is disabled, trying to pick one address from TCP-IP config addresses: [task-controller-backup/10.104.212.10, cdipp-task-controller/10.98.68.83]
December 12th 2018, 15:44:31.446[LOCAL] [dev] [3.10.4] Resolving domain name 'cdipp-task-controller' to address(es): [10.98.68.83]
December 12th 2018, 15:44:31.445[LOCAL] [dev] [3.10.4] You configured your member address as host name. Please be aware of that your dns can be spoofed. Make sure that your dns configurations are correct.
December 12th 2018, 15:44:31.443[LOCAL] [dev] [3.10.4] Resolving domain name 'task-controller-backup' to address(es): [10.104.212.10]

我发现这些节点已连接到其他节点,但是它们无法加入集群

1 个答案:

答案 0 :(得分:0)

看起来您的主机名正在解析为不在运行计算机的接口中的地址。请参见下面的日志行:

December 12th 2018, 15:44:31.449[LOCAL] [dev] [3.10.4] Interfaces is disabled, trying to pick one address from TCP-IP config addresses: [task-controller-backup/10.104.212.10, cdipp-task-controller/10.98.68.83]
December 12th 2018, 15:44:31.446[LOCAL] [dev] [3.10.4] Resolving domain name 'cdipp-task-controller' to address(es): [10.98.68.83]
December 12th 2018, 15:44:31.445[LOCAL] [dev] [3.10.4] You configured your member address as host name. Please be aware of that your dns can be spoofed. Make sure that your dns configurations are correct.
December 12th 2018, 15:44:31.443[LOCAL] [dev] [3.10.4] Resolving domain name 'task-controller-backup' to address(es): [10.104.212.10]

此后,该实例抱怨它找不到与之匹配的地址开头,并选择了一个非环回地址。见下文:

December 12th 2018, 15:44:31.465[LOCAL] [dev] [3.10.4] Picked [10.1.0.69]:5701, using socket ServerSocket[addr=/0.0.0.0,localport=5701], bind any local is true
December 12th 2018, 15:44:31.453[LOCAL] [dev] [3.10.4] Could not find a matching address to start with! Picking one of non-loopback addresses.

因此,您需要检查DNS设置,并配置用于解析可用TCP / IP地址的主机名。之后,成员应加入集群。