Pivotal "HDB init" fail after hostname change
search cancel

Pivotal "HDB init" fail after hostname change

book

Article ID: 294954

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

Symptoms:

The name of the server which is going to host HDB is changed from vmcentos to sdw1. Then running "HDB init" to initialize an HDB system fails as shown below:

[gpadmin @sdw1 greenplum-db]$ /etc/init.d/hawq init
20130826:20:30:30:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Checking configuration parameters, please wait...
/bin/mv: cannot move `/tmp/cluster_tmp_file.24529' to `/etc/gphd/hawq/conf/gpinitsystem_config': Permission denied
20130826:20:30:31:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Reading Greenplum configuration file /etc/gphd/hawq/conf/gpinitsystem_config
20130826:20:30:31:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Locale has not been set in /etc/gphd/hawq/conf/gpinitsystem_config, will set to default value
20130826:20:30:31:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Locale set to en_US.utf8
20130826:20:30:31:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Detected a single host GPDB array build, reducing value of BATCH_DEFAULT from 60 to 4
20130826:20:30:31:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Use the default temp directory
20130826:20:30:31:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Checking configuration parameters, Completed
20130826:20:30:31:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Commencing multi-home checks, please wait...
.
20130826:20:30:32:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Configuring build for standard array
20130826:20:30:32:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Commencing multi-home checks, Completed
20130826:20:30:32:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Building primary segment instance array, please wait...
..
20130826:20:30:33:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Checking Master host
20130826:20:30:33:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Checking new segment hosts, please wait...
....
20130826:20:30:36:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Checking new segment hosts, Completed
20130826:20:30:36:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Checking temp directories
20130826:20:30:36:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Building the Master instance database, please wait...
20130826:20:31:28:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Starting the Master in admin mode
20130826:20:31:32:gpinitsystem:sdw1:gpadmin-[FATAL]:-Unknown host vmcentos Script Exiting!
20130826:20:31:32:024529 gpinitsystem:sdw1:gpadmin-[WARN]:-Script has left Greenplum Database in an incomplete state
20130826:20:31:32:024529 gpinitsystem:sdw1:gpadmin-[WARN]:-Run command /bin/bash /home/gpadmin/gpAdminLogs/backout_gpinitsystem_gpadmin_20130826_203030 to remove these changes
20130826:20:31:32:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-Start Function BACKOUT_COMMAND
20130826:20:31:32:024529 gpinitsystem:sdw1:gpadmin-[INFO]:-End Function BACKOUT_COMMAND

Environment


Cause

The /etc/hosts file looks good:

[gpadmin@sdw1 ~]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.32.190.68 sdw1
10.32.190.86 mdw

 

But when checking the file ~gpadmin/.gphostcache the old name, "vmcentos", is still there.

[gpadmin@sdw1 ~]$ pwd
/home/gpadmin
 
[gpadmin@sdw1 ~]$ ls -al .gphostcache
-rw-rw-r-- 1 gpadmin gpadmin 10 Aug 26 21:08 .gphostcache
 
[gpadmin@sdw1 ~]$ cat .gphostcache
mdw:vm_centos
sdw1:vmcentos

Resolution

Modify .gphostcache as follows so that "HDB init" can be completed without error.

[gpadmin@sdw1 ~]$ cat .gphostcache

sdw1:sdw1