Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: TIDB集群修改PD的IP地址启动不了
Changing the IP address of the PD in the cluster, but after the modification, the cluster cannot be started. This operation was performed exactly according to 【SOP Series 12】TiUP Modify Cluster IP, Port, and Directory, but it still doesn’t work.
Environment description: My PD has 3 nodes, which are 192.168.1.182, 192.168.1.183, 192.168.1.184, and I changed them to 192.168.1.192, 192.168.1.193, 192.168.1.194.
-
Stop the cluster:
tiup cluster stop tidb-test
-
Modify
/home/tidb/.tiup/storage/cluster/clusters/tidb-test
[tidb@tidb180 tidb-test]$ ls -ll meta.yaml
-rw-r--r-- 1 tidb tidb 3065 Aug 19 21:44 meta.yaml
[tidb@tidb180 tidb-test]$
Modify meta.yaml
-
Change the IP address and restart the network service.
-
Start the cluster and report an error:
[tidb@tidb180 tidb-test]$ tiup cluster:v1.10.3 reload tidb-test -R pd --force
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.10.3/tiup-cluster reload tidb-test -R pd --force
Will reload the cluster tidb-test with restart policy is true, nodes: , roles: pd.
Do you want to continue? [y/N]:(default=N) Y
+ [ Serial ] - SSHKeySet: privateKey=/home/tidb/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa, publicKey=/home/tidb/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa.pub
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.186
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.187
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.192
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.180
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.181
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.180
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.185
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.194
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.180
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.193
+ [Parallel] - UserSSH: user=tidb, host=192.168.1.180
+ [ Serial ] - UpdateTopology: cluster=tidb-test
{"level":"warn","ts":"2022-08-19T21:53:12.896+0800","logger":"etcd-client","caller":"v3@v3.5.4/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0005bce00/192.168.1.192:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"transport: Error while dialing dial tcp 192.168.1.194:2379: connect: connection refused\""}
Error: context deadline exceeded
Verbose debug logs have been written to /home/tidb/.tiup/logs/tiup-cluster-debug-2022-08-19-21-53-13.log