Modify the cdh cluster ip address (postgresql)

A batch of machines newly purchased by the company need to be moved to a third-party computer room after the company has installed the environment, and the IP address needs to be changed after arriving in the computer room, so I checked the relevant information on Baidu, and referred to a successful blog.

1. First close the cdh cluster and cloudera manager service.

2. Stop cloudera-scm-server.service and cloudera-scm-agent.service

systemctl stop cloudera-scm-server.service

systemctl stop cloudera-scm-server-db.service

All agents are to be stopped.

There are two cases below

3. By default, the management information of the cdh cluster is stored in postgresql.

3.1 View the scm user password of the corresponding database

grep password /etc/cloudera-scm-server/db.properties

3.2 Log in to the database on the CDH Manager management node

psql -h localhost -p 7432 -U scm

At this point, you need to enter the password of the scm user, which is the password in the above step 3.1

3.3 View the host IP in the database

select host_id, host_identifier, name, ip_address from hosts;

3.4 Modify the host IP in turn

update hosts set ip_address='192.168.0.231' where name='slave1';

update hosts set ip_address='192.168.0.232' where name='slave2';

update hosts set ip_address='192.168.0.233' where name='master1';

3.5 Exit the database (:\q)

3.6 Modify the Agent configuration files of all nodes

--Modify the value of server_hosts to the IP of the new CDH Manager management node

vi /etc/cloudera-scm-agent/config.ini

3.7 Modify the /etc/hosts of all nodes and change the IP to the new IP

3.8 Restart the management process and Agent service corresponding to CDH Manager

systemctl restart cloudera-scm-server-db.service

systemctl start cloudera-scm-server.service

systemctl start cloudera-scm-agent.service

3.9 Restart the cluster again

4. The management information of cdh is stored in mysql.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325555434&siteId=291194637