Error: "version info not found from metrics_collector.so" when running gpcc --version on Standby Master
search cancel

Error: "version info not found from metrics_collector.so" when running gpcc --version on Standby Master

book

Article ID: 435085

calendar_today

Updated On:

Products

VMware Tanzu Data

Issue/Introduction

Symptoms

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.

Cause

Root Cause

The gpcc --version command relies on the $GPHOME environment variable to locate the metrics_collector.so library. The logic operates as follows:

  1. Execution on Primary Master: The command checks the local file directly using:

    strings $GPHOME/lib/postgresql/metrics_collector.so | grep -m 1 gpccversion_

  2. 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.

Resolution

Resolution

To resolve this issue, you must ensure that the Greenplum environment variables are automatically loaded during non-interactive SSH sessions for the gpadmin user.

  1. Log in to the primary master host as the gpadmin user.

  2. Open the ~gpadmin/.bashrc file in a text editor.

  3. 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
    
  4. Save and exit the file.

  5. 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