Redis.clients.jedis.exceptions.JedisConnectionException:Could not get a resource from the pool
Source: Internet
Author: User
Redis Remote connection times wrong
I installed Redis on a remote server (Ubuntu system) and encountered the following problems when I visited locally:
Redis.clients.jedis.exceptions.JedisConnectionException:Could not get a resource from the pool
At Redis.clients.util.Pool.getResource (pool.java:22)
At Utils.redis.JedisUtil.getJedis (jedisutil.java:96)
At Utils.redis.TestCase.Hello (testcase.java:50)
At Utils.redis.TestCase.main (testcase.java:45)
caused By:redis.clients.jedis.exceptions.JedisConnectionException:java.net.ConnectException:Connection refused: Connect
At Redis.clients.jedis.Connection.connect (connection.java:134)
At Redis.clients.jedis.BinaryClient.connect (binaryclient.java:69)
At Redis.clients.jedis.BinaryJedis.connect (binaryjedis.java:1665)
At Redis.clients.jedis.jedispool$jedisfactory.makeobject (jedispool.java:72)
At Org.apache.commons.pool.impl.GenericObjectPool.borrowObject (genericobjectpool.java:1148)
At Redis.clients.util.Pool.getResource (pool.java:20)
... 3 more
caused By:java.net.ConnectException:Connection refused:connect
At Java.net.DualStackPlainSocketImpl.waitForConnect (Native method)
At Java.net.DualStackPlainSocketImpl.socketConnect (dualstackplainsocketimpl.java:85)
At Java.net.AbstractPlainSocketImpl.doConnect (abstractplainsocketimpl.java:345)
At Java.net.AbstractPlainSocketImpl.connectToAddress (abstractplainsocketimpl.java:206)
At Java.net.AbstractPlainSocketImpl.connect (abstractplainsocketimpl.java:188)
At Java.net.PlainSocketImpl.connect (plainsocketimpl.java:172)
At Java.net.SocksSocketImpl.connect (sockssocketimpl.java:392)
At Java.net.Socket.connect (socket.java:589)
At Redis.clients.jedis.Connection.connect (connection.java:129)
... 8 more
Java.lang.NullPointerException
At Utils.redis.TestCase.Hello (testcase.java:53)
At Utils.redis.TestCase.main (testcase.java:45)
When the Redis is installed, the Redis configuration file is bound to the IP by default, so we have to go to the system to find the bind 127.0.0.1 and then comment it out, then we can connect
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