Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB6.1.0 集群配置haproxy转发
【TiDB Environment】Test environment
【TiDB Version】6.1.0 Cluster
【Problem Encountered】Installation and configuration combined with column j
192.168.0.153 tidb, tikv …
192.168.0.154 tidb, haproxy
192.168.0.155 tidb, tikv…
【Reproduction Path】How to solve this?
【Problem Phenomenon and Impact】
Currently, telnet 192.168.0.154 14001 is reachable, but the client connection remains in a pending state.
Refer to the official documentation, your HAProxy configuration seems to be missing send-proxy
.
HAProxy Best Practices in TiDB | PingCAP Docs
TiDB Configuration File Description | PingCAP Docs
It still doesn’t work after adding it before.
Not sure what’s going on with this.
Can you connect to TiDB directly using the client?
There is no problem directly connecting to the TiDB port.
How about trying to set the tidb’s proxy-protocol.networks parameter to empty and see if haproxy can connect?
After reloading, the HAProxy method still cannot connect. Direct connection to others works fine.
From the phenomenon, it seems to have been forwarded, but it appears to be pending in terms of database connection…
Please share the HAProxy configuration. My local tests are working fine. You can configure it according to HAProxy 在 TiDB 中的最佳实践 | PingCAP 文档中心.
This is the full configuration of haproxy, with only a new port modified as mentioned above. The configuration of tidb remains the same as before. Please help take a look.
Try changing backend tidb-cluster
to listen tidb-cluster
and see if it works.
It seems to be able to listen, but this error occurred
After encountering this issue, you can directly fill in the relevant IP in TiDB.
Thank you, it seems that the issue is still with the version compatibility in haproxy.
Can you specify what the problem is? Can you explain in detail?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.