[MXS-4255] Xpand Proxy Protocol: Maxscale unable to connect to Xpand cluster when Xpand global proxy_protocol_nets is set Created: 2022-08-23  Updated: 2022-08-29  Resolved: 2022-08-29

Status: Closed
Project: MariaDB MaxScale
Component/s: xpandmon
Affects Version/s: 6.4.1
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Manjinder Nijjar Assignee: Johan Wikman
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

Attachments: File maxscale.cnf     Text File maxscale.log    
Sprint: MXS-SPRINT-165

 Description   

Maxscale is unable to connect to Xpand nodes when global proxy_protocol_nets is configured on xpand. Setting global proxy_protocol_nets is the only way to enable proxy_protocol on Xpand. This was encountered while verifying fix for MXS-4219 I encountered this issue.

Basic Setup:
1. Set 3 node Xpand cluster with all permissions.
2. Install and configure Maxscale dev build version 6.4-MXS-4219
3. All is welll and maxscale able to connect to xpand. Connections are established.

[root@karma075 log]# maxctrl list servers
┌──────────────────────────┬─────────────────────────────┬──────┬─────────────┬─────────────────┬──────┐
│ Server                   │ Address                     │ Port │ Connections │ State           │ GTID │
├──────────────────────────┼─────────────────────────────┼──────┼─────────────┼─────────────────┼──────┤
│ @@Backend-Monitor:node-3 │ 10.2.14.119                 │ 3306 │ 0           │ Master, Running │      │
├──────────────────────────┼─────────────────────────────┼──────┼─────────────┼─────────────────┼──────┤
│ @@Backend-Monitor:node-2 │ 10.2.14.208                 │ 3306 │ 0           │ Master, Running │      │
├──────────────────────────┼─────────────────────────────┼──────┼─────────────┼─────────────────┼──────┤
│ @@Backend-Monitor:node-1 │ 10.2.15.149                 │ 3306 │ 1           │ Master, Running │      │
├──────────────────────────┼─────────────────────────────┼──────┼─────────────┼─────────────────┼──────┤
│ xpand1                   │ karma060.colo.sproutsys.com │ 3306 │ 0           │ Master, Running │      │
└──────────────────────────┴─────────────────────────────┴──────┴─────────────┴─────────────────┴──────┘

Proxy Protocol setup:
4. On xpand, enable proxy protocol (10.2.12.212 is maxscale IP):

MySQL [(none)]> set global proxy_protocol_nets='10.2.12.212/32';
Query OK, 0 rows affected (0.03 sec)

5. Restarting maxscale hangs with following error:

2022-08-23 18:57:25   notice : Loading /etc/maxscale.cnf.
2022-08-23 18:57:25   notice : Module 'readconnroute' loaded from '/usr/lib64/maxscale/libreadconnroute.so'.
2022-08-23 18:57:25   notice : Module 'xpandmon' loaded from '/usr/lib64/maxscale/libxpandmon.so'.
2022-08-23 18:57:25   notice : [xpandmon] sqlite3 database /var/lib/maxscale/Backend-Monitor/xpand_nodes-v1.db open/created and initialized.
2022-08-23 18:57:28   error  : [xpandmon] Backend-Monitor: Could either not ping or create connection to karma060.colo.sproutsys.com:3306: Lost connection to server at 'handshake: reading initial communication packet', system error: 110
2022-08-23 18:57:28   notice : [xpandmon] Attempting to find a Xpand bootstrap node from one of the nodes used during the previous run of MaxScale.
2022-08-23 18:57:28   notice : [xpandmon] Trying to find out cluster nodes from 10.2.15.149:3306.

Setting proxy_protocol=on in /etc/maxscale.cnf does not have any effect.

6. Reset global proxy_protocol_nets on xpand and restart maxscale. All is well again.

MySQL [(none)]> set global proxy_protocol_nets='';
Query OK, 0 rows affected (0.03 sec)

Complete error log and cnf file attached.



 Comments   
Comment by Johan Wikman [ 2022-08-29 ]

This was caused by the MXS-4219 build having been made on top of 6.4 and not 22.08.

Generated at Thu Feb 08 04:27:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.