1 redis.clients.jedis.exceptions.JedisDataException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions
解决办法:
方法一
查看当前redis服务是否开启protected-mode
>config get protected-mode;
>yes
方法二
○ 要不就关闭redis服务,重新确定加载的redis**.conf配置文件;
○ 要不临时关闭protected-mode
>config set protected-mode no
2 connection timeout/connection refused
解决办法:
检查当前服务器的centos6.x的防火墙是否开启;
如果开启将其关闭,或者选择对外开放端口
#service iptables status查看防火墙状态
#service iptables stop临时关闭防火墙
#service iptables start 临时开启
#chkconfig iptables off永久关闭
#chkconfig iptables on永久开启
本文详细介绍了如何解决Redis在运行中遇到的连接问题和配置问题,包括如何处理DENIED错误,通过调整protected-mode设置来允许外部连接,以及解决connectiontimeout和connectionrefused错误的方法,如检查并配置防火墙。
642

被折叠的 条评论
为什么被折叠?



