5
votes

I'm getting the following error when I try to persist something in Redis db from my java spring project.

Nested in org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

Has anyone faced the same error? Any solutions available?

Thanks in advance.

3
it looks like it cannot connect to the redis server. maybe the url is not right? - akonsu
The db is in local only. url is localhost:6379 - KS88
can you connect to it when you run redis-cli? - akonsu
yes. It is connecting via console - KS88
Have you tried setting "usePool" to false on JedisConnectionFactory to narrow down the problem? - Jennifer Hickey

3 Answers

1
votes

The redis server is properly down. just restart redis-server.

0
votes

Seems that jedis doesn't connect to localhost, try to connect to real IP. I've had the same issue and found that though redis-cli connects to localhost and 127.0.0.1, Jedis can connect only to real IP.

0
votes

I had the same problem, which was because of the Windows Firewall. Try to disable it or add an inbound rule.