Pivotal Knowledge Base

Follow

GPRECOVERSEG Error: "(Reason='Inconsistency in Catalog and Segment Role/Mode. Catalog Role = p. Segment Mode = line 11.')"

Environment

 Product  Version
 Pivotal Greenplum  4.2.x
 OS  All Supported OS

Symptom

gprecoverseg failed with the following error:

20140818:10:54:38:039648 gprecoverseg:gpmst01:gpadmin-[INFO]:-Starting gprecoverseg with args: 
20140818:10:54:38:039648 gprecoverseg:gpmst01:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.2.0 build 1'
20140818:10:54:38:039648 gprecoverseg:gpmst01:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.2.0 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Jul 12 2014 17:02:40'
20140818:10:54:39:039648 gprecoverseg:gpmst01:gpadmin-[INFO]:-Obtaining Segment details from master...
20140818:10:54:39:039648 gprecoverseg:gpmst01:gpadmin-[CRITICAL]:-gprecoverseg failed. (Reason='Inconsistency in catalog and segment Role/Mode. Catalog Role = p. Segment Mode = line 11.') exiting...

Cause

GPCC path file is sourced in .bashrc file on segments. Run gprecoverseg in verbose mode (gprecoverseg -v) and we can see following error:

20140818:14:36:56:080818 gprecoverseg:gpmst01:gpadmin-[DEBUG]:-[worker0] finished cmd: Get segment status information cmdStr='ssh -o 'StrictHostKeyChecking no' gpseg01.XXX.XXX ". /usr/local/greenplum-db/./greenplum_path.sh; $GPHOME/bin/gp_primarymirror -h gpseg01.XXX.XXX -p 40000"'  had result: cmd had rc=1 completed=True halted=False
  stdout=''
  stderr='/home/gpadmin/.bashrc: line 11: /usr/local/greenplum-cc-web/gpcc_path.sh: No such file or directory
mode: PrimarySegment
segmentState: Ready
dataState: InChangeTracking
faultType: NotInitialized
mode: PrimarySegment
segmentState: Ready
dataState: InChangeTracking
faultType: NotInitialized
'

In this particular case, the older version of the GPCC was removed and the .bashrc was still trying to have the entry to source the path.

Solution

Remove "source /usr/local/greenplum-cc-web/gpcc_path.sh" from .bashrc from all segments.

Comments

Powered by Zendesk