首次安装成功后,启动数据库失败,请帮忙看下,谢谢

【 TiDB 使用环境`】测试环境
【 TiDB 版本】5.4.1
【遇到的问题】启动报错:Error: failed to start tidb: failed to start: 127.0.0.1 tidb-4000.service, please check the instance’s log(/home/tidb/tidb-deploy/tidb-4000/log) for more detail.: timed out waiting for port 4000 to be started after 2m0s

【复现路径】我的虚拟机的配置是6核8G
【问题现象及影响】

相关日志:tidb-4000.log.gz (22.2 KB)

5 个赞

我是PC上的虚拟机,centos7.4版本

5 个赞
[2022/05/13 13:07:36.325 -04:00] [INFO] [printer.go:34] ["Welcome to TiDB."] ["Release Version"=v5.4.1] [Edition=Community] ["Git Commit Hash"=be484475e76b3aaa2cad520111353c3327db35fa] ["Git Branch"=heads/refs/tags/v5.4.1] ["UTC Build Time"="2022-05-07 04:31:32"] [GoVersion=go1.16.4] ["Race Enabled"=false] ["Check Table Before Drop"=false] ["TiKV Min Version"=v3.0.0-60965b006877ca7234adaced7890d7b029ed1306]

[2022/05/13 19:04:55.649 -04:00] [INFO] [printer.go:34] ["Welcome to TiDB."] ["Release Version"=v5.4.1] [Edition=Community] ["Git Commit Hash"=be484475e76b3aaa2cad520111353c3327db35fa] ["Git Branch"=heads/refs/tags/v5.4.1] ["UTC Build Time"="2022-05-07 04:31:32"] [GoVersion=go1.16.4] ["Race Enabled"=false] ["Check Table Before Drop"=false] ["TiKV Min Version"=v3.0.0-60965b006877ca7234adaced7890d7b029ed1306]

启动两次?4000端口被占用了?

4 个赞

4000端口没被占用,我用的下面的命令启动的:
tiup cluster start mytidb --init
然后就一直卡死在启动4000端口那步

5 个赞

启动两次可能是retry

4 个赞

[root@localhost tidb]# tiup cluster check ./topo.yaml --apply --user root -p
tiup is checking updates for component cluster …
Starting component cluster: /root/.tiup/components/cluster/v1.9.5/tiup-cluster /root/.tiup/components/cluster/v1.9.5/tiup-cluster check ./topo.yaml --apply --user root -p

Error: Deploy port conflicts to an existing cluster (spec.deploy.port_conflict)

The port you specified in the topology file is:
Port: 2379
Component: pd 127.0.0.1

It conflicts to a port in the existing cluster:
Existing Cluster Name: mytidb
Existing Port: 2379
Existing Component: pd 127.0.0.1

Please change to use another port or another host.

3 个赞

2379端口如何修改?

3 个赞

这个是PD的端口,你在拓扑文件中把PD的端口单独设置成其他端口就行

3 个赞

topo.yaml (1.2 KB)

这是我的文件,不知道怎么修改

3 个赞

pd_servers:

  • host: 127.0.0.1
    port: xxxx

是这边修改吧?

2 个赞

对的,就是在pd_servers 里面增加一行port: xxxx就行

1 个赞

怎么配置这些参数,有培训的课程么?

1 个赞

启动了两次吧, 先杀掉所有在,重新初始化下

1 个赞

使用tiup cluster temple 导出模板 有配置说明