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永久开启