处理Jedis timeout 异常
Jedis rClient = new Jedis("localhost");
解决步骤
- 关闭linux防火墙
systemctl stop firewalld.service
- 关闭redis保护模式(protected mode)
[root@CentOS7 redis-3.2.6]# src/redis-cli
127.0.0.1:6379> CONFIG SET protected-mode no
OK
Jedis rClient = new Jedis("localhost");
systemctl stop firewalld.service
[root@CentOS7 redis-3.2.6]# src/redis-cli
127.0.0.1:6379> CONFIG SET protected-mode no
OK
转载于:https://www.cnblogs.com/Zhongzz/p/10180395.html