tidb扩容tikv节点

步骤只要按照官方文档来,可能会遇到的错误,记录了下。

准备

编辑 inventory.ini,加入新加节点。

初始化新增节点

ansible-playbook bootstrap.yml -l xxxxx.xxx.xxx

会报错如下

TASK [bootstrap : gather facts] ***************************************************************************************************************************************************************
fatal: [xxx.xxx.xxx]: FAILED! => {"changed": false, "module_stderr": "Shared connection to xxx.xxx.xxx closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}
	to retry, use: --limit @/home/tidb/tidb-ansible-release-2.0/retry_files/bootstrap.retry

PLAY RECAP ************************************************************************************************************************************************************************************
xxx.xxx.xxx               : ok=6    changed=0    unreachable=0    failed=1   


ERROR MESSAGE SUMMARY *************************************************************************************************************************************************************************
[xxx.xxx.xxx]: Ansible FAILED! => playbook: bootstrap.yml; TASK: bootstrap : gather facts; message: {"changed": false, "module_stderr": "Shared connection to xxx.xxx.xxx closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}

需要将tidb ALL=(ALL) NOPASSWD: ALL加入visudo

deploy

ansible-playbook deploy.yml -l xxx.xxx.xxx -k

start

ansible-playbook start.yml -l xxx.xxx.xxx -k

可能会有的报错

TASK [start node_exporter by systemd] *********************************************************************************************************************************************************
fatal: [xxx.xxx.xxx]: FAILED! => {"changed": false, "msg": "Could not find the requested service node_exporter.service: host"}
	to retry, use: --limit @/home/tidb/tidb-ansible-release-2.0/retry_files/start.retry

PLAY RECAP ************************************************************************************************************************************************************************************
xxx.xxx.xxx               : ok=3    changed=0    unreachable=0    failed=1   


ERROR MESSAGE SUMMARY *************************************************************************************************************************************************************************
[xxx.xxx.xxx]: Ansible FAILED! => playbook: start.yml; TASK: start node_exporter by systemd; message: {"changed": false, "msg": "Could not find the requested service node_exporter.service: host"}

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. :-)

修改systemctl list-unit-files|grep node
看到没有对应的服务名称

手工添加,找到systemctl的路径:
cd /etc/systemd/system/

[Unit]
Description=node_exporter service
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
LimitNOFILE=1000000
User=tidb
ExecStart=/home/tidb/deploy_2/scripts/run_node_exporter.sh
Restart=always
RestartSec=15s

[Install]
WantedBy=multi-user.target

再启动:

ansible-playbook start.yml -l xxx.xxx.xxx -k 

成功

更新监控

ansible-playbook rolling_update_monitor.yml --tags=prometheus -k

新增完成,登入监控平台查看
17:02 成功加入,开始平衡数据。
每个节点数据大概100K个regios

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值