Java 正在尝试运行hazelcast服务器

Java 正在尝试运行hazelcast服务器,java,hazelcast,Java,Hazelcast,我正在尝试在端口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>

我正在尝试在端口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 com.hazelcast.config.FileSystemXmlConfig 信息:从“/opt/xxx/resources/Hazelcast.xml”配置Hazelcast


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

您是否尝试将侦听主机切换到127.0.0.1而不是0.0.0.0?我可能是错的,但我认为如果在linux上使用127.0.0.1,您正在使用的版本似乎不起作用(或者是我不久前尝试时的情况)

您是否尝试强制您的计算机使用公共地址?我通过添加到hazelcast.xml解决了类似的问题:

    <network>
            <public-address>X.X.X.X</public-address>
             ...
    </network>

X.X.X.X
...

我对hazelcast一无所知,但禁用接口的部分似乎是我的关键所在。不过,我可能很容易出错。谢谢分享,但根据我所知,这不是问题。我可以在同一端口上运行示例客户端附带的./server.sh,因此这不是权限问题。我不想知道我的服务器启动应用程序的错误是什么——似乎我的服务器现在正在监听端口。但是,我一直收到这样的消息:信息:配置Hazelcast from…。我的客户端无法连接到群集-我可以远程登录到ip地址和端口,即使服务器和客户端版本相同(即3.2.4),也可以连接但不连接客户端