使用TIUP扩容PD,第一次编写的PD NAME相同,所以扩容失败了。更改PD NAME后,扩容又失败了。检查配置文件发现,第一次失败后,没有回滚操作。导致现在无法启动TIDB了。
edit-config的PD相关内容:
pd_servers:
- host: 192.168.30.30
ssh_port: 22
imported: true
name: pd_localhost
client_port: 2379
peer_port: 2380
deploy_dir: /data1/deploy
data_dir: /data1/deploy/data.pd
log_dir: /data1/deploy/log
arch: amd64
os: linux - host: 192.168.30.31
ssh_port: 22
imported: true
name: pd_localhost2
client_port: 2379
peer_port: 2380
deploy_dir: /data1/pd
data_dir: /data1/pd/data.pd
log_dir: /data1/pd/log
arch: amd64
os: linux - host: 192.168.30.32
ssh_port: 22
imported: true
name: pd_localhost3
client_port: 2379
peer_port: 2380
deploy_dir: /data1/pd
data_dir: /data1/pd/data.pd
log_dir: /data1/pd/log
arch: amd64
os: linux - host: 192.168.30.31
ssh_port: 22
imported: true
name: pd_localhost
client_port: 2379
peer_port: 2380
deploy_dir: /data1/deploy
data_dir: /data1/deploy/data.pd
log_dir: /data1/deploy/log
arch: amd64
os: linux - host: 192.168.30.32
ssh_port: 22
imported: true
name: pd_localhost
client_port: 2379
peer_port: 2380
deploy_dir: /data1/deploy
data_dir: /data1/deploy/data.pd
log_dir: /data1/deploy/log
启动TIDB报错:
[tidb@localhost tiup-yaml]$ tiup cluster start test-cluster
Starting component cluster
: /home/tidb/.tiup/components/cluster/v1.0.7/tiup-cluster start test-cluster
Starting cluster test-cluster…
- [ Serial ] - SSHKeySet: privateKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa, publicKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa.pub
- [Parallel] - UserSSH: user=tidb, host=192.168.30.30
- [Parallel] - UserSSH: user=tidb, host=192.168.30.32
- [Parallel] - UserSSH: user=tidb, host=192.168.30.32
- [Parallel] - UserSSH: user=tidb, host=192.168.30.31
- [Parallel] - UserSSH: user=tidb, host=192.168.30.30
- [Parallel] - UserSSH: user=tidb, host=192.168.30.31
- [Parallel] - UserSSH: user=tidb, host=192.168.30.31
- [Parallel] - UserSSH: user=tidb, host=192.168.30.33
- [Parallel] - UserSSH: user=tidb, host=192.168.30.34
- [Parallel] - UserSSH: user=tidb, host=192.168.30.32
- [Parallel] - UserSSH: user=tidb, host=192.168.30.30
- [Parallel] - UserSSH: user=tidb, host=192.168.30.30
- [Parallel] - UserSSH: user=tidb, host=192.168.30.30
- [ Serial ] - ClusterOperate: operation=StartOperation, options={Roles:[] Nodes:[] Force:false SSHTimeout:5 OptTimeout:60 APITimeout:300 IgnoreConfigCheck:false RetainDataRoles:[] RetainDataNodes:[]}
Starting component pd
Starting instance pd 192.168.30.32:2379
Starting instance pd 192.168.30.31:2379
Starting instance pd 192.168.30.31:2379
Starting instance pd 192.168.30.32:2379
Starting instance pd 192.168.30.30:2379
Failed to start pd-2379.service: Unit pd-2379.service not found.
Failed to start pd-2379.service: Unit pd-2379.service not found.
Start pd 192.168.30.30:2379 success
retry error: operation timed out after 1m0s
pd 192.168.30.32:2379 failed to start: timed out waiting for port 2379 to be started after 1m0s, please check the log of the instance
retry error: operation timed out after 1m0s
pd 192.168.30.32:2379 failed to start: timed out waiting for port 2379 to be started after 1m0s, please check the log of the instance
Error: failed to start: failed to start pd: failed to start: pd 192.168.30.31:2379: executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb@192.168.30.31:22’ {ssh_stderr: Failed to start pd-2379.service: Unit pd-2379.service not found.
, ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c “systemctl daemon-reload && systemctl start pd-2379.service && systemctl enable pd-2379.service”}, cause: Process exited with status 5
Verbose debug logs has been written to /home/tidb/tiup-yaml/logs/tiup-cluster-debug-2020-07-06-15-23-45.log.
Error: run /home/tidb/.tiup/components/cluster/v1.0.7/tiup-cluster
(wd:/home/tidb/.tiup/data/S3wY60d) failed: exit status 1