Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException:解决方法


  1.在自己的服务器中找到redis的配置文件 redis.conf

    使用命令vi redis.conf或vim redis.conf

    1.注释掉127.0.0.1

 

 原因:bind 127.0.0.1生效,只能本机访问redis

 

    2.将 protected-mode yes 改为:protected-mode no (原因:把yes改成no,允许外网访问)

  

 

     3. /sbin/iptables -I INPUT -p tcp --dport 6379 -j ACCEPT

    redis默认端口号6379是不允许进行远程连接的,所以在防火墙中设置6379开启远程服务;


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to ;XX.XX.XX.XX:6379] with root cause Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 106.xx.xxx229:6379 解决redis 报错:Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException redis 连接失败问题报错 Caused by: io.lettuce.core.RedisConnectionException: Unable to connect to 10.0.023.3:6379 redis问题解决 Caused by: io.lettuce.core.RedisException: io.lettuce.core.RedisConnectionException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specifie [解决]spring-boot连接redis报连接超时问题Unable to connect to Redis; nested exception is io.lettuce.core.RedisCommandTimeoutException: Command timed out Redis报错: Caused by: io.lettuce.core.RedisConnectionException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, ... springboot2集成redis5报错:io.lettuce.core.RedisException: io.lettuce.core.RedisConnectionException: DENIED Redis is running in protected 解决springboot连接Redis出现 Redis exception; nested exception is io.lettuce.core.RedisException: java.io.IOException: 远程主机强迫关闭了 Redis:nested exception is io.lettuce.core.RedisException: java.io.IOException: 远程主机强迫关闭了一个现有的连接
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM