【 TiDB 使用环境】测试/
【 TiDB 版本】
tidb新创建集群,在启动时报错:
Starting component tikv
Starting instance 10.42.32.4:20161
Starting instance 10.42.32.5:20160
Starting instance 10.42.32.3:20161
Start instance 10.42.32.5:20160 success
Start instance 10.42.32.4:20161 success
Error: failed to start tikv: failed to start: 10.42.32.3 tikv-20161.service, please check the instance’s log(/opt/tidb-deploy/tikv-20161/log) for more detail.: timed out waiting for port 20161 to be started after 2m0s
根据提示查看tikv日志发现未启动的tikv节点一直在重启:
[2025/12/24 20:31:47.648 +08:00] [INFO] [resource_group.rs:151] [“add resource group”] [ru=2147483647] [name=default] [thread_id=1]
[2025/12/24 20:31:47.650 +08:00] [INFO] [resource_group.rs:151] [“add resource group”] [ru=2147483647] [name=default] [thread_id=26]
[2025/12/24 20:31:47.650 +08:00] [INFO] [service.rs:70] [“pd meta client creating watch stream.”] [rev=5915] [path=resource_group/settings] [thread_id=26]
[2025/12/24 20:31:47.652 +08:00] [INFO] [service.rs:193] [“load controller config”] [config=“RequestUnitConfig { read_base_cost: 0.125, read_cost_per_byte: 1.52587890625e-5, write_base_cost: 1.0, write_cost_per_byte: 0.0009765625, read_cpu_ms_cost: 0.3333333333333333 }”] [thread_id=25]
[2025/12/24 20:31:47.653 +08:00] [INFO] [mod.rs:130] [“encryption: none of key dictionary and file dictionary are found.”] [thread_id=1]
[2025/12/24 20:31:47.654 +08:00] [INFO] [mod.rs:549] [“encryption is disabled.”] [thread_id=1]
[2025/12/24 20:31:47.657 +08:00] [INFO] [engine.rs:93] [“Recovering raft logs takes 2.715525ms”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:91] [“Welcome to TiKV”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:96] [“Release Version: 8.5.4”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:96] [“Edition: Community”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:96] [“Git Commit Hash: 4855bdccc64e7a8551d30ebbbd5be75a42929265”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:96] [“Git Commit Branch: HEAD”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:96] [“UTC Build Time: 2025-11-20 06:49:28”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:96] [“Rust Version: rustc 1.77.0-nightly (89e2160c4 2023-12-27)”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:96] [“Enable Features: memory-engine pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine trace-async-tasks openssl-vendored”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [lib.rs:96] [“Profile: dist_release”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [fips.rs:40] [“OpenSSL FIPS mode is disabled”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [mod.rs:125] [“cgroup quota: memory=Some(9223372036854771712), cpu=None, cores={14, 28, 30, 8, 10, 3, 16, 25, 21, 26, 13, 5, 11, 29, 23, 6, 15, 18, 22, 4, 2, 9, 31, 19, 1, 7, 20, 0, 27, 12, 24, 17}”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [mod.rs:132] [“memory limit in bytes: 135047979008, cpu cores quota: 32”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [WARN] [lib.rs:528] [“environment variable TZ is missing, using /etc/localtime”] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [config.rs:914] [“kernel parameters”] [value=32768] [param=net.core.somaxconn] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [config.rs:914] [“kernel parameters”] [value=0] [param=net.ipv4.tcp_syncookies] [thread_id=1]
[2025/12/24 20:32:03.568 +08:00] [INFO] [config.rs:914] [“kernel parameters”] [value=0] [param=vm.swappiness] [thread_id=1]
[2025/12/24 20:32:03.586 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=10.42.32.3:2379] [thread_id=1]
[2025/12/24 20:32:03.587 +08:00] [INFO] [] [“TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be used thereafter”] [thread_id=1]
[2025/12/24 20:32:03.591 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=10.42.32.4:2379] [thread_id=1]
[2025/12/24 20:32:03.594 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=10.42.32.5:2379] [thread_id=1]
[2025/12/24 20:32:03.595 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=http://10.42.32.3:2379] [thread_id=1]
[2025/12/24 20:32:03.597 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=http://10.42.32.5:2379] [thread_id=1]
[2025/12/24 20:32:03.599 +08:00] [INFO] [util.rs:809] [“connected to PD member”] [endpoints=http://10.42.32.5:2379] [thread_id=1]
[2025/12/24 20:32:03.600 +08:00] [INFO] [util.rs:631] [“all PD endpoints are consistent”] [endpoints=“["10.42.32.3:2379", "10.42.32.4:2379", "10.42.32.5:2379"]”] [thread_id=1]
[2025/12/24 20:32:03.602 +08:00] [INFO] [common.rs:327] [“connect to PD cluster”] [cluster_id=7587347571922148693] [thread_id=1]
[2025/12/24 20:32:03.606 +08:00] [INFO] [config.rs:438] [“using default coprocessor quota”] [quota=ReadableSize(16880997376)] [thread_id=1]
[2025/12/24 20:32:03.607 +08:00] [WARN] [mod.rs:2044] [“raft-engine.batch-compression-threshold 8KiB should be adpative to the size of async-io. Set it to 4KiB instead.”] [thread_id=1]
[2025/12/24 20:32:03.608 +08:00] [INFO] [config.rs:438] [“using default coprocessor quota”] [quota=ReadableSize(16880997376)] [thread_id=1]
[2025/12/24 20:32:03.608 +08:00] [INFO] [common.rs:447] [“beginning system configuration check”] [thread_id=1]
…
[2025/12/24 20:32:03.618 +08:00] [INFO] [mod.rs:130] [“encryption: none of key dictionary and file dictionary are found.”] [thread_id=1]
[2025/12/24 20:32:03.618 +08:00] [INFO] [mod.rs:549] [“encryption is disabled.”] [thread_id=1]
[2025/12/24 20:32:03.620 +08:00] [INFO] [engine.rs:93] [“Recovering raft logs takes 1.92425ms”] [thread_id=1]
[2025/12/24 20:32:19.284 +08:00] [INFO] [lib.rs:91] [“Welcome to TiKV”] [thread_id=1]
[2025/12/24 20:32:19.284 +08:00] [INFO] [lib.rs:96] [“Release Version: 8.5.4”] [thread_id=1]
[2025/12/24 20:32:19.284 +08:00] [INFO] [lib.rs:96] [“Edition: Community”] [thread_id=1]
[2025/12/24 20:32:19.284 +08:00] [INFO] [lib.rs:96] [“Git Commit Hash: 4855bdccc64e7a8551d30ebbbd5be75a42929265”] [thread_id=1]
[2025/12/24 20:32:19.284 +08:00] [INFO] [lib.rs:96] [“Git Commit Branch: HEAD”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [lib.rs:96] [“UTC Build Time: 2025-11-20 06:49:28”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [lib.rs:96] [“Rust Version: rustc 1.77.0-nightly (89e2160c4 2023-12-27)”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [lib.rs:96] [“Enable Features: memory-engine pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine trace-async-tasks openssl-vendored”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [lib.rs:96] [“Profile: dist_release”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [fips.rs:40] [“OpenSSL FIPS mode is disabled”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [mod.rs:125] [“cgroup quota: memory=Some(9223372036854771712), cpu=None, cores={3, 5, 4, 31, 13, 10, 19, 7, 25, 20, 11, 16, 12, 15, 18, 0, 23, 17, 6, 22, 21, 1, 28, 8, 9, 30, 27, 14, 26, 2, 24, 29}”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [mod.rs:132] [“memory limit in bytes: 135047979008, cpu cores quota: 32”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [WARN] [lib.rs:528] [“environment variable TZ is missing, using /etc/localtime”] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [config.rs:914] [“kernel parameters”] [value=32768] [param=net.core.somaxconn] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [config.rs:914] [“kernel parameters”] [value=0] [param=net.ipv4.tcp_syncookies] [thread_id=1]
[2025/12/24 20:32:19.285 +08:00] [INFO] [config.rs:914] [“kernel parameters”] [value=0] [param=vm.swappiness] [thread_id=1]
[2025/12/24 20:32:19.304 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=10.42.32.3:2379] [thread_id=1]
[2025/12/24 20:32:19.304 +08:00] [INFO] [] [“TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be used thereafter”] [thread_id=1]
[2025/12/24 20:32:19.308 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=10.42.32.4:2379] [thread_id=1]
[2025/12/24 20:32:19.310 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=10.42.32.5:2379] [thread_id=1]
[2025/12/24 20:32:19.311 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=http://10.42.32.3:2379] [thread_id=1]
[2025/12/24 20:32:19.313 +08:00] [INFO] [util.rs:639] [“connecting to PD endpoint”] [endpoints=http://10.42.32.5:2379] [thread_id=1]
[2025/12/24 20:32:19.315 +08:00] [INFO] [util.rs:809] [“connected to PD member”] [endpoints=http://10.42.32.5:2379] [thread_id=1]
[2025/12/24 20:32:19.315 +08:00] [INFO] [util.rs:631] [“all PD endpoints are consistent”] [endpoints=“["10.42.32.3:2379", "10.42.32.4:2379", "10.42.32.5:2379"]”] [thread_id=1]
[2025/12/24 20:32:19.317 +08:00] [INFO] [common.rs:327] [“connect to PD cluster”] [cluster_id=7587347571922148693] [thread_id=1]
[2025/12/24 20:32:19.322 +08:00] [INFO] [config.rs:438] [“using default coprocessor quota”] [quota=ReadableSize(16880997376)] [thread_id=1]
[2025/12/24 20:32:19.322 +08:00] [WARN] [mod.rs:2044] [“raft-engine.batch-compression-threshold 8KiB should be adpative to the size of async-io. Set it to 4KiB instead.”] [thread_id=1]
[2025/12/24 20:32:19.323 +08:00] [INFO] [config.rs:438] [“using default coprocessor quota”] [quota=ReadableSize(16880997376)] [thread_id=1]
[2025/12/24 20:32:19.324 +08:00] [INFO] [common.rs:447] [“beginning system configuration check”] [thread_id=1]
[2025/12/24 20:32:19.324 +08:00] [INFO] [config.rs:1101] [“data dir”] [mount_fs=“FsInfo { tp: "xfs", opts: "rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota", mnt_dir: "/opt", fsname: "/dev/vdb" }”] [data_path=/opt/tidb-data/tikv-20162] [thread_id=1]
[2025/12/24 20:32:19.324 +08:00] [WARN] [config.rs:1104] [“not on SSD device”] [data_path=/opt/tidb-data/tikv-20162] [thread_id=1]
[2025/12/24 20:32:19.324 +08:00] [INFO] [config.rs:1101] [“data dir”] [mount_fs=“FsInfo { tp: "xfs", opts: "rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota", mnt_dir: "/opt", fsname: "/dev/vdb" }”] [data_path=/opt/tidb-data/tikv-20162/raft] [thread_id=1]
[2025/12/24 20:32:19.325 +08:00] [WARN] [config.rs:1104] [“not on SSD device”] [data_path=/opt/tidb-data/tikv-20162/raft] [thread_id=1]
以上是点3的tikv日志,上面启动日志显示点4节点tikv已经正常启动,但启动后立马掉线,后台日志查看也是一直在重启,期间试过改变端口,发现还是一样,真正端口也未被占用。