title: Jedis connecting to redis: JedisConnectionException
body: <p>I am trying to connect a jedis client application to a remote redis server. Attached is the code for the client:</p>
  
  <pre><code>public static void main(String[] args) {
  
      Jedis jedis = new Jedis("192.168.1.40",9124);   
      if(jedis.isConnected())
          System.out.println("connected");
      jedis.ping();
  }
  </code></pre>
  
  <p>The code worked fine earlier and used to work fine. But suddenly there seems to be a problem with the application. I am getting the following stack trace when running it now:</p>
  
  <pre><code>Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: Unknown reply: 
  at redis.clients.jedis.Protocol.process(Protocol.java:141)
  at redis.clients.jedis.Protocol.read(Protocol.java:200)
  at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:285)
  at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:184)
  at redis.clients.jedis.BinaryJedis.ping(BinaryJedis.java:66)
  at TestJedis.main(TestJedis.java:43)edis.BinaryJedis.ping(BinaryJedis.java:66)
  at TestJedis.main(TestJedis.java:43)
  </code></pre>
  
  <p>I have checked my remote server. It is running local clients are able to access the server. The jedis client is able to connect to the server but it cannot execute any command on redis. not able to ping the remote server and had it been a connectivity issue, it would have given a socket timeout error. I am not able to figure out the cause of this problem. Can anyone please help me resolve this issue?</p>
  
  <p>Thanks in advance!</p>