title: AuthenticationException: Invalid credentials! When using right credentials with Hazelcast
body: <p>So I'm using Hazelcast to create a Server and a Client. 
  Turns out I get the following exception when trying to run the client.</p>
  
  <pre><code>WARNING: hz.client_0 [56086-56015-56176] [3.7.8] Exception during initial connection to /192.168.1.112:5706
  com.hazelcast.client.AuthenticationException: Invalid credentials!
      at com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:530)
      at com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$2.onResponse(ClientConnectionManagerImpl.java:513)
      at com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:251)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
      at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
  </code></pre>
  
  <p>The error comes from:</p>
  
  <pre><code>ClientConfig hzConfig = getHzConfig();
  hz = HazelcastClient.newHazelcastClient(hzConfig);
  </code></pre>
  
  <p>getHzConfig:</p>
  
  <pre><code>private static ClientConfig getHzConfig() {
      String addresses = Optional.ofNullable(System.getProperty("addresses")).orElseThrow(IllegalArgumentException::new);
      String addressList[] = addresses.split(";");
  
      ClientConfig clientConfig = new ClientConfig();
      clientConfig.setGroupConfig(new GroupConfig("56086-56015-56176", "56086-56015-56176")); 
  
      ClientNetworkConfig networkConfig = clientConfig.getNetworkConfig();
  
      for (String address : addressList) {
          networkConfig.addAddress(address);
      }
  
      return clientConfig;
  }
  </code></pre>
  
  <p>Here's my <a href="https://pastebin.com/r0cLi7sQ" rel="nofollow noreferrer">hazelcast.xml</a></p>