Pivotal Knowledge Base

Follow

"hawq init" fail when add entry to postgresql.conf

Environment

Pivotal HDB

Problem

After PHD cluster is installed with icm_client, run "hawq init" to initialize HDB system but failed 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

Root cause

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

1) "ed" is not installed in the system

2) permission of file postgresql.conf and its parent directories is not sufficient for the calling user (typical gpadmin)

Solution

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 "ed" installation package from internet

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

Comments

  • Avatar
    Chris DeLashmutt

    Too bad ed isn't a dependency of HAWQ. ;)

Powered by Zendesk