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

FusionCloud 6.3.1.1 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).
ELB Data Service Exception (ETCD Mode)

ELB Data Service Exception (ETCD Mode)

Symptom

In ETCD mode, users cannot access data services through the ELB service.

Possible Causes

Configuration files of the LVS or Nginx nodes are lost.

Procedure

  1. Run the following command to log in to the MySQL database and query the number of configuration files in the database.

    var/elb/packages/mysql/bin/mysql -uelb -p{Password of database user elb} use elb;

    Run the following command to query the number of configuration files of the LVS nodes in the database:

    select count(*) from consistency_files where lb_type='External' and h_type="lvs" and type in ('conf','disable');

    Run the following command to query the number of configuration files of the Nginx nodes in the database:

    select count(*) from consistency_files where lb_type='External' and h_type="nginx" and type in ('conf','disable');

  2. Log in to the ETCD node and query the number of configuration files on the ETCD node.

    Run the following command to query the number of configuration files of the LVS nodes on the ETCD node:

    curl -k "https://{etcd_ip}:2379/v2/keys/external/lvs?recursive=true" -s |grep -o file_name | wc -l

    Run the following command to query the number of configuration files of the Nginx nodes on the ETCD node:

    curl -k "https://{etcd_ip}:2379/v2/keys/external/nginx?recursive=true" -s |grep -o unify_num_port | wc -l

    Replace {etcd_ip} in the command with the management plane IP address of the ETCD node.

  3. Compare the number of configuration files in the database with that on the ETCD node.

    If the number of configuration files of both the LVS and Nginx nodes obtained in 1 is equal to that obtained in 2, the number of configuration files of both the LVS and Nginx nodes in the database is the same that on the ETCD node. If the configuration files are inconsistent, go to 6.

  4. Compare the number of configuration files on the LVS node with that on the ETCD node.

    Run the following command to query the number of configuration files on the LVS nodes:

    ll /etc/keepalived/vhosts/* |wc -l

    If the query result is equal to that in 2, the configuration files on the LVS nodes are consistent with those on the ETCD node. If the configuration files are inconsistent, go to Procedure.

  5. Compare the number of configuration files on the Nginx node with that on the ETCD node.

    Run the following command to query the number of configuration files on the Nginx nodes:

    ll /usr/local/NSP/etc/nginx/vhosts/* |wc -l

    If the query result is equal to that in 2, the configuration files on the Nginx nodes are consistent with those on the ETCD node. If the configuration files are inconsistent, go to Procedure.

  6. Log in to each ETCD node as user elb and query the status of the ETCD service:

    ps -ef|grep etcd

    If the following information is displayed, the etcd process is running properly. If the etcd process is not running properly, handle the problem by performing operations provided in section 3.3 ETCD Node Service Exception.

  7. Log in to an elb_api node as user elb and then run the following command to check whether ETCD is correctly configured:

    vi /usr/local/NSP/etc/elb/conf/conf.lua

    If the following information is displayed, ETCD is correctly configured.

    • configuration.use_conf_center is set to true, indicating the ETCD service is enabled.
    • configuration.conf_center_service is set to the IP addresses of the ETCD nodes.

    If the values of the parameters are incorrect, modify the configuration.

  8. If file conf.lua is modified, run the following command to reload the elb_api node:

    sh /usr/local/NSP/etc/elb/bin/elb_process.sh reload

  9. Run the following command to synchronize configurations files in the MySQL database to the ETCD node:

    curl -i {mgt_plane_ip}:8080/etcd/push_all_key -d '{"type":"external"}'

    Replace {mgt_plane_ip} in the command with the management plane IP address of the elb_api node.

    If 200 is returned, configuration files are synchronized successfully.

  10. Log in to the LVS and Nginx nodes one by one and then run the following command to check whether ETCD is correctly configured:

    vi /usr/local/NSP/etc/lua/conf/configure.lua

    If the following information is displayed, ETCD is correctly configured.

    • configuration.use_conf_center is set to true, indicating the ETCD service is enabled.
    • configuration.conf_center_service is set to the IP addresses of the ETCD nodes.

    If the values of the parameters are incorrect, modify the configuration.

  11. If file configure.lua is modified, run the following commands to reload the LVS and Nginx nodes.

    For the LVS nodes, run the following command:

    sh /usr/local/NSP/etc/lua/bin/reload_lvs.sh

    For the Nginx nodes, run the following command:

    sh /usr/local/NSP/etc/lua/bin/reload_nginx.sh

  12. Run the following command to download configuration files on the ETCD node to the LVS and Nginx nodes:

    curl -i -X POST {plane_ip}:1025/etcd/pull_key -d '{"type":"external","all":true}'

    {plane_ip} is the management plane IP address of the LVS or Nginx node.

    NOTE:

    If only one configuration file is lost, you only need to download this file.

    • Layer-4 configuration file:

      curl -i -X POST {plane_ip}:1025/etcd/pull_key -d '{"type":"external","all":false,"ids":{"l4":[{"id":"{listener_id}"}]}}'

    • Layer-7 configuration file:

      curl -i -X POST {plane_ip}:1025/etcd/pull_key -d '{"type":"external","all":false,"ids":{"l7":[{"id":"{listener_id}"}]}}'

    • Layer-4 and layer-7 configuration files:

      curl -i -X POST {plane_ip}:1025/etcd/pull_key -d '{"type":"external","all":false,"ids":{"l4":[{"id":"{listener_id}"}],"l7":[{"id":"{listener_id}"}]}}'

    {plane_ip} in these commands is the management plane IP address of the LVS node or Nginx node to which the configuration file is to be pulled, and ${listener_id} is the listener ID.

Translation
Download
Updated: 2019-06-10

Document ID: EDOC1100063248

Views: 22649

Downloads: 37

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