I set up a 01-machines.json with one host (server0), I can ssh to server0 from the management node (master0). I get an error in the UI saying A compatible version of Cockpit is not installed on 192.168.66.17.
It has the same exact version, so the error is misleading. I can reach the UI on server0:9090 with the same creds (cockpit/password), no that isn't the password.
{
"server0": {
"address": "192.168.66.17",
"visible": true,
"color": "green"
}
}
I don't see anything in the logs on master0 or server0 to see what is happening. The user I connect with in the UI is the same on server0, it is in the wheel group and has passwordless 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 ~]#
I had the same problem, and solved with this:
In master server, I installed the dashoard. In CentOS the you can install with:
sudo yum install cockpit-dashboard
This will enable the dashboard and allow you to add new server from dashboard UI.
In all other servers, you have to install the cockpit following the official doc: Official doc to install Dockpit
If you are running a centOS, just run:
sudo yum install cockpit
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --permanent --zone=public --add-service=cockpit
sudo firewall-cmd --reload
After this, in dashboard on master server you will be able to add the new server
With this aproach, you don't need to use the /etc/cockpit/machines.d/ json files