Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy-protocol = "v2" doesn't work well #346

Open
shawn0915 opened this issue Aug 24, 2023 · 4 comments
Open

proxy-protocol = "v2" doesn't work well #346

shawn0915 opened this issue Aug 24, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@shawn0915
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

tiproxy --config tiproxy.toml

[proxy]
require-backend-tls = false
proxy-protocol = "v2"

2. What did you expect to see? (Required)

3. What did you see instead (Required)

mysql --comments --host 127.0.0.1 --port 6000 -u root
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0

4. What is your version? (Required)

tiproxy: main,
tidb: 7.0.0

@djshow832
Copy link
Collaborator

djshow832 commented Aug 24, 2023

Did you turn on the TiDB proxy protocol?
https://docs.pingcap.com/tidb/stable/command-line-flags-for-tidb-configuration#--proxy-protocol-networks

If this flag is left empty, no IP address can connect to TiDB using the PROXY protocol.

@shawn0915
Copy link
Contributor Author

Did you turn on the TiDB proxy protocol? https://docs.pingcap.com/tidb/stable/command-line-flags-for-tidb-configuration#--proxy-protocol-networks

If this flag is left empty, no IP address can connect to TiDB using the PROXY protocol.

oh, ur right.
and, do you know how that show port :0?

mysql> \r
Connection id:    100
Current database: *** NONE ***

mysql> show processlist;
+--------------------+------+-------------+------+---------+------+------------+------------------+
| Id                 | User | Host        | db   | Command | Time | State      | Info             |
+--------------------+------+-------------+------+---------+------+------------+------------------+
| 151132271284322879 | root | 127.0.0.1:0 | NULL | Query   |    0 | autocommit | show processlist |
+--------------------+------+-------------+------+---------+------+------------+------------------+
1 row in set (0.01 sec)

@djshow832
Copy link
Collaborator

Did you turn on the TiDB proxy protocol? https://docs.pingcap.com/tidb/stable/command-line-flags-for-tidb-configuration#--proxy-protocol-networks

If this flag is left empty, no IP address can connect to TiDB using the PROXY protocol.

oh, ur right. and, do you know how that show port :0?

mysql> \r
Connection id:    100
Current database: *** NONE ***

mysql> show processlist;
+--------------------+------+-------------+------+---------+------+------------+------------------+
| Id                 | User | Host        | db   | Command | Time | State      | Info             |
+--------------------+------+-------------+------+---------+------+------------+------------------+
| 151132271284322879 | root | 127.0.0.1:0 | NULL | Query   |    0 | autocommit | show processlist |
+--------------------+------+-------------+------+---------+------+------------+------------------+
1 row in set (0.01 sec)

Good point. I didn't realize that yet. We'll investigate it and keep this issue. cc @xhebox

@xhebox
Copy link
Collaborator

xhebox commented Aug 25, 2023

Bug of tidb or go-proxyprotocol.

@xhebox xhebox self-assigned this Aug 30, 2023
@djshow832 djshow832 added the bug Something isn't working label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants