About Jedis connectivity problems with Redis

Source: Internet
Author: User
Tags dedicated server redis server

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.