gpt4 book ai didi

consul - 服务器重启后如何重新加入consul客户端到服务器?

转载 作者:行者123 更新时间:2023-12-02 05:43:49 24 4
gpt4 key购买 nike

我已经启动了服务器(单节点)。并加入客户端。

# consul members
Node Address Status Type Build Protocol DC
v-ansible 172.16.10.11:8301 alive server 0.5.2 2 dc1
v-php-cron 172.16.10.217:8301 alive client 0.5.2 2 dc1

然后我重新启动服务器。在服务器上我看到:

# consul members
Node Address Status Type Build Protocol DC
v-ansible 172.16.10.11:8301 alive server 0.5.2 2 dc1

在客户端:

# consul members
Node Address Status Type Build Protocol DC
v-php-cron 172.16.10.217:8301 alive client 0.5.2 2 dc1
v-ansible 172.16.10.11:8301 left server 0.5.2 2 dc1

客户端日志中:

2015/11/05 17:35:05 [INFO] consul: adding server v-ansible (Addr: 172.16.10.11:8300) (DC: dc1)
2015/11/05 17:38:14 [INFO] serf: EventMemberLeave: v-ansible 172.16.10.11
2015/11/05 17:38:14 [INFO] consul: removing server v-ansible (Addr: 172.16.10.11:8300) (DC: dc1)
2015/11/05 17:39:45 [ERR] agent: failed to sync remote state: No known Consul servers
2015/11/05 17:40:11 [ERR] agent: failed to sync remote state: No known Consul servers
2015/11/05 17:40:30 [ERR] agent: failed to sync remote state: No known Consul servers

为什么服务器停留在左侧状态?如何让客户端自动重新加入服务器?

最佳答案

skip_leave_on_interrupt 选项解决了我的问题。如果skip_leave_on_interrupt=True(默认),服务器在重新启动期间向集群发送LEAVE

关于consul - 服务器重启后如何重新加入consul客户端到服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33547443/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com