Objective
In the use of CDH cluster process, it will inevitably cause the node IP or hostname changes due to some irresistible reasons, and CM's monitoring interface can not complete these things, but CM will all the hosts in the cluster information is in the PostgreSQL database hosts table,
Now let's do this by modifying the hosts.
The first step is to close the service
1. Turn off the Cluster service, and Cloudera Management services,
2. Close cm Service: (CM installation node)
Command: Service Cloudera-scm-server stop
Service Cloudera-scm-agent Stop (not available to ignore)
Second step, log in PostgreSQL database, modify the node IP
1. Get the login password for PostgreSQL
Command: grep password/etc/cloudera-scm-server/db.properties
2. Log in to the database (similar to login MySQL)
command: psql-h localhost-p 7432-u SCM (Enter the password for the first step)
Step three, view and modify the node IP
1. View IP Information
Command: Select host_id, Name, ip_address from hosts;
2. Modify IP information (hostname similar)
Command: Update hosts set (ip_address) = (' Your_ip ') where host_id=x;
3. Exit
Command: \q
4. Start the service to see if the CM interface has been modified successfully.
Modify the host node IP or hostname in the CDH5 cluster