New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not get a resource from the pool #7
Comments
I used redis 3.0.3 with centos 6.2 |
Have you config the redis.properties file? |
I had the same problem as you.Finally i debug the source code, and found that there is a bug. |
solve the problem:Could not get a resource from the pool mybatis#7
Hi all. The line "jedisConfig.setHost("localhost");" was indeed wrong but made no difference because the value was lately overwritten by the "host" property from the config file. Moreover, if there was no "host" property "localhost" will be set by default in RedisConfig. So if you are getting a connection proproblem I would 1st check your host and port are right in your propierties file as @live106 pointed. |
When i use redis-cache in my project ,it throws exception,as you see,"Could not get a resource from the pool".
this is more infomation
Cause: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool] with root cause
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(DualStackPlainSocketImpl.java)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at redis.clients.jedis.Connection.connect(Connection.java:144)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:71)
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1783)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:65)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
at redis.clients.util.Pool.getResource(Pool.java:40)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:84)
The text was updated successfully, but these errors were encountered: