代码之家  ›  专栏  ›  技术社区  ›  Bick

在流浪者上运行时无法浏览执政者用户界面(来自执政者教程)

  •  0
  • Bick  · 技术社区  · 6 年前

    vagrant file 从教程中。

    我添加了第一台机器的“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.  
    

    使用client属性时如何加入集群?
    (或者,如何从主机查看ui?)。

    1 回复  |  直到 6 年前
        1
  •  0
  •   N A    6 年前

    在分别启动服务器节点之后,我运行了一个单独的代理,用以下命令运行ui。

    consul agent -ui -bind=172.20.20.11 -data-dir=/tmp/consul -node=agent-two -config-dir=/etc/consul.d -client=0.0.0.0
    

    之后,我使用

    consul join 172.20.20.10