尝试运行hazelcast服务器

问题描述 投票:1回答:2

我正在尝试在端口5701上的ubuntu VM的0.0.0.0接口上运行hazelcast服务器v3.2.4(端口未由任何其他服务使用,也没有防火墙设置阻止我根据我的侦听5701告诉)。但是,我仍然在日志文件中看到以下内容(相关的hazelcast xml配置也被复制到下面):

hazelcast.xml:

 <network>
        <port auto-increment="true" port-count="100">5701</port>
        <outbound-ports>
            <!--
            Allowed port range when connecting to other nodes.
            0 or * means use system provided port.
            -->
            <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">
                <interface>0.0.0.0</interface> <!-- 127.0.0.1 -->
            </tcp-ip>
            <aws enabled="false">
            </aws>
        </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>fakesalt</salt>
            <password>fakepwd</password>
            <iteration-count>19</iteration-count>
        </symmetric-encryption>
    </network>

日志:

2014-09-04 13:13:21,752 INFO c.h.i.DefaultAddressPicker [main] null [dev] [3.2.4] Interfaces is disabled, trying to pick one address from TCP-IP config addresses: [0.0.0.0]
2014-09-04 13:13:21,754 INFO c.h.i.DefaultAddressPicker [main] null [dev] [3.2.4] Prefer IPv4 stack is true.
2014-09-04 13:13:21,755 WARN c.h.i.DefaultAddressPicker [main] null [dev] [3.2.4] Could not find a matching address to start with! Picking one of non-loopback addresses.
2014-09-04 13:13:21,762 INFO c.h.i.DefaultAddressPicker [main] null [dev] [3.2.4] Picked Address[xxx.xxx.xxx.xxx]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
2014-09-04 13:13:21,950 INFO c.h.system [main] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Hazelcast 3.2.4 (20140721) starting at Address[xxx.xxx.xxx.xxx]:5701
2014-09-04 13:13:21,950 INFO c.h.system [main] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Copyright (C) 2008-2014 Hazelcast.com
2014-09-04 13:13:21,952 INFO c.h.i.Node [main] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Creating TcpIpJoiner
2014-09-04 13:13:21,956 INFO c.h.c.LifecycleService [main] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Address[xxx.xxx.xxx.xxx]:5701 is STARTING
2014-09-04 13:13:22,042 INFO c.h.c.TcpIpJoiner [main] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connecting to possible member: Address[0.0.0.0]:5702
2014-09-04 13:13:22,045 INFO c.h.c.TcpIpJoiner [main] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connecting to possible member: Address[0.0.0.0]:5701
2014-09-04 13:13:22,050 INFO c.h.c.TcpIpJoiner [main] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connecting to possible member: Address[0.0.0.0]:5703
2014-09-04 13:13:22,058 INFO c.h.n.SocketConnector [hz._hzInstance_1_dev.cached.thread-4] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connecting to /0.0.0.0:5703, timeout: 0, bind-any: true
2014-09-04 13:13:22,058 INFO c.h.n.SocketConnector [hz._hzInstance_1_dev.cached.thread-2] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connecting to /0.0.0.0:5702, timeout: 0, bind-any: true
2014-09-04 13:13:22,058 INFO c.h.n.SocketConnector [hz._hzInstance_1_dev.cached.thread-3] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connecting to /0.0.0.0:5701, timeout: 0, bind-any: true
2014-09-04 13:13:22,061 INFO c.h.n.SocketConnector [hz._hzInstance_1_dev.cached.thread-2] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Could not connect to: /0.0.0.0:5702. Reason: SocketException[Connection refused to address /0.0.0.0:5702]
2014-09-04 13:13:22,062 INFO c.h.n.SocketConnector [hz._hzInstance_1_dev.cached.thread-4] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Could not connect to: /0.0.0.0:5703. Reason: SocketException[Connection refused to address /0.0.0.0:5703]
2014-09-04 13:13:22,065 INFO c.h.n.SocketAcceptor [hz._hzInstance_1_dev.IO.thread-Acceptor] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Accepting socket connection from /xxx.xxx.xxx.xxx:50460
2014-09-04 13:13:22,085 INFO c.h.n.TcpIpConnectionManager [hz._hzInstance_1_dev.cached.thread-3] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] 50460 accepted socket connection from /0.0.0.0:5701
2014-09-04 13:13:22,085 INFO c.h.n.TcpIpConnectionManager [hz._hzInstance_1_dev.IO.thread-Acceptor] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] 5701 accepted socket connection from /xxx.xxx.xxx.xxx:50460
2014-09-04 13:13:22,103 WARN c.h.n.TcpIpConnectionManager [hz._hzInstance_1_dev.global-operation.thread-1] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Wrong bind request from Address[xxx.xxx.xxx.xxx]:5701! This node is not requested endpoint: A
ddress[0.0.0.0]:5701
2014-09-04 13:13:22,104 INFO c.h.n.TcpIpConnection [hz._hzInstance_1_dev.IO.thread-in-0] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connection [Address[0.0.0.0]:5701] lost. Reason: java.io.EOFException[Remote socket closed!]
2014-09-04 13:13:22,104 WARN c.h.n.ReadHandler [hz._hzInstance_1_dev.IO.thread-in-0] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] hz._hzInstance_1_dev.IO.thread-in-0 Closing socket to endpoint Address[0.0.0.0]:5701, Cause:java.io.EOFException: R
emote socket closed!
2014-09-04 13:13:22,116 INFO c.h.n.TcpIpConnection [hz._hzInstance_1_dev.global-operation.thread-1] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connection [/xxx.xxx.xxx.xxx:50460] lost. Reason: Socket explicitly closed
2014-09-04 13:13:23,051 INFO c.h.n.SocketConnector [hz._hzInstance_1_dev.cached.thread-3] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Connecting to /0.0.0.0:5701, timeout: 0, bind-any: true
2014-09-04 13:13:23,051 INFO c.h.n.TcpIpConnectionManager [hz._hzInstance_1_dev.cached.thread-3] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] 45113 accepted socket connection from /0.0.0.0:5701
2014-09-04 13:13:23,051 INFO c.h.n.SocketAcceptor [hz._hzInstance_1_dev.IO.thread-Acceptor] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Accepting socket connection from /xxx.xxx.xxx.xxx:45113
2014-09-04 13:13:23,052 INFO c.h.n.TcpIpConnectionManager [hz._hzInstance_1_dev.IO.thread-Acceptor] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] 5701 accepted socket connection from /xxx.xxx.xxx.xxx:45113
2014-09-04 13:13:23,054 WARN c.h.n.TcpIpConnectionManager [hz._hzInstance_1_dev.global-operation.thread-2] [xxx.xxx.xxx.xxx]:5701 [dev] [3.2.4] Wrong bind request from Address[xxx.xxx.xxx.xxx]:5701! This node is not requested endpoint: A
ddress[0.0.0.0]:5701

更新我将tcp设置更改为127.0.0.1,现在似乎已在端口5701上进行了绑定。但是,我在服务器输出中始终看到以下内容:

2014年9月4日6:58:07 PM com.hazelcast.config.FileSystemXmlConfigINFO:从“ /opt/xxx/resources/hazelcast.xml”配置Hazelcast。

我无法让客户端连接到服务器!

java hazelcast
2个回答
0
投票

您是否尝试将监听主机切换到127.0.0.1而不是0.0.0.0?我可能是错的,但我认为如果您在Linux上使用127.0.0.1(或者是我前一段时间尝试的情况),则您使用的版本似乎无法正常工作。


0
投票

您是否曾试图强迫您的机器使用公共地址?通过添加到hazelcast.xml,我遇到了类似的问题:

© www.soinside.com 2019 - 2024. All rights reserved.