title: How to connect to a Docker Redis cluster instance using jedis for Java?
body: <p>I have created a cluster of 6 nodes using redis docker-compose (3 master and 3 slave) and also linked all of them.
  cluster info</p>
  
  <pre><code>cluster_state:ok
  cluster_slots_assigned:16384
  cluster_slots_ok:16384
  cluster_slots_pfail:0
  cluster_slots_fail:0
  cluster_known_nodes:5
  cluster_size:3
  cluster_current_epoch:6
  cluster_my_epoch:1
  cluster_stats_messages_ping_sent:23
  cluster_stats_messages_pong_sent:31
  cluster_stats_messages_meet_sent:1
  cluster_stats_messages_sent:55
  cluster_stats_messages_ping_received:26
  cluster_stats_messages_pong_received:24
  cluster_stats_messages_meet_received:5
  cluster_stats_messages_received:55
  </code></pre>
  
  <p>cluster nodes</p>
  
  <pre><code>d794a9ab002f0c3cb699ce68a09310dd0fdb17de 192.168.65.3:32789@32783 slave c6c05515c3be01a1438b6d2aad823c0fa50b1743 0 1586629088989 5 connected
  7d4fab850bcfac8754a559c5e9469698b7f182bc 192.168.65.3:32792@32787 master - 0 1586629087000 2 connected 5461-10922
  c6c05515c3be01a1438b6d2aad823c0fa50b1743 192.168.65.3:32793@32788 master - 0 1586629089995 4 connected 10923-16383
  229b9b4f919f79a1c24b7b849c42acb9e3378532 192.168.65.3:32790@32785 slave 9b649a67dc53084ed7416b20e8bab00289e636d2 0 1586629089000 6 connected
  9b649a67dc53084ed7416b20e8bab00289e636d2 192.168.65.3:32791@32786 myself,master - 0 1586629086000 1 connected 0-5460
  </code></pre>
  
  <p>As shown above the cluster seems to be working but when I try to call the cluster instance in a java application using jedis by using the code</p>
  
  <pre><code>jedis = new JedisCluster(new HostAndPort("0.0.0.0", 32790));
  jedis.set("events/city/rome", "32,15,223,828");
  </code></pre>
  
  <p>then I get the following error</p>
  
  <pre><code>Exception in thread "main" redis.clients.jedis.exceptions.JedisClusterMaxAttemptsException: No more cluster attempts left.
      at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:86)
      at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:124)
      at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:124)
      at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:124)
      at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:124)
      at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:124)
      at redis.clients.jedis.JedisClusterCommand.run(JedisClusterCommand.java:25)
      at redis.clients.jedis.JedisCluster.set(JedisCluster.java:112)
      at sc.dev.algordf.ALGORDF.main(ALGORDF.java:53)
  </code></pre>
  
  <p>Please help me find out what could be the problem. Is it because I have not specified the right IP and port number when creating a jedis instance. Or is it something that I am missing.</p>
  
  <p>Thanks.</p>