In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The problem of deploying the same machine in multiple clusters of pd
-- 2019-04-25 Spring Thunder
1. Summary 1.1, questions
The pd of multiple tidb clusters is deployed on the same machine, and the service of pd is the same, which causes pd to fail to start.
Version: 2.1.2
1.2. Problem and solution
Modify the port part of the related files to solve the problem
2. Specific 2.1, specific issues 2.1.1, system services
/ etc/systemd/system
Pd.service
2.1.2, start and stop script of pd
[${deploy_dir} / scripts/start_pd.sh]
#! / bin/bash
Set-e
# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!
Sudo systemctl start pd.service
[${deploy_dir} / scripts/stop_pd.sh]
#! / bin/bash
Set-e
# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!
Sudo systemctl stop pd.service
2.2, repair
Tidb central control computer:
[1. Change the deployed]
/ work/tidb/tidb-ansible-2.1/roles/pd/tasks/ systemd_deployment.yml
Change:
Service_name: pd- {{pd_client_port}}
[2, rolling upgrade]
/ work/tidb/tidb-ansible-2.1/ rolling_update.yml
Change:
-name: stop PD by systemd
Systemd: name=pd-{{pd_client_port}} .service state=stopped
-name: start PD by systemd
Systemd: name=pd-{{pd_client_port}} .service state=started
[3. Change start]
/ work/tidb/tidb-ansible-2.1/ start.yml
-name: start PD by systemd
Systemd: name=pd- {{pd_client_port}} .service state=started
2.3. Results after repair
Manually delete the target pd machine's:
${deploy_dir} / scripts/start_pd.sh
${deploy_dir} / scripts/stop_pd.sh
${deploy_dir} / scripts/run_pd.sh
The central control computer is redeployed:
Ansible-playbook deploy.yml-l pd machine IP
Check:
Start_pd.sh
#! / bin/bash
Set-e
# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!
Sudo systemctl start pd-10000 .service
Stop_pd.sh
#! / bin/bash
Set-e
# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!
Sudo systemctl stop pd-10000 .service
Zhengzhou Infertility Hospital: http://jbk.39.net/yiyuanzaixian/zztjyy/
Cd / etc/systemd/system
Pd-10000 .service
Enable:
Ansible-playbook start.yml
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.