Hazelcast client cannot connect to server

I am using hazelcast (facelack client and server jars on the client side and server jar on the server - both versions are the same i.e. 3.2.4). The server is running in a different block - I have specified this IP address in my client. The server seems to be running (I can see that the process has finished and bound to port 5701). My client is trying to connect to a remote IP and port, but can't do it, and hazlecast messages don't help much (if I configured the logging incorrectly). The result is below:

Sep 04, 2014 8:30:45 PM com.hazelcast.core.LifecycleService
INFO: HazelcastClient[hz.client_0_dev][3.2.4] is STARTING
Sep 04, 2014 8:30:46 PM com.hazelcast.core.LifecycleService
INFO: HazelcastClient[hz.client_0_dev][3.2.4] is STARTED
Sep 04, 2014 8:30:49 PM com.hazelcast.client.spi.ClientClusterService
WARNING: Unable to get alive cluster connection, try in 0 ms later, attempt 1 of 2.
Sep 04, 2014 8:30:52 PM com.hazelcast.client.spi.ClientClusterService
WARNING: Unable to get alive cluster connection, try in 0 ms later, attempt 2 of 2.
Sep 04, 2014 8:30:55 PM com.hazelcast.client.spi.ClientClusterService

      

Config file:

<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>127.0.0.1</interface>
            </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>

      

any help with troubleshooting would be great

Edit I was able to vlaidate network traffic between two servers (hosting client and server on port 5701) using iperf.

------------------------------------------------------------
Server listening on TCP port 5701
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to xxx.xxx.xxx.xxx, TCP port 5701
TCP window size:  101 KByte (default)
------------------------------------------------------------
[  3] local xxx.xxx.xxx.xxx port 40937 connected with xxx.xxx.xxx.xxx port 5701
[  5] local xxx.xxx.xxx.xxx port 5701 connected with xxx.xxx.xxx.xxx port 51788
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  3.31 GBytes  2.84 Gbits/sec
[  5]  0.0-10.0 sec  3.20 GBytes  2.75 Gbits/sec

      

+3


source to share


1 answer


Make sure you are using the hazelcast-client config file and preferably testing via tcp / ip with a simple server and client.



<hazelcast-client xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-client-config-3.1.xsd"
           xmlns="http://www.hazelcast.com/schema/config"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <group>
        <name>dev</name> 
        <password>dev-pass</password> 
    </group>
    <management-center enabled="false">http://localhost:8080/mancenter</management-center>
    <network>
       <cluster-members>
            <address>127.0.0.1</address>
        </cluster-members>
        <smart-routing>true</smart-routing>
        <redo-operation>true</redo-operation>
        <connection-pool-size>30</connection-pool-size>

        <port auto-increment="true" 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="false">
                <interface>127.0.0.1</interface>
            </tcp-ip>
            <aws enabled="false">
                <access-key>my-access-key</access-key>
                <secret-key>my-secret-key</secret-key>
                <region>us-west-1</region>
                <host-header>ec2.amazonaws.com</host-header>
                <security-group-name>hazelcast-sg</security-group-name>
                <tag-key>type</tag-key>
                <tag-value>hz-nodes</tag-value>
            </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>thesalt</salt>
            <password>thepass</password>
            <iteration-count>19</iteration-count>
        </symmetric-encryption>
    </network>
<!-- additional tags -->
</hazelcast-client>

      

+2


source







All Articles