Modify the IP address, hostName, and cdh5hostname of the host node in the cdh5 cluster.
Preface
When using the cdh cluster, it is inevitable that the node IP address or hostName changes due to some irresistible reasons, and the cm monitoring interface cannot complete these tasks, however, cm stores all host information in the hosts table of the postgresql database,
Now let's modify the hosts to complete this operation.
Step 1: Disable the service
1. Disable the cluster Service and Cloudera Management Service,
2. Disable cm service: (cm installation node)
Command: service cloudera-scm-server stop
Service cloudera-scm-agent stop (not negligible)
Step 2: log on to the postgresql database and modify the node IP Address
1. Obtain the postgresql Login Password
Command: grep password/etc/cloudera-scm-server/db. properties
2. log on to the database (similar to logging on to mysql)
Command: psql-h localhost-p 7432-U scm (Press enter to enter the password of the first step)
Step 3: view and modify the node IP Address
1. View IP information
Command: select host_id, name, ip_address from hosts;
2. Modify IP information (similar to hostName)
Command: update hosts set (ip_address) = ('your _ ip') where host_id = x;
3. Exit
Command: \ q
4. Start the service and check whether the cm interface is modified successfully.