Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException:解决办法、
学习springboot整合redis的时候连不上linux虚拟机的redis数据库
尝试了很多办法也无用
vim redis.conf
修改 protected-mode yes 改为:protected-mode no
注释掉 #bin 127.0.0.1
都没有用的情况下
就是linux 的防火墙的问题
1)检查防火墙状态
[root@localhost bin]# /etc/init.d/iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all – 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp – 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all – 0.0.0.0/0 0.0.0.0/0
4 ACCEPT tcp – 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 ACCEPT tcp – 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:8080
6 ACCEPT tcp – 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:3306
7 ACCEPT tcp – 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:6379
8 REJECT all