FAQs

An Error Is Reported Displaying “Failed to obtain the GPHOME” When a Command Is Executed

Symptom

The following information is displayed if user root runs a command.

Failed to obtain the GPHOME.

Possible Cause

The GPHOME environment variable is not correctly configured. You need to check whether the GPHOME environment variable contains gaussdbToolPath in the XML file of the cluster.

Procedure

Check the $GPHOME path.

echo $GPHOME

Modify the $GPHOME path in the configuration file if it is not the default installation path.

vim /etc/profile

Restoration Method for Incomplete Key Files Caused by Interruption During Standby Instance Rebuilding Using gs_ctl

Symptom

The standby instance fails to be rebuilt because the rebuilding process is interrupted. The following error information is displayed:

CRC checksum does not match value stored in file, maybe the cipher file is corrupt
non obs cipher file or random parameter file is invalid.
read cipher file or random parameter file failed.
2020-06-18 20:58:12.080 5eeb64e3.1 [unknown] 140697304617088 [unknown] 0 dn_6001_6002 F0000 0 [BACKEND] FATAL:  could not load server certificate file "server.crt": no start line
[2020-06-18 20:58:12.086][24066][dn_6001_6002][gs_ctl]:  waitpid 24446 failed, exitstatus is 256, ret is 2

Possible Cause

The certificate file is incomplete when the rebuilding is interrupted. The rebuilding fails again due to the incomplete certificate file.

Procedure

  1. Check the size of the certificate file in the data directory.

    ll
    Check the size of the key file.
    -rw------- 1 omm omm       0 Jun 18 20:58 server.crt
    -rw------- 1 omm omm       0 Jun 18 20:58 server.key
    -rw------- 1 omm omm       0 Jun 18 20:58 server.key.cipher
    -rw------- 1 omm omm       0 Jun 18 20:58 server.key.rand
    
  2. If the certificate file size is 0, delete the certificate file.

    rm -rf server.crt server.key server.key.cipher server.key.rand
    
  3. Rebuild the standby instance.

    gs_ctl build -D data_dir
    

NOTE: If the database on the standby node is stopped, you need to regenerate a certificate file or copy the certificate file (in $GAUSSHOME/share) to the data directory, start the standby node, and rebuild the standby instance. For details about how to generate a certificate file, see the Developer Guide.

Feedback
编组 3备份
    openGauss 2024-07-27 00:56:07
    cancel