TiDB数据库PD混合部署
pd多套集群部署同一机器的问题
--2019-04-25 春雷
1、汇总
1.1、问题
多套tidb集群的pd 部署在同样的机器,pd的服务相同,导致pd无法启动
版本:2.1.2
1.2、问题及解决
修改相关文件的端口部分解决
2、具体
2.1、具体问题
2.1.1、系统服务
/etc/systemd/system
pd.service
2.1.2、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、修复
tidb中控机:
【1、更改部署的】
/work/tidb/tidb-ansible-2.1/roles/pd/tasks/ systemd_deployment.yml
更改:
service_name: pd- {{ pd_client_port }}
【2、滚动升级的】
/work/tidb/tidb-ansible-2.1/ rolling_update.yml
更改:
- 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、更改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、修复后结果
手动删除目标pd机器的:
${deploy_dir}/scripts/start_pd.sh
${ deploy_dir } /scripts/stop_pd.sh
${ deploy_dir } /scripts/run_pd.sh
中控机重新部署:
ansible-playbook deploy.yml -l pd机器IP
检查:
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
郑州不孕不育医院:http://jbk.39.net/yiyuanzaixian/zztjyy/
cd /etc/systemd/system
pd-10000 .service
开启:
ansible-playbook start.yml
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341