"hawq init" fails when you add entry to postgresql.conf in Pivotal HDB
search cancel

"hawq init" fails when you add entry to postgresql.conf in Pivotal HDB

book

Article ID: 294563

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

After your Pivotal HD (PHD) cluster is installed with icm_client, you run "hawq init" to initialize the HDB system but it fails with the following messages:

20131104:14:51:05:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[INFO][0]:-Completed to start segment instance database phd-cluster1.sh-hd.emc.com /data1/primary/gpseg0
20131104:14:51:05:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[INFO][0]:-Configuring segment postgresql.conf
20131104:14:51:05:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[INFO][0]:-Completed Update /data1/primary/gpseg0/postgresql.conf file
20131104:14:51:05:069335 gpcreateseg.sh:phd-cluster1:gpadmin-[WARN]:-Failed to insert port=40001 in /data1/primary/gpseg1/postgresql.conf on phd-cluster1.sh-hd.emc.com
20131104:14:51:05:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[INFO][0]:-Completed Update /data1/primary/gpseg0/postgresql.conf file
20131104:14:51:05:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[INFO]:-Start Function ED_PG_CONF
20131104:14:51:05:069335 gpcreateseg.sh:phd-cluster1:gpadmin-[INFO]:-End Function ED_PG_CONF
20131104:14:51:05:069335 gpcreateseg.sh:phd-cluster1:gpadmin-[FATAL][1]:-Failed Update port number to 40001
20131104:14:51:06:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[WARN]:-Failed to insert port=40000 in /data1/primary/gpseg0/postgresql.conf on phd-cluster1.sh-hd.emc.com
20131104:14:51:06:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[INFO]:-End Function ED_PG_CONF
20131104:14:51:06:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[FATAL][0]:-Failed Update port number to 40000
20131104:14:51:06:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:-End Function PARALLEL_WAIT
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:-End Function PARALLEL_COUNT
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:-Start Function PARALLEL_SUMMARY_STATUS_REPORT
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:------------------------------------------------
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:-Parallel process exit status
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:------------------------------------------------
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:-Total processes marked as completed           = 0
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:-Total processes marked as killed              = 0
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[WARN]:-Total processes marked as failed              = 2 <<<<<
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:------------------------------------------------
20131104:14:51:07:062741 gpinitsystem:phd-cluster1:gpadmin-[INFO]:-End Function PARALLEL_SUMMARY_STATUS_REPORT 

The key error messages are:

20131104:14:51:06:069247 gpcreateseg.sh:phd-cluster1:gpadmin-[WARN]:-Failed to insert port=40000 in /data1/primary/gpseg0/postgresql.conf on phd-cluster1.sh-hd.emc.com
20131104:14:51:05:069335 gpcreateseg.sh:phd-cluster1:gpadmin-[WARN]:-Failed to insert port=40001 in /data1/primary/gpseg1/postgresql.conf on phd-cluster1.sh-hd.emc.com

The "hawq init" command will run gpinitsystem to initialize a HDB system. During this process gpinitsystem will call the utility ed to update configuration file postgresql.conf. However, it will fail as shown above for the following reasons:

1. The utility "ed" is not installed in the system.

2. The permission of the file postgresql.conf and its parent directories are not sufficient for the calling user.


Resolution

To resolve this issue, follow the steps below:

1. Run "rpm -qa | grep ed" to check if "ed" is installed or not. If not, run "yum install ed" as root to install it. Or download the "ed" installation package from  the Internet.

2. Grant the appropriate permission to the file postgresql.conf and the directories holding this file.