Pivotal Knowledge Base

Follow

Updating the postgresql.conf file Failed

Environment

Pivotal Greenplum Database (GPDB) 4.3.x

Symptom

When running the gpconfig command, it fails to update the postgresql.conf file:

Example:

$ gpconfig -c statement_mem -v 1G --verbose 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[INFO]:-normalized_host=sdw4 host=sdw4 dir=/data/mirror/gpseg2 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[INFO]:-normalized_host=sdw4 host=sdw4 dir=/data/mirror/gpseg5 
[…] 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[INFO]:-normalized_host=sdw3 host=sdw3 dir=/data/primary/gpseg11 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[INFO]:-normalized_host=sdw3 host=sdw3 dir=/data/mirror/gpseg19 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[INFO]:-normalized_host=sdw3 host=sdw3 dir=/data/mirror/gpseg22 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[INFO]:-normalized_host=mdw host=mdw dir=/data/master/gpseg-1 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: sdw4 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: sdw2 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: sdw5 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: mdw 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: sdw6 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: sdw3 
20180329:18:15:59:025008 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: sdw1 
20180329:18:16:04:025008 gpconfig:mdw:gpadmin-[ERROR]:-finished with errors, parameter string '-c statement_mem -v 1G --verbose'

Cause

Using verbose with gpconfig, it can be determined that Perl was not found or missing.

Example:

  stderr=''
20170211:10:39:46:016365 gpconfig:mdw:gpadmin-[INFO]:-normalized_host=mdw host=mdw dir=/data/master/gpseg-1
20170211:10:39:46:016365 gpconfig:mdw:gpadmin-[DEBUG]:-Adding cmd to work_queue: echo '/data/master/gpseg-1' | $GPHOME/sbin/gpaddconfig.py --entry gp_vmem_protect_limit --value 'Uyc2MDAwJwpwMAou'
20170211:10:39:46:016365 gpconfig:mdw:gpadmin-[DEBUG]:-[worker2] got cmd: echo '/data/master/gpseg-1' | $GPHOME/sbin/gpaddconfig.py --entry gp_vmem_protect_limit --value 'Uyc2MDAwJwpwMAou'
20170211:10:39:47:016365 gpconfig:mdw:gpadmin-[DEBUG]:-[worker2] finished cmd: master cmdStr='ssh -o 'StrictHostKeyChecking no' mdw ". /usr/local/greenplum-db/./greenplum_path.sh; echo '/data/master/gpseg-1' | $GPHOME/sbin/gpaddconfig.py --entry gp_vmem_protect_limit --value 'Uyc2MDAwJwpwMAou'"' had result: cmd had rc=1 completed=True halted=False
  stdout='20170211:10:39:47:016417 gpaddconfig.py:default-[CRITICAL]:-Command perl not found
'
  stderr='Traceback (most recent call last):
  File "/usr/local/greenplum-db/./sbin/gpaddconfig.py", line 88, in <module>
  cmd=InlinePerlReplace(name, fromString, toString, f)
  File "/usr/local/greenplum-db/lib/python/gppylib/commands/unix.py", line 534, in __init__
  cmdStr="%s -pi.bak -e's/%s/%s/g' %s" % (findCmdInPath('perl'), fromStr, toStr, file)
  File "/usr/local/greenplum-db/lib/python/gppylib/commands/unix.py", line 80, in findCmdInPath
  raise CommandNotFoundException(cmd,search_path)
gppylib.commands.unix.CommandNotFoundException: Could not locate command: 'perl' in this set of paths: ['/usr/kerberos/bin', '/usr/sfw/bin', '/opt/sfw/bin', '/bin', '/usr/local/bin', '/usr/bin', '/sbin', '/usr/sbin', '/usr/ucb', '/sw/bin', '/opt/Navisphere/bin', '/usr/local/greenplum-db/.']
'

Resolution

Please install Perl on the nodes in question and retry the gpconfig command. 

 

Comments

Powered by Zendesk