启动TIDB失败

【 TiDB 使用环境】生产环境 /测试
【 TiDB 版本】v6.1.0
【遇到的问题】tidb启动失败
topology.yaml:

pd_servers:
  - host: 172.17.0.154

tidb_servers:
  - host: 172.17.0.154

tikv_servers:
  - host: 172.17.0.155
  - host: 172.17.0.156
  - host: 172.17.0.157

tiflash_servers:
  - host: 172.17.0.158
    data_dir: /tidb-data/tiflash-9000
    deploy_dir: /tidb-deploy/tiflash-9000

monitoring_servers:
  - host: 172.17.0.159

grafana_servers:
  - host: 172.17.0.159

alertmanager_servers:
  - host: 172.17.0.159

image

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

【问题现象及影响】
log
Execute command finished {“code”: 1, “error”: “failed to start tidb: failed to start: 172.17.0.154 tidb-4000.service, please check the instance’s log(/tidb-deploy/tidb-4000/log) for more detail.: timed out waiting for port 4000 to be started after 2m0s”, “errorVerbose”: “timed out waiting for port 4000 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.17.0.154 tidb-4000.service, please check the instance’s log(/tidb-deploy/tidb-4000/log) for more detail.\nfailed to start tidb”}

tidb.log报错信息:
[FATAL] [session.go:3052] [“check bootstrapped failed”] [error=“context deadline exceeded”] [stack=“github.com/pingcap/tidb/session.getStoreBootstrapVersion\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:3052\ngithub.com/pingcap/tidb/session.BootstrapSession\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2827\nmain.createStoreAndDomain\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:296\nmain.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:202\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250”]
【附件】

防火墙已经关闭
image

4000端口
image

please check the instance’s log(/tidb-deploy/tidb-4000/log)

看下日志了

tiup cluster check 这个通过吗

1.检查下部署和数据目录权限问题
2.用启动脚本进行tidb启动,查看日志报什么具体错误

tiup cluster check ./topology.yaml --apply --user root -p 看一下详情

tidb.log报错信息:
[FATAL] [session.go:3052] [“check bootstrapped failed”] [error=“context deadline exceeded”] [stack=“github.com/pingcap/tidb/session.getStoreBootstrapVersion\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:3052\ngithub.com/pingcap/tidb/session.BootstrapSession\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2827\nmain.createStoreAndDomain\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:296\nmain.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:202\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250”]

check bootstrapped failed
检查都没过呢…

tiup cluster check --apply 修复一下

检查一下配置看看

您好,请问在机器上添加数据盘 EXT4 文件系统挂载参数完,check还是说mount point / does not have ‘nodelalloc’ option set



image

您好,请问在机器上添加数据盘 EXT4 文件系统挂载参数完,check还是说mount point / does not have ‘nodelalloc’ option set

image

没挂上去吧,你在/data1,/data2 ,/data3 写入数据试试

用mount命令检查,是有的
image
磁盘情况
image

这个只能自己多检查了,然后更改配置后,用 tiup cluster check 进行配置检查

大佬,所以我这个配置问题出在哪里呢

你看命令的结果是什么咯,在根据这个结果检查配置了

check完说mount point / does not have ‘nodelalloc’ option set

mount point / does not have ‘noatime’ option set

编辑/etc/fstab文件,增加nodelalloc和noatime的配置,配置如下


需要对照你自己的环境,对着文档搞,不然还是会检查不通过的 (PS 上面只是一个例子)

可以检查一下端口和配置文件里组件的路径;磁盘挂载和平常使用的方式不一样