Если вы используете:
{
"ports": {
"http": 18500
}
}
Тогда консул по умолчанию свяжется с localhost:
==> Log data will now stream in as it occurs:
2019/02/19 17:28:23 [INFO] raft: Initial configuration (index=1): [{Suffrage:Voter ID:4887467c-c84b-15b4-66f7-ad3f822631e0 Address:172.17.0.2:8300}]
2019/02/19 17:28:23 [INFO] raft: Node at 172.17.0.2:8300 [Follower] entering Follower state (Leader: "")
2019/02/19 17:28:23 [INFO] serf: EventMemberJoin: b884fe85d115.dc1 172.17.0.2
2019/02/19 17:28:23 [INFO] serf: EventMemberJoin: b884fe85d115 172.17.0.2
2019/02/19 17:28:24 [INFO] consul: Adding LAN server b884fe85d115 (Addr: tcp/172.17.0.2:8300) (DC: dc1)
2019/02/19 17:28:24 [INFO] consul: Handled member-join event for server "b884fe85d115.dc1" in area "wan"
2019/02/19 17:28:24 [WARN] agent/proxy: running as root, will not start managed proxies
2019/02/19 17:28:24 [INFO] agent: Started DNS server 127.0.0.1:8600 (tcp)
2019/02/19 17:28:24 [INFO] agent: Started DNS server 127.0.0.1:8600 (udp)
2019/02/19 17:28:24 [INFO] agent: Started HTTP server on 127.0.0.1:18500 (tcp)
Очевидно, что никто из других узлов не сможет подключиться к вашему серверу начальной загрузки.
Вы должны настроить адрес и порт:
{
"addresses": {
"http": "0.0.0.0"
},
"ports": {
"http": 18500
}
}
Теперь вы можете увидеть привязку для любого IP 0.0.0.0/0
==> Log data will now stream in as it occurs:
2019/02/19 17:35:11 [INFO] raft: Initial configuration (index=1): [{Suffrage:Voter ID:ef42f35f-7505-d1fc-3f91-16f144d91fc6 Address:172.17.0.2:8300}]
2019/02/19 17:35:11 [INFO] raft: Node at 172.17.0.2:8300 [Follower] entering Follower state (Leader: "")
2019/02/19 17:35:11 [INFO] serf: EventMemberJoin: ac34230483e0.dc1 172.17.0.2
2019/02/19 17:35:11 [INFO] serf: EventMemberJoin: ac34230483e0 172.17.0.2
2019/02/19 17:35:11 [INFO] agent: Started DNS server 127.0.0.1:8600 (udp)
2019/02/19 17:35:11 [WARN] agent/proxy: running as root, will not start managed proxies
2019/02/19 17:35:11 [INFO] consul: Adding LAN server ac34230483e0 (Addr: tcp/172.17.0.2:8300) (DC: dc1)
2019/02/19 17:35:11 [INFO] agent: Started DNS server 127.0.0.1:8600 (tcp)
2019/02/19 17:35:11 [INFO] consul: Handled member-join event for server "ac34230483e0.dc1" in area "wan"
2019/02/19 17:35:11 [INFO] agent: Started HTTP server on [::]:18500 (tcp)