JAVA-Redis连接报错:JedisConnectionException: Could not get a resource from the pool

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
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Failed connecting to host 192.168.1.86:6379

JAVA-Redis连接报错:JedisConnectionException: Could not get a resource from the pool_第1张图片

起服务报这个,回去看了眼nacos

JAVA-Redis连接报错:JedisConnectionException: Could not get a resource from the pool_第2张图片

host改回127.0.0.1就ok

如果要用域名,就需要开放连接,在redis配置文件中去改,本地的话,找到conf文件

JAVA-Redis连接报错:JedisConnectionException: Could not get a resource from the pool_第3张图片

JAVA-Redis连接报错:JedisConnectionException: Could not get a resource from the pool_第4张图片 

 将上面bind 127.0.0.1注释掉,然后protected-mode 改为no

重启redis,重启服务,启动成功~~~

你可能感兴趣的:(redis,redis,java)