redis连接出现Could not connect to Redis at xx.xx.xx.xx:6379: No route to host解决方法

引起这个问题的原因是防火墙:

[root@localhost bin]# ./redis-cli -h 192.168.25.153 -p 6379
Could not connect to Redis at 192.168.25.153:6379: No route to host
not connected> quit

[root@localhost bin]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
[root@localhost bin]# 

猜你喜欢

转载自blog.csdn.net/u010503822/article/details/89065298