TiDB Single-Node Deployment TiKV Connection Timeout

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

Original topic: tidb单机部署tikv连接超时

| username: TiDBer_rFkoHSL7

[TiDB Usage Environment] Production Environment
[TiDB Version] 6.5.0
[Reproduction Path] tiup cluster start tidb-test --init
[Encountered Problem: Phenomenon and Impact] Timeout when connecting to TiKV during cluster startup
[Resource Configuration]

[Attachments: Screenshots/Logs/Monitoring]
tiup-cluster-debug-2023-04-07-10-26-10.log (466.6 KB)
tikv.log (75.7 MB)
topology.yaml (380 bytes)

This is the error log. I checked it and found no other errors except for a missing system package. This package cannot be installed temporarily in the production environment. Could you please check if the issue is due to the missing package?

| username: xfworld | Original post link

The default value of tidb_enable_clustered_index is INT_ONLY, which means that only tables with integer primary keys will use clustered indexes. If you want to enable clustered indexes for all tables, you can set it to ON.

| username: TiDBer_rFkoHSL7 | Original post link

There is no error, so I don’t know why the connection timed out.

| username: 啦啦啦啦啦 | Original post link

There are a lot of warnings in the logs reporting “PD cluster failed to respond.” Check if the PD cluster is functioning normally and if the network between TiKV and the PD cluster is stable.

| username: xfworld | Original post link

If there aren’t enough machines, I suggest you use virtual machines…

A single master node can be quite troublesome.

| username: TiDBer_rFkoHSL7 | Original post link

It is indeed an error reported in the PD log:
[FATAL] [main.go:117] [“run server failed”] [error=“[PD:etcd:ErrStartEtcd]listen tcp bind: address already in use: listen tcp bind: address already in use”] [stack=“main.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:117\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250”]
Does anyone know how to solve this error?

| username: 啦啦啦啦啦 | Original post link

Port 2380 is used for communication between PD cluster nodes. It seems that this port is occupied, which might indicate an issue with the topology planning of the single-node deployment.

| username: TiDBer_rFkoHSL7 | Original post link

Can the port be changed? Change 2380 to a specified port.

| username: 啦啦啦啦啦 | Original post link

You can change the peer_port, and use different ports for multiple nodes on a single machine, right?

| username: TiDBer_rFkoHSL7 | Original post link

Started. Not bad. I encountered some issues during installation last night, but they were resolved this afternoon. If it were Oracle, who knows if it would be fixed by next week.
By the way, I’ll leave my configuration here for others to see:

  user: "tidb"
  ssh_port: 22
  deploy_dir: "/home/tidb/tidb-deploy"
  data_dir: "/home/tidb/tidb-data"
server_configs: {}
  - host: ip
    client_port: 2384
    peer_port: 2385
  - host: ip
  - host: ip
  - host: ip
  - host: ip
  - host: ip
| username: 孤君888 | Original post link

Is there a port conflict?

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.