pingcap / pingcap/tidb

tidb6.5 版本ip透传无效

Open
#41,041 0 comments 0 reactions 0 assignees View on GitHub
type/question
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

我部署了一套tidb3集群。tidb-server ip部署在192.168.46.33/192.168.46.34/192.168.46.35 三台服务器。同时我在192.168.46.10部署了haporoxy2.2版本。
tidb配置如下:tiup cluster edit-config tidb-test
![image](https://user-images.githubusercontent.com/27714601/216560136-39c0cca6-a542-49ef-9a9b-57e08040b276.png)
haproxy配置如下:
![image](https://user-images.githubusercontent.com/27714601/216560236-c3b1faf1-14ee-4d85-a526-f878688731b2.png)
然后我通过192.168.46.101的mysql5.7.28的客户端远程连接:
mysql -uroot -p'*************' -h192.168.46.10 -P4001
![image](https://user-images.githubusercontent.com/27714601/216560588-3955efd4-42f7-421d-bebf-18f4c56bfe38.png)
现在显示的host一直是192.168.46.10而不是真实客户端ip192.168.46.101

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported connection through HAProxy 2.2 using the provided mysql client command, then inspect how TiDB records the connection host when traffic passes through the proxy. Done means determining whether the real client IP can be preserved and documenting or fixing the behavior accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql
Domain
databases, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.