【java异常】redis.clients.jedis.exceptions.JedisConnectionException: Could not get a res

The reason for this error is usually:

 A, Redis does not start;

I once encountered such a problem. sweat!

Second, the firewall reasons unable to connect to Redis;

1, the server firewall inbound rules.

2, outbound rules of the host access Redis application resides.

Three, IP address or port error

Fourth, after Jedis objects used up, to relieve, to prevent would have been occupied, so there will be unable to obtain new resources.

Five, Spring Boot project, the lack of dependence

If you use Redis and Spring Boot, also throw this exception.
If you are using Spring Boot, then Redis dependency is not enough,
you also need to manually download and install redis.io Redis, and then run from the terminal

Guess you like

Origin www.cnblogs.com/xiangtunmizu/p/11926858.html