Environment Description:
Redis Server System: Ubuntu IP 192.168.10.9port 63,792 PCs: One as a dedicated server, one for the development environment
Connect a Redis server with simple code like this
Import Redis.clients.jedis.jedis;public class Test {public static void main (string[] args) {Jedis Jedis = new Jedis ("192.1 68.10.9 "); Jedis.auth (" ldd "); Jedis.set (" Age "," 1 "); System.out.println (Jedis.get ("Age"));}}
However, the following exception occurred:
Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException:java.net.SocketTimeoutException : Read timed Outat redis.clients.jedis.Protocol.process (protocol.java:79) at Redis.clients.jedis.Protocol.read ( protocol.java:131) at Redis.clients.jedis.Connection.getStatusCodeReply (connection.java:162) at Redis.clients.jedis.BinaryClient.connect (binaryclient.java:72) at Redis.clients.jedis.Connection.sendCommand ( connection.java:79) at Redis.clients.jedis.Connection.sendCommand (connection.java:75) at Redis.clients.jedis.BinaryClient.auth (binaryclient.java:499) at Redis.clients.jedis.Jedis.auth (jedis.java:1963) At Testfinal. Test.main (test.java:8) caused By:java.net.SocketTimeoutException:Read timed Outat Java.net.SocketInputStream.socketRead0 (Native Method) at Java.net.SocketInputStream.socketRead ( socketinputstream.java:116) at Java.net.SocketInputStream.read (socketinputstream.java:170) at Java.net.SocketInputStream.read (socketinputstream.java:141) at Java.net.SocketInputStream.read (socketinputstream.java:127) at Redis.clients.util.RedisInputStream.fill (redisinputstream.java:109) at Redis.clients.util.RedisInputStream.readByte (redisinputstream.java:45) at Redis.clients.jedis.Protocol.process ( protocol.java:64) ... 8 more
The point is that you can connect normally with the client.
Really, we need to look into the reasons.
I don't know if I have any friends who can tell twos.
About Jedis connectivity problems with Redis