在启动TIDB的时候 4000端口无法起来

【 TiDB 使用环境】生产\测试环境\ POC
【 TiDB 版本】tidb6.0
【遇到的问题】在首次启动TIDB的时候 4000端口无法起来
【复现路径】`首次 使用启动命令 tiup cluster start bigbirdmeddb --init
【问题现象及影响】

启动报错


Error: failed to start tidb: failed to start: 10.0.1.145 tidb-4000.service, please check the instance’s log(/mnt/data/tidb-deploy/tidb-4000/log) for more detail.: timed out waiting for port 4000 to be started after 2m0s
日志:
tiup-cluster-debug-2022-06-28-11-18-22.log (530.7 KB)

检查4000端口有没有被占用:netstat -anp | grep 4000

我以前遇到过,其实只要不是被占用都起得来的。我第一次安装失败再安装就这样。你要彻底清空一下。

image

我是从新安装的系统 第一次安装 ,启动就4000 起不来,防火墙已经关闭。

要看一下/mnt/data/tidb-deploy/tidb-4000/log下面的tidb.log文件

看下tidb,log的日志,具体报错是什么

[2022/06/28 11:23:27.687 +08:00] [INFO] [base_client.go:350] ["[pd] switch leader"] [new-leader=http://10.0.1.145:2379] [old-leader=]
[2022/06/28 11:23:27.687 +08:00] [INFO] [base_client.go:105] ["[pd] init cluster id"] [cluster-id=7110132895032081485]
[2022/06/28 11:23:27.687 +08:00] [INFO] [client.go:687] ["[pd] tso dispatcher created"] [dc-location=global]
[2022/06/28 11:23:27.688 +08:00] [INFO] [store.go:80] [“new store with retry success”]
[2022/06/28 11:23:27.696 +08:00] [INFO] [tidb.go:72] [“new domain”] [store=tikv-7110132895032081485] [“ddl lease”=45s] [“stats lease”=3s] [“index usage sync lease”=0s]
[2022/06/28 11:23:27.709 +08:00] [WARN] [info.go:240] [“init TiFlashPlacementManager”] [“pd addrs”="[10.0.1.145:2379]"]
[2022/06/28 11:23:27.724 +08:00] [INFO] [domain.go:171] [“full load InfoSchema success”] [currentSchemaVersion=0] [neededSchemaVersion=32] [“start time”=10.980018ms]
[2022/06/28 11:23:27.724 +08:00] [INFO] [domain.go:431] [“full load and reset schema validator”]
[2022/06/28 11:23:27.724 +08:00] [INFO] [ddl.go:378] ["[ddl] start DDL"] [ID=c99977dd-653b-44fb-8c74-e86edf1cd523] [runWorker=true]
[2022/06/28 11:23:27.724 +08:00] [INFO] [manager.go:189] [“start campaign owner”] [ownerInfo="[ddl] /tidb/ddl/fg/owner"]
[2022/06/28 11:23:27.725 +08:00] [INFO] [ddl.go:367] ["[ddl] start delRangeManager OK"] [“is a emulator”=false]
[2022/06/28 11:23:27.725 +08:00] [INFO] [ddl_worker.go:161] ["[ddl] start DDL worker"] [worker=“worker 2, tp add index”]
[2022/06/28 11:23:27.725 +08:00] [INFO] [ddl_worker.go:161] ["[ddl] start DDL worker"] [worker=“worker 1, tp general”]
[2022/06/28 11:23:27.733 +08:00] [WARN] [coprocessor.go:981] [“other error”] [txnStartTS=434211810887335945] [regionID=38] [storeAddr=10.0.1.145:20160] [error=“other error: [components/tidb_query_datatype/src/expr/ctx.rs:86]: evaluation failed: unknown or incorrect time zone: Asia/Beijing”]
[2022/06/28 11:23:27.733 +08:00] [FATAL] [terror.go:292] [“unexpected error”] [error=“other error: [components/tidb_query_datatype/src/expr/ctx.rs:86]: evaluation failed: unknown or incorrect time zone: Asia/Beijing”] [stack=“github.com/pingcap/tidb/parser/terror.MustNil\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:292\ main.createStoreAndDomain\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:299\ main.main\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:204\ runtime.main\ \t/usr/local/go/src/runtime/proc.go:250”] [stack=“github.com/pingcap/tidb/parser/terror.MustNil\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:292\ main.createStoreAndDomain\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:299\ main.main\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:204\ runtime.main\ \t/usr/local/go/src/runtime/proc.go:250”]
[2022/06/28 11:23:42.934 +08:00] [INFO] [cpuprofile.go:115] [“parallel cpu profiler started”]
[2022/06/28 11:23:42.934 +08:00] [INFO] [printer.go:34] [“Welcome to TiDB.”] [“Release Version”=v6.0.0] [Edition=Community] [“Git Commit Hash”=36a9810441ca0e496cbd22064af274b3be771081] [“Git Branch”=heads/refs/tags/v6.0.0] [“UTC Build Time”=“2022-03-31 10:33:28”] [GoVersion=go1.18] [“Race Enabled”=false] [“Check Table Before Drop”=false] [“TiKV Min Version”=v3.0.0-60965b006877ca7234adaced7890d7b029ed1306]
[2022/06/28 11:23:42.935 +08:00] [INFO] [printer.go:48] [“loaded config”] [config="{“host”:“0.0.0.0”,“advertise-address”:“10.0.1.145”,“port”:4000,“cors”:"",“store”:“tikv”,“path”:“10.0.1.145:2379”,“socket”:"/tmp/tidb-4000.sock",“lease”:“45s”,“run-ddl”:true,“split-table”:true,“token-limit”:1000,“oom-use-tmp-storage”:true,“tmp-storage-path”:"/tmp/1000_tidb/MC4wLjAuMDo0MDAwLzAuMC4wLjA6MTAwODA=/tmp-storage",“oom-action”:“cancel”,“mem-quota-query”:1073741824,“tmp-storage-quota”:-1,“enable-batch-dml”:false,“lower-case-table-names”:2,“server-version”:"",“version-comment”:"",“tidb-edition”:"",“tidb-release-version”:"",“log”:{“level”:“info”,“format”:“text”,“disable-timestamp”:null,“enable-timestamp”:null,“disable-error-stack”:null,“enable-error-stack”:null,“file”:{“filename”:"/mnt/data/tidb-deploy/tidb-4000/log/tidb.log",“max-size”:300,“max-days”:0,“max-backups”:0},“enable-slow-log”:true,“slow-query-file”:"/mnt/data/tidb-deploy/tidb-4000/log/tidb_slow_query.log",“slow-threshold”:300,“expensive-threshold”:10000,“query-log-max-len”:4096,“record-plan-in-slow-log”:1},“security”:{“skip-grant-table”:false,“ssl-ca”:"",“ssl-cert”:"",“ssl-key”:"",“require-secure-transport”:false,"c

Asia/Beijing
修改成Asia/Shanghai

时区问题,看来你自己已经排查出来了:+1:

修改了 时区 重启了 服务器 还是 无法启动

这回日志报的是什么错

[terror.go:292] [“unexpected error”] [error=“other error: [components/tidb_query_datatype/src/expr/ctx.rs:86]: evaluation failed: unknown or incorrect time zone: Asia/Beijing”] [stack=“github.com/pingcap/tidb/parser/terror.MustNil\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:292\ main.createStoreAndDomain\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:299\ main.main\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:204\ runtime.main\ \t/usr/local/go/src/runtime/proc.go:250”] [stack="github.com/pingcap/tidb/parser/terror.MustNil\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:292\ main.createStoreAndDomain\ \t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:299\ main.main\ \t/home/jenkins/agent/workspace/build-com

以下内容辛苦发下,请问有显示配置time_zone么,看起来还是没有改过来
edit-config的tidb相关
/home/tidb/.tiup/storage/cluster/clusters/cluster_name/meta.yaml
/home/tidb/.tiup/storage/cluster/clusters/cluster_name/cache-config下的tidb相关部分

meta.yaml (2.1 KB) tidb-10.0.1.145-4000.service (309 字节) tidb-10.0.1.145-4000.toml (352 字节)

image
edit-config里吧这个配置去掉下看能不能重新启动,如果不能重新启动看有什么报错,这个不是tidb的参数

不能启动 还是 4000 端口 问题