2
votes

I am trying to run hazelcast server v3.2.4 on 0.0.0.0 interface on an ubuntu VM on port 5701 (port is not used by any other service nor are there are firewall settings preventing me from listening on 5701 based on what I can tell). However, I keep seeing the following in my log files (relevant hazelcast xml config is copied below as well):

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>

Logs:

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

Update I changed the tcp settings to 127.0.0.1 and it seems to bind now on port 5701. However, I keep seeing the following in my server output:

Sep 04, 2014 6:58:07 PM com.hazelcast.config.FileSystemXmlConfig INFO: Configuring Hazelcast from '/opt/xxx/resources/hazelcast.xml'.

I am unable to get a client to connect to the server!

2
I do not know anything about hazelcast, but the part where the Interfaces are disabled seems to be key for me. I could be easily wrong, though.Lajos Arpad
thanks for sharing but based on what I know, that is not the issueuser3813256
I can run the ./server.sh that comes with the sample client on the same port - so its not a permission issue. Have ot wonder what I am doing wrong with my server launching applicationuser3813256

2 Answers

1
votes

Have you tried forcing your machine to use public adress? I had similar problem soved by adding to hazelcast.xml:

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

Have you tried flipping over the listening host to 127.0.0.1 instead of 0.0.0.0? I could be wrong but I think the version you are using appears to not work if you use 127.0.0.1 on linux (or was the case when I was trying some time ago).