centos7 cockpit 176 无法添加远程主机

centos7 cockpit 176 can't add remote hosts

我用一台主机(server0)设置了一个01-machines.json,我可以从管理节点(master0)ssh到server0。我在 UI 中收到一个错误,说 A compatible version of Cockpit is not installed on 192.168.66.17. 它具有完全相同的版本,因此该错误具有误导性。我可以使用相同的凭据 (cockpit/password 在 server0:9090 上访问 UI,不,那不是密码。

{
        "server0": {
          "address": "192.168.66.17",
          "visible": true,
          "color": "green"
      }
}

我在 master0 或 server0 上的日志中没有看到任何内容,无法了解发生了什么。我在 UI 中连接的用户在 server0 上是相同的,它在 wheel 组中并且具有无密码 sudo

# ssh cockpit@192.168.66.17
cockpit@192.168.66.17's password: 
Last login: Wed Oct 24 14:16:18 2018 from 192.168.0.20
[cockpit@app-node-0 ~]$ sudo su -
Last login: Wed Oct 24 14:16:58 UTC 2018 on pts/1
[root@app-node-0 ~]# 

所以只安装cockpit是不包含dashboard的,还需要安装cockpit-dashboard

我遇到了同样的问题,解决了这个问题:

主服务器中,我安装了仪表板。 在 CentOS 中,您可以安装:

sudo yum install cockpit-dashboard

这将启用仪表板并允许您从仪表板添加新服务器 UI。


在所有其他 服务器 中,您必须按照官方文档安装驾驶舱: Official doc to install Dockpit

如果你运行正在安装 centOS,只需 运行:

sudo yum install cockpit

sudo systemctl enable --now cockpit.socket

sudo firewall-cmd --permanent --zone=public --add-service=cockpit
sudo firewall-cmd --reload

之后,在 主服务器 的仪表板中,您将能够添加新的 服务器


使用此方法,您无需使用 /etc/cockpit/machines.d/ json 文件