A host can only exist in one Cluster at a time.
If an "Add Existing Cluster"-job fails, and a subsequent retry throws the error:
"Host 188.8.131.52:nnnn is already in an other cluster."
Then you can do the following things in order
- Check if you have an /etc/cmon.d/cmon_X.cnf file that contains the hostname and remove the file:
- Delete the host from server_node, mysql_server, and hosts table.
mysql -ucmon -p -h127.0.0.1
DELETE FROM server_node WHERE hostname='184.108.40.206';
DELETE FROM mysql_server WHERE hostname='220.127.116.11';
DELETE FROM hosts WHERE hostname='18.104.22.168';
- Restart cmon:
service cmon restart
You may have to execute the deletion several times for each hostname/IP of the cluster you are trying to add
The '22.214.171.124' is an example address.
The X in cmon_X.cnf should be replaced by a number.
Be careful to not remove the wrong cmon_X.cnf file