redis:JedisConnectionException: Failed connecting to 192.168.xxx.x:6379的问题

redis:JedisConnectionException: Failed connecting to 192.168.xxx.x:6379的问题

可能原因:
1 redis.conf 未修改
2 linux的防火墙未关闭
3 redis未启动

解决方案:
1 修改redis.conf文件:注释掉bind 设置protected为no
注释掉bind
设置为no
2 关闭防火墙

systemctl stop firewalld.servic

3启动redis

redis-cli -p 6379

测试:
成功!
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43952288/article/details/115732383