[MXS-2252] Proxy Protocol not displaying originating IP address in SHOW PROCESSLIST Created: 2019-01-07 Updated: 2020-08-25 Resolved: 2019-01-17 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | N/A |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Chris Calender (Inactive) | Assignee: | markus makela |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | None | ||
| Description |
|
The newer proxy protocol appears to be working fine on the MaxScale side for authentication. However, what is not working correctly is the display of the originating IP address via SHOW PROCESSLIST. As I understand it, when proxy protocol is used (and enabled), the client IP address is stored in the proxy header and should be returned instead of the MaxScale IP address when looking at a connection via SHOW PROCESSLIST. |
| Comments |
| Comment by Vladislav Vaintroub [ 2019-01-09 ] | ||||||||||||||||||||||||||||||||||
|
Exactly this use case is tested on buildbot, in mysql_client_test test (that fake IP address is returned, with proxy header) | ||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2019-01-09 ] | ||||||||||||||||||||||||||||||||||
|
Remote Host: Server Host: MaxScale Version: 2.3.2 On Server Host:
Thus all should be working and configured properly. On Remote Host: 1. If I connect to port 3306, I see the correct "host":
Id 128 host = chris-laptop.cinci.rr.com (the correct remote host) Also, if I check I_S, the same:
However, if I connect to RW Splitter listener on port 4006:
Note that Id 129 host = chris-linux-laptop-64.cinci.rr.com (the host of MaxScale), whereas it should be the same as above Same if I check I_S too:
| ||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2019-01-15 ] | ||||||||||||||||||||||||||||||||||
|
ccalender Does your maxscale.cnf have proxy_protocol=true in the server sections? Testing with SELECT USER() directly and via MaxScale gives the same results when proxy_protocol is enabled. Even localhost is correctly proxied when a connection is created from the same server where MaxScale resides. | ||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2019-01-16 ] | ||||||||||||||||||||||||||||||||||
|
No, I did not have that variable set in my server sections. After adding it and restarting MaxScale, it began working as expected. Thank you very much! I apologize I overlooked this variable in the variables section of the manual. Also, thank you for now adding it to the proxy protocol section of the manual! Feel free to close this. |