title: Unable to connect redis sentinel using jedis
body: <p>I am trying to connect to redis sentinel using JedisSentinelPool</p>
  
  <pre><code>private static final JedisSentinelPool pool = new JedisSentinelPool("mymaster", getSentinels());
  
  private static Set&lt;String&gt; getSentinels(){
  
      Set&lt;String&gt; mysentinels = new HashSet&lt;&gt;();
      mysentinels.add(new HostAndPort("localhost", 26379).toString());
      return mysentinels;
  }
  </code></pre>
  
  <p>This gives me following error : </p>
  
  <blockquote>
    <p>Caused by: redis.clients.jedis.exceptions.JedisConnectionException: All sentinels down, cannot determine where is mymaster master is running...</p>
  </blockquote>
  
  <p>However, I can see that my sentinel is running. So referring to this post:
  <a href="https://github.com/luin/ioredis/issues/64" rel="nofollow noreferrer">https://github.com/luin/ioredis/issues/64</a>
   I tried the below command on my redis master server</p>
  
  <pre><code>./redis-cli -h redis-1 -p 26379
  </code></pre>
  
  <p>I got following error: </p>
  
  <blockquote>
    <p>Could not connect to Redis at redis-1:26379: nodename nor servname provided, or not known</p>
  </blockquote>
  
  <p>What is the issue here?</p>