When attempting to check the Greenplum Command Center (GPCC) version by running gpcc --version on the standby master, the output returns an error indicating that the metrics collector version information cannot be found.
Example Output:
$ gpcc --version
Currently Running Greenplum Command Center version 6.16.1 7c5cee4
metrics_collector: version info not found from metrics_collector.so
Note: Running the exact same command directly on the primary master works without issue.
The gpcc --version command relies on the $GPHOME environment variable to locate the metrics_collector.so library. The logic operates as follows:
Execution on Primary Master: The command checks the local file directly using:
strings $GPHOME/lib/postgresql/metrics_collector.so | grep -m 1 gpccversion_
Execution on Standby Master: The command uses SSH to connect to the primary master host and runs the same command remotely over the SSH session.
The issue occurs because non-interactive SSH sessions do not automatically load user environment variables. If the primary master host's ~gpadmin/.bashrc file does not explicitly source the Greenplum environment file, $GPHOME resolves as empty during the remote SSH call. This causes the path lookup for metrics_collector.so to fail.
To resolve this issue, you must ensure that the Greenplum environment variables are automatically loaded during non-interactive SSH sessions for the gpadmin user.
Log in to the primary master host as the gpadmin user.
Open the ~gpadmin/.bashrc file in a text editor.
Add the following line to explicitly source the Greenplum path (update the directory path if your $GPHOME is in a custom location):
source /usr/local/greenplum-db/greenplum_path.sh
Save and exit the file.
Return to the standby master and test the command again. It should now successfully return the metrics collector version:
$ gpcc --version
Currently Running Greenplum Command Center version 6.16.1 7c5cee4
metrics_collector is for GPCC 6.16.1