首页 > 解决方案 > 领事用户界面不显示

问题描述

在 Ubuntu 18.04 上运行单节点 Consul (v1.8.4)。领事服务已启动,我已将 ui 设置为 true(默认)。但是当我尝试访问http://192.168.37.128:8500/ui 此站点时无法访问192.168.37.128 took too long to respond.

ui.json

{
"addresses": {
"http": "0.0.0.0"
  }
}

consul.service file:

【单位】Description=Consul Documentation=https://www.consul.io/ 【服务】ExecStart=/usr/bin/consul agent –server –ui –data-dir=/temp/consul –bootstrap-expect=1 – node=vault –bind=–config-dir=/etc/consul.d/ ExecReload=/bin/kill –HUP $MAINPID LimitNOFILE=65536 [安装] WantedBy=multi-user.target

systemctl status consul

    ● consul.service - Consul
       Loaded: loaded (/etc/systemd/system/consul.service; disabled; vendor preset: enabled)
       Active: active (running) since Sun 2020-10-04 19:19:08 CDT; 50min ago
         Docs: https://www.consul.io/
     Main PID: 9477 (consul)
        Tasks: 9 (limit: 4980)
       CGroup: /system.slice/consul.service
               └─9477 /opt/consul/bin/consul agent -server -ui -data-dir=/temp/consul -bootstrap-expect=1 -node=vault -bind=1
    
agent.server.raft: heartbeat timeout reached, starting election: last-leader=
agent.server.raft: entering candidate state: node="Node at 192.168.37.128:8300 [Candid
agent.server.raft: election won: tally=1                
agent.server.raft: entering leader state: leader="Node at 192.168.37.128:8300 [Leader]
agent.server: cluster leadership acquired               
agent.server: New leader elected: payload=vault         
agent.leader: started routine: routine="federation state anti-entropy"  
agent.leader: started routine: routine="federation state pruning"   
agent.leader: started routine: routine="CA root pruning"        
agent: Synced node info     

            

显示绑定在192.168.37.128:8300

标签: user-interfaceconsulhashicorp-vault

解决方案


这个问题是防火墙,必须在 8500 上打开防火墙 sudo ufw allow 8500/tcp


推荐阅读