Redis主从配置异常解决:Error condition on socket for SYNC: Connection refused
来源:互联网 发布:大秦帝国精缩本 知乎 编辑:程序博客网 时间:2024/06/03 09:06
Redis主从配置异常解决:Error condition on socket for SYNC: Connection refused
在Docker中搭建的Redis主从集群时,从服务器上的redis日志报错:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
解决方案:
在redis主服务器上的redis.conf中修改bind字段,将
- 1
- 1
修改为
- 1
- 1
又或者直接注释掉bind字段
- 1
- 1
原因:
如果redis主服务器绑定了127.0.0.1,那么跨服务器IP的访问就会失败,从服务器用IP和端口访问主的时候,主服务器发现本机6379端口绑在了127.0.0.1上,也就是只能本机才能访问,外部请求会被过滤,这是Linux的网络安全策略管理的。如果bind的IP地址是172.168.10.70,那么本机通过localhost和127.0.0.1、或者直接输入命令redis-cli登录本机redis也就会失败了。只能加上本机ip才能访问到。
所以,在研发、测试环境可以考虑bind 0.0.0.0,线上生产环境建议绑定IP地址。
原文地址:http://blog.csdn.net/chwshuang/article/details/54929277
0 0
- Redis主从配置异常解决:Error condition on socket for SYNC: Connection refused
- Redis主从配置异常解决:Error condition on socket for SYNC: Connection refused
- Redis主从配置异常解决:Error condition on socket for SYNC: Connection refused
- 配置redis主从时报错:Error condition on socket for SYNC: Connection refused
- 配置redis主从时报错:Error condition on socket for SYNC: Connection refused
- android socket通信 Connection refused异常
- socket error:[Errno 111]Connection refused 问题
- Android解决异常apk on device '0292bea1': Unable to open sync connection!
- SQL Server JDBC Connection Errors: Error establishing socket, connection refused...
- redis connection refused
- [SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
- 点击pythonIDLE报错Socket error:Connection refused
- error connection refused
- 异常:Listener refused the connection with the follow ing error:
- ERROR: opening port for MGR MGR (Connection refused).
- ERROR: opening port for REPLICAT REPFULL (Connection refused).
- php-fpm监听socket类型-解决Connection refused
- 解决redis connection refused: connect遇到的坑
- Unable to load configuration.
- 1015. Reversible Primes (20)
- eclipse下由于修改了项目名称web.xml出错 Attribute "xmlns" was already specified for element "web-app"
- 浅谈使用NGUI的界面架构(二)关于NData 作者:kUANG tOBY
- mybatis执行原生sql小例子
- Redis主从配置异常解决:Error condition on socket for SYNC: Connection refused
- Opencv学习一
- C/C++中NULL的理解
- 【调试】postman上传文件
- 悼念博客专家雷霄骅七律诗一首
- MATLAB对图像采样
- Spinner下拉列表选择器
- ERROR OGG-01028 Formatting error
- 数据结构和算法概述