代码改变世界

Could not connect to Redis at xxx.xxx.xxx.xxx:6379: Connection refused

2017-11-20 12:36  abce  阅读(393)  评论(0编辑  收藏  举报

开发发来消息说测试环境的redis无法登录:

#  redis-cli -p 6379 -h xxx.xxx.xxx.xxx
Could not connect to Redis at xxx.xxx.xxx.xxx:6379: Connection refused
Could not connect to Redis at xxx.xxx.xxx.xxx:6379: Connection refused
not connected> exit

 

看了一下配置文件,发现bind的配置为:

bind 127.0.0.1

  

修改一下配置文件即可:

bind 127.0.0.1 xxx.xxx.xxx.xxx #xxx.xxx.xxx.xxx是redis所在的服务器的地址