Wednesday, April 29, 2015

Cloudera Manager - How to Update Host IP Address

In order to update host IP in your Hadoop cluster, you need to connect to whatever DB your cloudera manager is using. I use postgresql. If you don't know, check the "/etc/cloudera-scm-server/db.properties" file:
# cat /etc/cloudera-scm-server/db.properties
# Auto-generated by scm_prepare_database.sh
com.cloudera.cmf.db.type=postgresql
com.cloudera.cmf.db.host=localhost:7432
com.cloudera.cmf.db.name=scm
com.cloudera.cmf.db.user=scm
com.cloudera.cmf.db.password=password

Log into the postgres DB:
# psql -h localhost -U scm -p 7432
Password for user scm:
psql (version)
Type "help" for help.

Check IP address:
scm=> select * from "hosts";

Update:
scm=> update hosts set ip_address = '192.168.200.223' where host_id=5;

You should be able to see the new IP in your CM "Hosts" tab.

No comments: