【问题标题】:How to add a wan consul node to remote server running consul如何将 wan consul 节点添加到运行 consul 的远程服务器
【发布时间】:2020-11-21 10:03:59
【问题描述】:

我的 lon-primary-server ip 是 10.8.0.2 但 consul 正在寻找不同的子网。

{
"node_name": "phl-remote-server",
"bind_addr": "{{GetInterfaceIP \"tun0\"}}",
"ui": true,
"client_addr": "0.0.0.0",
"data_dir": "/tmp/consul",
"datacenter": "phl",
"log_level": "INFO",
"enable_syslog": true,
"enable_debug": true,
"server": true,
"bootstrap_expect": 1,
"leave_on_terminate": false,
"skip_leave_on_interrupt": true,
"rejoin_after_leave": true,
"advertise_addr": "{{GetInterfaceIP \"eth0\"}}",
"advertise_addr_wan": "{{GetInterfaceIP \"tun0\"}}",
"retry_join_wan": ["lon-primary-server"]
}

11 月 21 日 15:26:39 phl-pi-3 consul[1401]:
2020-11-21T15:26:39.897+0530 [WARN] 代理:加入集群失败,将 重试:集群=WAN retry_interval=30s 错误=11 月 21 日 15:26:39 phl-pi-3 领事[1401]:2020-11-21T15:26:39.897+0530 [警告] agent.server.memberlist.wan:成员列表:解析失败 lon-primary-server:在 192.168.1.1:53 上查找 lon-primary-server:否 11 月 21 日 15:26:39 phl-pi-3 consul[1401]: 2020-11-21T15:26:39.897+0530 [WARN] 代理:(WAN)无法加入:number_of_nodes=0 error="1 error 发生了: * 无法解析 lon-primary-server:在 192.168.1.1:53 上查找 lon-primary-server:否 这样的主机

我在配置中做错了什么?为什么 retry_join_wan 没有在 wan 中寻找节点?

【问题讨论】:

    标签: consul


    【解决方案1】:

    serf_wan 配置选项设置为与advertise_addr_wan 中使用的地址相同的地址,以便Consul 绑定到正确的WAN 通信接口。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-10
      • 1970-01-01
      相关资源
      最近更新 更多