虚拟化上安装TIDB到部署阶段出现错误

TASK [check_system_dynamic : get facts] *********************************************************************************************************************************** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TimeoutError: Timer expired after 10 seconds fatal: [10.18.50.51]: FAILED! => {“changed”: false, “cmd”: “/usr/bin/lsblk --list --noheadings --paths --output NAME,UUID --exclude 2”, “msg”: “Timer expired after 10 seconds”, “rc”: 257} An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TimeoutError: Timer expired after 10 seconds fatal: [10.18.50.52]: FAILED! => {“changed”: false, “cmd”: “/usr/bin/lsblk --list --noheadings --paths --output NAME,UUID --exclude 2”, “msg”: “Timer expired after 10 seconds”, “rc”: 257} An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TimeoutError: Timer expired after 10 seconds fatal: [10.18.50.54]: FAILED! => {“changed”: false, “cmd”: “/usr/bin/lsblk --list --noheadings --paths --output NAME,UUID --exclude 2”, “msg”: “Timer expired after 10 seconds”, “rc”: 257} An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TimeoutError: Timer expired after 10 seconds fatal: [10.18.50.53]: FAILED! => {“changed”: false, “cmd”: “/usr/bin/lsblk --list --noheadings --paths --output NAME,UUID --exclude 2”, “msg”: “Timer expired after 10 seconds”, “rc”: 257}

NO MORE HOSTS LEFT ******************************************************************************************************************************************************** to retry, use: --limit @/home/tidb/tidb-ansible/retry_files/deploy.retry

PLAY RECAP **************************************************************************************************************************************************************** 10.18.50.51 : ok=1 changed=0 unreachable=0 failed=1
10.18.50.52 : ok=1 changed=0 unreachable=0 failed=1
10.18.50.53 : ok=1 changed=0 unreachable=0 failed=1
10.18.50.54 : ok=1 changed=0 unreachable=0 failed=1
localhost : ok=7 changed=4 unreachable=0 failed=0

ERROR MESSAGE SUMMARY ***************************************************************************************************************************************************** [10.18.50.51]: Ansible FAILED! => playbook: deploy.yml; TASK: check_system_dynamic : get facts; message: {“changed”: false, “cmd”: “/usr/bin/lsblk --list --noheadings --paths --output NAME,UUID --exclude 2”, “msg”: “Timer expired after 10 seconds”, “rc”: 257}

[10.18.50.52]: Ansible FAILED! => playbook: deploy.yml; TASK: check_system_dynamic : get facts; message: {“changed”: false, “cmd”: “/usr/bin/lsblk --list --noheadings --paths --output NAME,UUID --exclude 2”, “msg”: “Timer expired after 10 seconds”, “rc”: 257}

[10.18.50.54]: Ansible FAILED! => playbook: deploy.yml; TASK: check_system_dynamic : get facts; message: {“changed”: false, “cmd”: “/usr/bin/lsblk --list --noheadings --paths --output NAME,UUID --exclude 2”, “msg”: “Timer expired after 10 seconds”, “rc”: 257}

[10.18.50.53]: Ansible FAILED! => playbook: deploy.yml; TASK: check_system_dynamic : get facts; message: {“changed”: false, “cmd”: “/usr/bin/lsblk --list --noheadings --paths --output NAME,UUID --exclude 2”, “msg”: “Timer expired after 10 seconds”, “rc”: 257}

您好,提问过程中,麻烦提供版本信息以及操作过程等内容,方便快速响应/

1.可以修改下 timeout 时间,参考 https://github.com/pingcap/tidb-ansible/blob/v3.0.12/ansible.cfg#L21

2.尝试换一个 ansible 版本,可以换 2.5.0 或者 2.7.11(3.0 以上集群版本)

1、修改timeout为20S 报错依旧为10S

2、版本为v2.1.14
ansible 2.5.0 config file = /home/tidb/tidb-ansible/ansible.cfg configured module search path = [u’/home/tidb/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /bin/ansible python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

感谢您的回复

抱歉,这样修改 timeout 的超时时间:ansible-playbook xxxx.yml -e “gather_timeout=120”

能给我一个下载ansible2.7.11的链接地址么

嗯,看了下你的集群版本 2.1.14,对应的 ansible 版本为 ansible 2.5.0,应该是满足需求的:https://github.com/pingcap/tidb-ansible/blob/v2.1.14/requirements.txt

3.0 以上集群版本,ansible 的集群版本要求是 2.7.11:https://github.com/pingcap/tidb-ansible/blob/v3.0.12/requirements.txt

请问下 ansible-playbook xxxx.yml -e “gather_timeout=120” 执行这个命令还是会报错么?

[tidb@tidb1 tidb-ansible]$ ansible-playbook deploy.yml -e gather_timeout=120 [WARNING]: Found variable using reserved name: gather_timeout

以上是执行的一个告警,但是问题依旧


我再检查ntp服务的时候 也出现了相同的错,但是我的ntp服务已经启动,并且时间在做同步,每个点的时间一直!

您好,麻烦截图发下当前 ansible 的版本。截图看下,多谢。

嗯,按照以下方式把 ansible 版本换成 2.7.11 试下

  • 1.pip uninstall -r requirement.txt
  • 2.修改 requirement.txt ansible 版本,把 ansible 版本改成 == 2.7.11
  • 3.执行 install 命令安装
cd /home/tidb/tidb-ansible && \
sudo pip install -r ./requirements.txt

https://pingcap.com/docs-cn/stable/how-to/deploy/orchestrated/ansible/

您好!升级到了2.7.11 如下图:


但是在执行ansible-playbook local_prepare.yml 部署阶段报错,具体报错如下:

您好: 1. 当前要安装的版本是2.1.14, ansible 版本是2.7.11 ,ansible升级后,只有一个服务器无法通过检测吗?
2. 请问,您的操作系统版本是多少, 类似cat /etc/centos-release? 内核是多少 uname -a ? 2. 比较这几台机器的操作系统和版本是否一致。

1、所有操作都是在51这个节点做的,只有51这个节点无法通过检测。
2、确定所有节点的操作系统版本及内核一致,如下图:

1.请问升级到2.7.11以后,在安装的时候是否添加了 -e gather_timeout=120 ,如果没有,请添加参数,如果有 2.请使用 -e gather_timeout=120 -vvv 安装,上传报错日志 3.安装后,请上传中控机部署目录下/log/ansible.log 日志,多谢

11:55 执行 tidb-ansible]$ ansible-playbook bootstrap.yml -e gather_timeout=120 问题依旧
具体日志请看附件ansible.log (478.1 KB)

ANSIBLE_KEEP_REMOTE_FILES=1 ansible-playbook bootstrap.yml -e gather_timeout=120 &> ansible.log

执行一下上述命令,然后将 tidb-ansible/ansible.log 发一下

ansible.log (19.2 KB)

请查收!感谢

ANSIBLE_KEEP_REMOTE_FILES=1 ansible-playbook bootstrap.yml -e gather_timeout=120 -vvv &> ansible.log

麻烦按如上命令,加上 -vvv 再次执行,执行完之后发一下 tidb-ansible/ansible.log 日志

ansible.log (720.2 KB)
请查收!感谢!