[FAQ] TiUP import 问题(四)

现象:

  • import 后的集群通过 TiUP reload 失败报错 failed to scp xxx to xxx Process exited with status 1

原因:

  • monitored 目录未导入到 TiUP 中,当 tidb-ansible inventory 文件中 monitor host 的 deploy/data_dir 不同时。原集群使用 ansible 部署,不同 host 配置不同 monitored 目录后,TiUP import 后,不支持 host 级别配置 monitored。

解决方案:

  • 修改 meta.yaml 中的路径为当前部署路径,reload 集群
  • 原集群使用 ansible 部署,不同 host 配置不同 monitored 目录后,TiUP import 后,不支持 host 级别配置 monitored,需要手动将 monitored 目录统一,之后进行如下操作:
    • 1.先把旧的 node_exporter 和 blackbox_exporter 停掉
tiup cluster exec cluster-name --command="sudo systemctl stop node_exporter${port}.service"
tiup cluster exec cluster-name --command="sudo systemctl stop blackbox_exporter${port}.service"
  • 2.在 meta.yaml 中修改 monitored 的部署目录 B,(将部署机器上的目录 A copy 一份 B,copy 的目录和 meta.yaml 中的目录保持一致)
  • 3.reload 集群 tiup cluster reload xxx --skip-restart (分发配置)
  • 4.启动 node_exporter 和 blackbox_exporter
tiup cluster exec cluster-name --command="sudo systemctl start node_exporter${port}.service"
tiup cluster exec cluster-name --command="sudo systemctl start blackbox_exporter${port}.service"
1 个赞