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).
Redis Database Instances Are Abnormal

Redis Database Instances Are Abnormal

Context

Common database exceptions of Redis include:

  • The master and slave Redis database instances are both abnormal. The physical files of master database instance are lost or damaged.
  • The master Redis database instance is normal and the slave database instance is abnormal. The physical files of the slave database instance are lost or damaged.

Precautions

  • The name of the database server must not be localhost.
  • Database nodes must have DBAgent deployed.
  • After the recovery, the Redis database must be redeployed.

Procedure

This topic assumes that the slave database instance accessrdb-7-34 is abnormal and the master database instance accessrdb-6-34 is normal. accessrdb-7-34 and accessrdb-6-34 are Redis database instance IDs.

  1. Use PuTTY to log in to the accessrdb-7-34 database instance as the sopuser user.

    The default password is D4I$awOD7k.
    NOTE:

    You can log in to ManageOne Deployment Portal and choose Application > Service Management > System Monitoring > Redis Databases to view the IP address of the node where the abnormal database instance resides.

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

    sudo su root

    The default password is Changeme_123.

  3. Run the following commands to check whether the database redis file directory exists:

    cd /opt

    ll

    Information similar to the following is displayed:

    -rw------- 1 root   root      7168 Apr 24 11:56 aquota.group
    -rw------- 1 root   root      7168 Apr 24 11:56 aquota.user
    drwxr-x--- 5 dbuser dbgroup   4096 Apr 24 13:07 gauss
    drwxr-xr-x 4 root   root      4096 Apr 24 11:56 log
    drwx------ 2 root   root     16384 Apr 24 11:56 lost+found
    drwxr-x--- 3 root   root      4096 Apr 24 14:12 mobin
    drwxr-x--- 2 root   root      4096 Apr 24 14:21 MOCSDRSwitch
    drwxr-x--- 7 ossadm ossgroup  4096 Apr 24 12:35 oss
    drwxr-x--- 2 ossadm ossgroup  4096 Apr 24 12:02 patch_manager
    drwxr-x--- 6 root   ossgroup  4096 Apr 24 12:37 pub
    drwxr-x--- 7 dbuser dbgroup   4096 Apr 24 12:54 redis
    drwxr-x--- 3 ossadm ossgroup  4096 Apr 24 12:34 share
    ....

    If the command output does not contain the redis directory, the redis directory does not exist. Perform 11 through 17.

    If the command output contains the redis directory, perform 4.

  4. Run the following commands to check whether the database data file directory exists:

    cd /opt/redis

    ll

    dr-x------  2 dbuser dbgroup  4096 Apr 24 12:54 bin
    drwx------ 76 dbuser dbgroup  4096 Apr 24 13:10 data
    drwx------  3 dbuser dbgroup  4096 Apr 24 12:54 etc
    drwxr-x---  2 dbuser dbgroup  4096 Apr 24 12:54 package

    If the command output does not contain the data directory, the data directory does not exist. Perform 11 through 17.

    If the command output contains the data directory, perform 5.

  5. Run the following commands to check whether the database accessrdb-7-34 file directory exists:

    cd /opt/redis/data

    ll

    drwx------ 2 dbuser dbgroup 4096 Apr 24 12:55 accessrdb-7-34
    drwx------ 2 dbuser dbgroup 4096 Apr 24 12:55 adminhomerdb-7-47
    drwx------ 2 dbuser dbgroup 4096 Apr 24 12:54 domainrdb-7-17
    drwx------ 2 dbuser dbgroup 4096 Apr 24 13:10 fdcontnrdb-7-78
    ....

    If the command output does not contain the accessrdb-7-34 directory, the accessrdb-7-34 directory does not exist. Perform 11 through 17.

    If the command output contains the accessrdb-7-34 directory, perform 7 through 17.

    NOTE:

    accessrdb-7-34 is the database instance name. Replace it as required.

  6. Repeat 1 through 5 to log in to the accessrdb-6-34 database node and check whether the accessrdb-6-34 directory exists.

    • If yes, perform 7 through 17.
    • If no, perform 11 through 17.

  7. Delete the damaged Redis instances.

    1. Use PuTTY to log in to the active Deploy node of ManageOne as the sopuser user. For details about how to determine the active node, see Determining the Active and Standby Nodes of the Deployment System.

      The default password is D4I$awOD7k.

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

      su - ossadm

      The default password is Changeme_123.

    3. Run the following commands to delete the damaged Redis instances:

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

      ./dbsvc_adm -cmd delete-db-instance -instid accessrdb-6-34@7-34

      Before deleting an instance, run the /opt/oss/manager/apps/DBAgent/bin/dbsvc_adm -cmd query-db-instance -type redis command to view and record the Redis instance version for further usage.

  8. Use PuTTY to log in to the accessrdb-6-34 and accessrdb-7-34 database nodes as the sopuser user.

    The default password is D4I$awOD7k.

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

    sudo su root

    The default password is Changeme_123.

  10. Run the following commands to check whether the accessrdb-6-34 and accessrdb-7-34 directories have been deleted:

    cd /opt/redis/data

    ll

  11. Use PuTTY to log in to the active Deploy node of ManageOne as the sopuser user. For details about how to determine the active node, see Determining the Active and Standby Nodes of the Deployment System.

    The default password is D4I$awOD7k.

  12. Run the following command to switch to the ossadm user:

    su - ossadm

    The default password is Changeme_123.

  13. Run the following command to reinstall the Redis software:

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

    ./dbsvc_adm -cmd install-pkg -type redis -nodes 6,7 -pkgname Redis-version

    NOTE:
    • In the preceding command, 6 and 7 indicate the IDs of the damaged Redis database instances in the service, they are the numbers in the middle of the database instance IDs. Use a comma (,) to separate the instance IDs, indicating that the active and standby instances are created, and the first one is the master instance and the second one is the slave instance.
    • Version indicates the Redis version recorded in 7.

  14. Configure the database deployment template.

    Configure the service and database names based on the following database deployment template. For details about parameters, contact technical support for assistance.

    {
        "type": "redis",
        "storage": "1024",
        "memory": "1024",
        "dbList": {
              "accessrdb": {
                   "appName": "MORCAccessConfigService",
                   "dataSize": 512
              }
        }
    }

    In the preceding command, accessrdb indicates the database name. Change it based on the site requirements.

    appName indicates the service name.

    dataSize indicates the size of the database instance. Change it based on the site requirements.

  15. You are advised to use WinSCP to place the template configured in 14 to the /opt/pub/software directory on the active Deploy node. The template name dbdeploy_template_redis.json is used as an example. Run the following command to change the owner group:

    chown ossadm:ossgroup dbdeploy_template_redis.json

  16. Run the following command to create database instances:

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

    ./dbsvc_adm -cmd create-db-instance -type redis -nodes 6,7 -tenant TenantName -stage StageName -file /opt/pub/software/dbdeploy_template_redis.json

    NOTE:

    Change the TenantName and StageName based on the site requirements. TenantName indicates the product name and StageName indicates the stage name. For details, see Querying the Product Name.

  17. Run the following command to query the database instance:

    /opt/oss/manager/apps/DBAgent/bin/dbsvc_adm -cmd query-db-instance -type redis |grep accessrdb

    The command output is supposed to be as follows:

    accessrdb-6-34@7-34                 primary  accessrdb-6-34                 Product  mo-global-1-a  192.168.33.40  26541  Up     redis   4.0.11   Master  Normal      --                             --         --            off    26541
    accessrdb-6-34@7-34                 primary  accessrdb-7-34                 Product  mo-global-1-a  192.168.33.41  26541  Up     redis   4.0.11   Slave   Normal      accessrdb-6-34                 --         --            off    26541

Translation
Download
Updated: 2019-06-01

Document ID: EDOC1100062375

Views: 1404

Downloads: 12

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