为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
- 【TiDB 版本】:tidb 3.0
- 【问题描述】: 我这边使用 TiDB Ansible 部署 TiDB 集群的方式部署了4台机的tidb集群,其中tidb-server和pd-server在同一台机器上,其他3台是tikv-server;
现在tidb-server和pd-server的那台主机挂了,主机重启后,运行ansible-playbook start.yml启动报如下错误,启动失败,请问要怎么处理呢?谢谢!
[tidb@tidb scripts]$ ansible-playbook /home/tidb/tidb-ansible/start.yml
[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match ‘all’
PLAY [check config locally] *******************************************************************************************************
TASK [Gathering Facts] ************************************************************************************************************
ok: [localhost]
TASK [check_config_static : Ensure only one monitoring host exists] ***************************************************************
fatal: [localhost]: FAILED! => {“msg”: "The conditional check ‘groups[‘monitoring_servers’] | length != 1’ failed. The error was: error while evaluating conditional (groups[‘monitoring_servers’] | length != 1): ‘dict object’ has no attribute ‘monitoring_servers’
The error appears to have been in ‘/home/tidb/tidb-ansible/roles/check_config_static/tasks/main.yml’: line 4, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
\
- name: Ensure only one monitoring host exists
^ here
"}
NO MORE HOSTS LEFT ****************************************************************************************************************
to retry, use: --limit @/home/tidb/tidb-ansible/start.retry
PLAY RECAP ************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1inventory.ini (1.9 KB)