No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

HUAWEI CLOUD Stack 6.5.0 Troubleshooting Guide 02

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Operations Before Troubleshooting

Operations Before Troubleshooting

Background

If you have located the cause of the database fault before troubleshooting, skip this chapter. If you need to analyze the cause of the fault after troubleshooting, perform the following operations to collect the required information.

NOTE:
  • You are advised to perform emergency recovery during off-peak hours.
  • During the restoration, do not perform operations that affect the database functions, for example, add, delete, modify the database and table, change the password and user, and start or stop the database or database node.

Procedure

Database instance apmdbsvr-10_90_73_179 is used as an example for a Gauss database instance in the following steps:

  1. Use PuTTY to log in to the node where the abnormal database instance is deployed as the paas user.

    The default username is paas, and the default password is QAZ2wsx@123!.

  2. Run the following command to switch to the root user:

    su - root

  3. Run the following commands to back up the log and configuration files of the abnormal database instance:

    cp /opt/gauss/data/apmdbsvr-10_90_73_179/postgresql.conf /opt/gauss/data/apmdbsvr-10_90_73_179/postgresql.conf.bak

  4. Run the following command to obtain the process ID of the abnormal database instance:

    ps -ef | grep apmdbsvr-10_90_73_179

    root      8029  2632  0 11:36 pts/0    00:00:00 grep --color=auto apmdbsvr-10_90_73_179
    dbuser   22101     1  0 Aug06 ?        00:00:13 /opt/gauss/app/bin/gaussdb -D /opt/gauss/data/apmdbsvr-10_90_73_179

  5. Run the following commands to save the instance startup time to the specified file:

    ps -p 22101 -o lstart > apmdbsvr-10_90_73_179_gauss_time

    NOTE:

    22101 is the process ID of the Gauss database instance obtained in 4.

Fault Locating

  1. Use PuTTY to log in to the manage_db1_ip node.

    The default username is paas, and the default password is QAZ2wsx@123!.

  2. Run the following commands to check information about database:

    cd /opt/paas/oss/manager/apps/DBAgent/bin

    ./dbsvc_adm -cmd query-db-instance | grep gauss

    Information similar to the following is displayed:

    DBInstanceId                                  ClassId  InstNumber                         Tenant          IP             Port   State  DBType  Version            Role    Rpl Status  MasterID                      GuardMode  DataCheckSum  isSSL
    apmdbsvr-10_186_66_155-1@10_186_67_174-1      primary  apmdbsvr-10_186_66_155-1           fst-manage      10.186.66.155  32081  Up     gauss   V100R003C20SPC112  Master  Normal      --                            --         908781404     off
    apmdbsvr-10_186_66_155-1@10_186_67_174-1      primary  apmdbsvr-10_186_67_174-1           fst-manage      10.186.67.174  32081  Up     gauss   V100R003C20SPC112  Slave   Normal      apmdbsvr-10_186_66_155-1      --         908779606     off

    The command output varies depending on the version of the database service. Pay attention only to the value of Rpl Status.

    • Normal indicates that the replication status is normal.
    • Abnormal indicates abnormality, and the subsequent numerals in brackets is the status code.

  3. If the Master and Slave statuses in the preceding 2 are Abnormal(101), perform Abnormal Master and Slave Database Instances.

    If the Master status is Normal and the Slave status is Abnormal(101), perform Abnormal Slave DatabaseInstances.

    For details about the status code, see section "Database Instance Replication Status Is Abnormal" in HUAWEI CLOUD Stack 6.5.0 Troubleshooting Guide. If there is abnormal replication state of the slave database node instance, perform Abnormal Replication State of Slave Database Instance. Following methods for restoration are provided:

    • Re-establish the slave database node instance.
    • Rebuild the slave database node instance in one-click.
    • Rebuild the slave database node instance on the GUI.

Translation
Download
Updated: 2019-06-01

Document ID: EDOC1100062375

Views: 1771

Downloads: 12

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next