
# SLB一直同步，心跳异常
- 通过脚本排错
  1. 进入AppStage运维中心。
  
  2. 在顶部导航栏选择服务。
  
  3. 单击![](https://support.huaweicloud.com/appstage_faq/zh-cn_image_0000001832235608.png)，选择"运维 \> 监控服务"。
  
  4. 选择左侧导航栏的"EAP\&JOB \> 脚本执行"，选择"公共工具"页签。
  
  5. 在名称栏中输入"slb"，单击"查询"。
  
  6. 在查询结果列表中，单击"slb_heartBeat_chk"，按照输出结果修复即可。
   
- 人工排错 如果当心跳时间和电脑时间之差超过5分钟时，说明后端SLB心跳异常，用业务用户（非root）执行以下两条命令即可：
  ```
  /opt/huawei/openresty/init.d/slb_agent restart
  /opt/huawei/openresty/init.d/nginx restart
  ```
  ![](https://support.huaweicloud.com/appstage_faq/public_sys-resources/note_3.0-zh-cn.png)
  - 若没有以上命令请重新部署。
  
  - 心跳非异常时，如果一直同步，同样执行以上两条命令。
   
  如果上面命令没有效果，请采用以下方式：
  - 登录SLB实例主机，执行**cd /opt/huawei/openresty/slb_agent/log** 命令查看日志，如出现以下报错："post slb status to slbservice failed because response is None."，请打通网络，具体请参见[更改安全组](https://support.huaweicloud.com/usermanual-ecs/ecs_03_0606.html)或[加入安全组](https://support.huaweicloud.com/usermanual-ecs/ecs_03_0612.html)。
  
  - 若报错如下图所示： ![](https://support.huaweicloud.com/appstage_faq/zh-cn_image_0000001777836308.png "点击放大")
    执行命令**cat /opt/huawei/openresty/slb_agent/conf/slb_agent.conf**查看是否为空，若为空，获取正常状态的SLB机器的文件粘贴至该文件。
    然后执行/opt/huawei/openresty/init.d/slb_agent restart重启即可。
    
   
 
