【发布时间】:2018-08-28 12:06:07
【问题描述】:
我使用教程中的vagrant file 运行了 consul 集群。
我添加了第一台机器的“forwarded_port”属性,所以现在看起来像这样
config.vm.define "n1" do |n1|
n1.vm.hostname = "n1"
n1.vm.network "private_network", ip: "172.20.20.10"
n1.vm.network "forwarded_port", guest: 8500, host: 8500
end
为了从主机查看 UI,我添加了 -ui 和 -client 属性以按如下方式运行:
consul agent -server -bootstrap-expect=1 -data-dir=/tmp/consul -node=agent-one
-bind=172.20.20.10 -enable-script-checks=true -config-dir=/etc/consul.d
-ui -client=172.20.20.10
我可以从客人和主人那里卷曲'http://172.20.20.10:8500/ui/'。 但是当我尝试加入时
领事加入 172.20.20.11
我明白了
Error joining address '172.20.20.11': Put
http://127.0.0.1:8500/v1/agent/join/172.20.20.11: dial tcp
127.0.0.1:8500: connect: connection refused .
Failed to join any nodes.
使用客户端属性如何加入集群?
(或者,我怎样才能看到主机的 ui?)。
【问题讨论】: