ansible 升级报错 “Status code was -1 and not [200]: Request failed: <urlopen error [Errno 111] Connection refused

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:3.0.1
  • 【问题描述】:在升级tidb集群的时候,要应用所有的节点,结果报错。
    ansible-playbook rolling_update.yml

PLAY [rolling update PD cluster] *************************************************************************************************************************************************************************************************************

TASK [set_fact] ******************************************************************************************************************************************************************************************************************************
ok: [10.10.10.102]

TASK [include_tasks] *************************************************************************************************************************************************************************************************************************
included: /home/tidb/tidb-ansible/common_tasks/get_pd_name.yml for 10.10.10.102

TASK [get PD name] ***************************************************************************************************************************************************************************************************************************
fatal: [10.10.10.102]: FAILED! => {“changed”: false, “content”: “”, “msg”: “Status code was -1 and not [200]: Request failed: <urlopen error [Errno 111] Connection refused>”, “redirected”: false, “status”: -1, “url”: “http://10.10.10.102:2379/pd/api/v1/members”}

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

PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
10.10.10.102 : ok=11 changed=0 unreachable=0 failed=1
10.10.10.103 : ok=9 changed=1 unreachable=0 failed=0
10.10.10.104 : ok=9 changed=1 unreachable=0 failed=0
localhost : ok=7 changed=4 unreachable=0 failed=0

ERROR MESSAGE SUMMARY ************************************************************************************************************************************************************************************************************************
[10.10.10.102]: Ansible FAILED! => playbook: rolling_update.yml; TASK: get PD name; message: {“changed”: false, “content”: “”, “msg”: “Status code was -1 and not [200]: Request failed: <urlopen error [Errno 111] Connection refused>”, “redirected”: false, “status”: -1, “url”: “http://10.10.10.102:2379/pd/api/v1/members”}

Ask for help:
Contact us: support@pingcap.com
It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We’ll try our best to help you deploy a TiDB cluster. Thanks. :slight_smile:

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

看现象应该是之前修复过的已知问题,确认下当前要升级到哪个版本,是否用了对应版本的 tidb-ansible,比如 3.0.15 需要下载对应的版本

如果不方便更新,当前可以指定 pd 节点一个个滚动更新 pd 先临时解决
ansible-playbook rolling_update.yaml -t pd -l pd-node-xxx

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。