MaxScale always checked dbserv node lost ,but I do not know why ?
Sometimes, when I connect to Galera cluster through the maxscale proxy, it appears:
FATAL: mysql_drv_query() returned error 2003 (Lost connection to backend server.) ,But the nodes are in normal state.
At the same time, I looked at the maxscale running log and found that the nodes were frequently lost.
Here is the log content
2019-05-13 00:43:27 notice : Server changed state: dbserv1[10.231.3.244:3306]: new_slave. [Running] -> [Slave, Synced, Running] 2019-05-13 00:59:37 notice : Server changed state: dbserv3[10.231.5.52:3306]: lost_slave. [Slave, Synced, Running] -> [Running] 2019-05-13 00:59:47 notice : Server changed state: dbserv3[10.231.5.52:3306]: new_slave. [Running] -> [Slave, Synced, Running] 2019-05-13 02:04:25 notice : Server changed state: dbserv3[10.231.5.52:3306]: lost_slave. [Slave, Synced, Running] -> [Running] 2019-05-13 02:04:35 notice : Server changed state: dbserv3[10.231.5.52:3306]: new_slave. [Running] -> [Slave, Synced, Running] 2019-05-13 02:09:55 error : Failed to create new routing session. Couldn't find eligible candidate server. Freeing allocated resources. 2019-05-13 02:09:55 error : Failed to create new router session for service 'GaleraServiceWrite'. See previous errors for more details. 2019-05-13 02:09:55 notice : Server changed state: dbserv2[10.231.4.180:3306]: lost_master. [Master, Synced, Running] -> [Running] 2019-05-13 02:09:55 notice : Server changed state: dbserv3[10.231.5.52:3306]: new_master. [Slave, Synced, Running] -> [Master, Synced, Running] 2019-05-13 02:10:05 notice : Server changed state: dbserv2[10.231.4.180:3306]: new_master. [Running] -> [Master, Synced, Running] 2019-05-13 02:10:05 notice : Server changed state: dbserv3[10.231.5.52:3306]: new_slave. [Master, Synced, Running] -> [Slave, Synced, Running] 2019-05-13 02:26:24 notice : Server changed state: dbserv2[10.231.4.180:3306]: lost_master. [Master, Synced, Running] -> [Running] 2019-05-13 02:26:24 notice : Server changed state: dbserv3[10.231.5.52:3306]: new_master. [Slave, Synced, Running] -> [Master, Synced, Running] 2019-05-13 02:26:34 notice : Server changed state: dbserv2[10.231.4.180:3306]: new_master. [Running] -> [Master, Synced, Running] 2019-05-13 02:26:34 notice : Server changed state: dbserv3[10.231.5.52:3306]: new_slave. [Master, Synced, Running] -> [Slave, Synced, Running] 2019-05-13 02:45:23 notice : Server changed state: dbserv1[10.231.3.244:3306]: lost_slave. [Slave, Synced, Running] -> [Running] 2019-05-13 02:45:34 notice : Server changed state: dbserv1[10.231.3.244:3306]: new_slave. [Running] -> [Slave, Synced, Running] 2019-05-13 03:14:11 notice : Server changed state: dbserv1[10.231.3.244:3306]: lost_slave. [Slave, Synced, Running] -> [Running] 2019-05-13 03:14:23 notice : Server changed state: dbserv1[10.231.3.244:3306]: new_slave. [Running] -> [Slave, Synced, Running] 2019-05-13 03:26:08 notice : Server changed state: dbserv1[10.231.3.244:3306]: slave_down. [Slave, Synced, Running] -> [Down] 2019-05-13 03:26:18 notice : Server changed state: dbserv1[10.231.3.244:3306]: slave_up. [Down] -> [Slave, Synced, Running] 2019-05-13 03:32:25 error : Failed to route MySQL command 3 to backend server. 2019-05-13 03:32:25 error : Routing the query failed. Session will be closed. 2019-05-13 03:32:25 notice : Server changed state: dbserv2[10.231.4.180:3306]: master_down. [Master, Synced, Running] -> [Down] 2019-05-13 03:32:25 notice : Server changed state: dbserv3[10.231.5.52:3306]: new_master. [Slave, Synced, Running] -> [Master, Synced, Running] 2019-05-13 03:32:37 notice : Server changed state: dbserv2[10.231.4.180:3306]: master_up. [Down] -> [Master, Synced, Running] 2019-05-13 03:32:37 notice : Server changed state: dbserv3[10.231.5.52:3306]: new_slave. [Master, Synced, Running] -> [Slave, Synced, Running] 2019-05-13 03:50:03 notice : Server changed state: dbserv1[10.231.3.244:3306]: lost_slave. [Slave, Synced, Running] -> [Running] 2019-05-13 03:50:14 notice : Server changed state: dbserv1[10.231.3.244:3306]: server_down. [Running] -> [Down] 2019-05-13 03:50:34 error : Failed to route MySQL command 3 to backend server. 2019-05-13 03:50:34 error : Routing the query failed. Session will be closed. 2019-05-13 03:50:35 error : Failed to route MySQL command 3 to backend server. 2019-05-13 03:50:35 error : Routing the query failed. Session will be closed.
Answer Answered by Markus Mäkelä in this comment.
Can you try and see if using the latest 2.3 version fixes it?
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.