Mac下安装 redis 报Test replication partial resync: ok psync (diskless: yes, reconnect: 1)

mac 下安装 redis-3.2.8 执行  sudo make test编译的时候报如下错误

!!! WARNING The following tests failed:
*** [err]: Test replication partial resync: ok psync (diskless: yes, reconnect: 1) in tests/integration/replication-psync.tcl
Expected condition '[s -1 sync_partial_ok] > 0' to be true ([s -1 sync_partial_ok] > 0)
Cleanup: may take some time... OK
make[1]: *** [test] Error 1
make: *** [test] Error 2

解决方法

在 redis-3.2.8 目录下

vi tests/integration/replication-psync.tcl 

到代码哪个100的地方,按 i 编辑 修改为500,然后按 :wq 保存退出

            test "Test replication partial resync: $descr (diskless: $diskless, reconnect: $reconnect)" {
                # Now while the clients are writing data, break the maste-slave
                # link multiple times.
                if ($reconnect) {
     
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用的内容,你可以进入`etc`目录,找到`redis.conf`文件,并修改第128行的`daemonize`配置为`yes`,这样就可以将Redis默认启动为后台运行。这个修改可以解决一些连接问题,例如引用中提到的`Could not connect to Redis at node1:6379: Connection refused`错误。 此外,这个错误可能还有其他原因导致。比如,Redis服务未正确启动、Redis服务所在的机器无法访问、防火墙阻止了对Redis端口的访问等等。你可以检查一下以下几个方面来解决这个问题: 1. 确保Redis服务已正确启动。你可以通过命令`redis-cli ping`来检查Redis是否正常运行。如果返回`PONG`,表示Redis服务器已经启动。如果返回`Could not connect to Redis at node1:6379: Connection refused`,则说明Redis服务未启动或无法连接。 2. 检查Redis服务所在的机器是否能够访问。确保你所连接的机器能够通过网络访问到Redis服务所在的机器。可以尝试使用命令`ping node1`来检查网络连通性,如果没有回应或者显示连接超时,则说明网络连接存在问题。 3. 检查防火墙配置。如果你的机器上使用了防火墙,可能会阻止对Redis端口的访问。你可以检查一下防火墙配置,确保Redis端口(默认为6379)是开放的。 综上所述,你可以按照以上方法逐一排查问题,找到导致`Could not connect to Redis at node1:6379: Connection refused`错误的原因并进行相应的修复。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值