title: Hazelcast doesnt connect to 5704 port
body: <p>I started hazelcast server in 4 instances .For each of the instance i gave different group name.Now from the client when i am trying to connect to the 4 instance,its failing. Hazelcast is by default checking only for 5701,5702,5703 and it doesn't even look for 5704.How can i configure hazelcast client to look for all the instances
  The below is the log</p>
  <blockquote>
  <p>com.hazelcast.client.AuthenticationException: Invalid credentials!    at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:525)
  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:507)
  at
  com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:251)
  at
  java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)    at
  com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
  at
  com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
  12:30:22.570 [hz.client_0.internal-2] WARN
  com.hazelcast.client.connection.nio.ClientConnection - hz.client_0
  [PAVAN] [3.7.4] ClientConnection{live=false, connectionId=2,
  socketChannel=DefaultSocketChannelWrapper{socketChannel=java.nio.channels.SocketChannel[connected
  local=/127.0.0.1:34798 remote=/127.0.0.1:5702]}, remoteEndpoint=null,
  lastReadTime=2017-01-25 12:30:22.569, lastWriteTime=2017-01-25
  12:30:22.568, closedTime=2017-01-25 12:30:22.569,
  lastHeartbeatRequested=never, lastHeartbeatReceived=never, connected
  server version=null} lost. Reason:
  com.hazelcast.client.AuthenticationException[Invalid credentials!]
  12:30:22.570 [main] WARN
  com.hazelcast.client.spi.impl.ClusterListenerSupport - hz.client_0
  [PAVAN] [3.7.4] Exception during initial connection to
  localhost/127.0.0.1:5702 com.hazelcast.client.AuthenticationException:
  Invalid credentials!  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:525)
  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:507)
  at
  com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:251)
  at
  java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)    at
  com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
  at
  com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
  12:30:22.574 [hz.client_0.internal-2] WARN
  com.hazelcast.client.connection.nio.ClientConnection - hz.client_0
  [PAVAN] [3.7.4] ClientConnection{live=false, connectionId=3,
  socketChannel=DefaultSocketChannelWrapper{socketChannel=java.nio.channels.SocketChannel[connected
  local=/127.0.0.1:58426 remote=/127.0.0.1:5701]}, remoteEndpoint=null,
  lastReadTime=2017-01-25 12:30:22.573, lastWriteTime=2017-01-25
  12:30:22.571, closedTime=2017-01-25 12:30:22.573,
  lastHeartbeatRequested=never, lastHeartbeatReceived=never, connected
  server version=null} lost. Reason:
  com.hazelcast.client.AuthenticationException[Invalid credentials!]
  12:30:22.574 [main] WARN
  com.hazelcast.client.spi.impl.ClusterListenerSupport - hz.client_0
  [PAVAN] [3.7.4] Exception during initial connection to
  localhost/127.0.0.1:5701 com.hazelcast.client.AuthenticationException:
  Invalid credentials!  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:525)
  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:507)
  at
  com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:251)
  at
  java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)    at
  com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
  at
  com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
  12:30:22.575 [main] WARN
  com.hazelcast.client.spi.impl.ClusterListenerSupport - hz.client_0
  [PAVAN] [3.7.4] Unable to get alive cluster connection, try in 2955 ms
  later, attempt 1 of 2. 12:30:25.534 [hz.client_0.internal-2] WARN
  com.hazelcast.client.connection.nio.ClientConnection - hz.client_0
  [PAVAN] [3.7.4] ClientConnection{live=false, connectionId=4,
  socketChannel=DefaultSocketChannelWrapper{socketChannel=java.nio.channels.SocketChannel[connected
  local=/127.0.0.1:34802 remote=/127.0.0.1:5702]}, remoteEndpoint=null,
  lastReadTime=2017-01-25 12:30:25.533, lastWriteTime=2017-01-25
  12:30:25.533, closedTime=2017-01-25 12:30:25.533,
  lastHeartbeatRequested=never, lastHeartbeatReceived=never, connected
  server version=null} lost. Reason:
  com.hazelcast.client.AuthenticationException[Invalid credentials!]
  12:30:25.535 [main] WARN
  com.hazelcast.client.spi.impl.ClusterListenerSupport - hz.client_0
  [PAVAN] [3.7.4] Exception during initial connection to
  localhost/127.0.0.1:5702 com.hazelcast.client.AuthenticationException:
  Invalid credentials!  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:525)
  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:507)
  at
  com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:251)
  at
  java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)    at
  com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
  at
  com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
  12:30:25.538 [hz.client_0.internal-2] WARN
  com.hazelcast.client.connection.nio.ClientConnection - hz.client_0
  [PAVAN] [3.7.4] ClientConnection{live=false, connectionId=5,
  socketChannel=DefaultSocketChannelWrapper{socketChannel=java.nio.channels.SocketChannel[connected
  local=/127.0.0.1:58430 remote=/127.0.0.1:5701]}, remoteEndpoint=null,
  lastReadTime=2017-01-25 12:30:25.537, lastWriteTime=2017-01-25
  12:30:25.537, closedTime=2017-01-25 12:30:25.537,
  lastHeartbeatRequested=never, lastHeartbeatReceived=never, connected
  server version=null} lost. Reason:
  com.hazelcast.client.AuthenticationException[Invalid credentials!]
  12:30:25.539 [main] WARN
  com.hazelcast.client.spi.impl.ClusterListenerSupport - hz.client_0
  [PAVAN] [3.7.4] Exception during initial connection to
  localhost/127.0.0.1:5701 com.hazelcast.client.AuthenticationException:
  Invalid credentials!  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:525)
  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:507)
  at
  com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:251)
  at
  java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)    at
  com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
  at
  com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
  12:30:25.545 [hz.client_0.internal-2] WARN
  com.hazelcast.client.connection.nio.ClientConnection - hz.client_0
  [PAVAN] [3.7.4] ClientConnection{live=false, connectionId=6,
  socketChannel=DefaultSocketChannelWrapper{socketChannel=java.nio.channels.SocketChannel[connected
  local=/127.0.0.1:49389 remote=/127.0.0.1:5703]}, remoteEndpoint=null,
  lastReadTime=2017-01-25 12:30:25.542, lastWriteTime=2017-01-25
  12:30:25.541, closedTime=2017-01-25 12:30:25.542,
  lastHeartbeatRequested=never, lastHeartbeatReceived=never, connected
  server version=null} lost. Reason:
  com.hazelcast.client.AuthenticationException[Invalid credentials!]
  12:30:25.545 [main] WARN
  com.hazelcast.client.spi.impl.ClusterListenerSupport - hz.client_0
  [PAVAN] [3.7.4] Exception during initial connection to
  localhost/127.0.0.1:5703 com.hazelcast.client.AuthenticationException:
  Invalid credentials!  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:525)
  at
  com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:507)
  at
  com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:251)
  at
  java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
  at
  java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)    at
  com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
  at
  com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)</p>
  </blockquote>
  <pre><code>public class HCServer {
  
      public static void main(String[] args) {
          System.setProperty(&quot;hazelcast.tcp.join.port.try.count&quot;, &quot;10&quot;);
          String hazelcastGroup = args[0];
          Config config = new Config();
          config.getGroupConfig().setName(hazelcastGroup).setPassword(hazelcastGroup);
          Hazelcast.newHazelcastInstance(config);
      }
  }
  
  
  
  public class HcClient {
      public static void main(String[] args) {
          System.setProperty(&quot;hazelcast.tcp.join.port.try.count&quot;, &quot;10&quot;);
          String hazelcastGroup = args[0];
          ClientConfig clientConfig = new ClientConfig();
          clientConfig.getGroupConfig().setName(hazelcastGroup).setPassword(hazelcastGroup);
          HazelcastClient.newHazelcastClient(clientConfig);
      }
  
  }
  </code></pre>