Issue with TiKV Failing to Start After Changing tidb-data and tidb-deploy Directories

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 更换tidb-data 、 tidb-deploy目录后tikv无法启动问题

| username: Alan

After moving the tidb-data and tidb-deploy directories to the home directory, TiKV went down. Could someone please help take a look?

| username: Alan | Original post link

Error: failed to start: failed to start tikv: failed to start: 172.16.243.235 tikv-20160.service, please check the instance’s log(/home/tidb-deploy/tikv-20160/log) for more detail.: timed out waiting for port 20160 to be started after 2m0s

| username: Alan | Original post link

No corresponding logs are generated under tikv/log either.

| username: Alan | Original post link

Here is the tiup log:
{“error”: “operation timed out after 2m0s”}
2022-10-24T15:29:49.715+0800 DEBUG TaskFinish {“task”: “RestartCluster”, “error”: “failed to start: failed to start tikv: failed to start: 172.16.243.235 tikv-20160.service, please check the instance’s log(/home/tidb-deploy/tikv-20160/log) for more detail.: timed out waiting for port 20160 to be started after 2m0s”, “errorVerbose”: “timed out waiting for port 20160 to be started after 2m0s\ngithub.com/pingcap/tiup/pkg/cluster/module.(*WaitFor).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/module/wait_for.go:91\ngithub.com/pingcap/tiup/pkg/cluster/spec.PortStarted\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/instance.go:119\ngithub.com/pingcap/tiup/pkg/cluster/spec.(*BaseInstance).Ready\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/instance.go:151\ngithub.com/pingcap/tiup/pkg/cluster/operation.startInstance\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/action.go:405\ngithub.com/pingcap/tiup/pkg/cluster/operation.StartComponent.func1\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/action.go:534\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220819030929-7fc1605a5dde/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594\nfailed to start: 172.16.243.235 tikv-20160.service, please check the instance’s log(/home/tidb-deploy/tikv-20160/log) for more detail.\nfailed to start tikv\nfailed to start”}
2022-10-24T15:29:49.715+0800 INFO Execute command finished {“code”: 1, “error”: “failed to start: failed to start tikv: failed to start: 172.16.243.235 tikv-20160.service, please check the instance’s log(/home/tidb-deploy/tikv-20160/log) for more detail.: timed out waiting for port 20160 to be started after 2m0s”, “errorVerbose”: “timed out waiting for port 20160 to be started after 2m0s\ngithub.com/pingcap/tiup/pkg/cluster/module.(*WaitFor).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/module/wait_for.go:91\ngithub.com/pingcap/tiup/pkg/cluster/spec.PortStarted\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/instance.go:119\ngithub.com/pingcap/tiup/pkg/cluster/spec.(*BaseInstance).Ready\n\tgithub.com/pingcap/tiup/pkg/cluster/spec/instance.go:151\ngithub.com/pingcap/tiup/pkg/cluster/operation.startInstance\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/action.go:405\ngithub.com/pingcap/tiup/pkg/cluster/operation.StartComponent.func1\n\tgithub.com/pingcap/tiup/pkg/cluster/operation/action.go:534\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220819030929-7fc1605a5dde/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594\nfailed to start: 172.16.243.235 tikv-20160.service, please check the instance’s log(/home/tidb-deploy/tikv-20160/log) for more detail.\nfailed to start tikv\nfailed to start”}

| username: h5n1 | Original post link

Did you directly move or copy it over? Find the tikv-20160.service file and then check the startup file path inside and modify it. Use tiup cluster edit-config to change the directory of this TiKV.

| username: Alan | Original post link

Yes, it was copied over.

| username: Alan | Original post link

The path to config tikv is correct.

| username: h5n1 | Original post link

Check the meta.yaml file under the ~/.tiup directory to see if it matches.

| username: Alan | Original post link

That’s right :saluting_face:

| username: Lucien-卢西恩 | Original post link

Did you follow these steps? Did you find any missing files?