[MXS-2421] maxctrl stops working with ESOCKETTIMEDOUT Created: 2019-04-03  Updated: 2020-06-03  Resolved: 2019-04-18

Status: Closed
Project: MariaDB MaxScale
Component/s: maxctrl
Affects Version/s: 2.3.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Claudio Nanni Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: need_feedback


 Description   

maxctrl stops working after trying a switchover:

 
[root@server_a ~]# maxctrl list servers
┌─────────┬───────────────┬──────┬─────────────┬─────────────────┬────────────────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │
├─────────┼───────────────┼──────┼─────────────┼─────────────────┼────────────────┤
│ server1 │ 192.168.1.97 │ 3306 │ 0 │ Slave, Running │ 1-1-77,2-2-189 │
├─────────┼───────────────┼──────┼─────────────┼─────────────────┼────────────────┤
│ server2 │ 192.168.1.98 │ 3306 │ 0 │ Master, Running │ 1-1-77,2-2-189 │
└─────────┴───────────────┴──────┴─────────────┴─────────────────┴────────────────┘
 
[root@server_a ~]# maxctrl call command mariadbmon switchover MariaDB-Monitor server1 server2
Error: {
"code": "ESOCKETTIMEDOUT",
"connect": false
}
 
[root@server_a ~]# maxctrl list servers
Error: {
"code": "ESOCKETTIMEDOUT",
"connect": false
}
 
 
 
 
[root@server_a ~]# systemctl stop maxscale
 
[root@server_a ~]# systemctl start maxscale
 
[root@server_a ~]# maxctrl list servers
┌─────────┬───────────────┬──────┬─────────────┬─────────────────┬────────────────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │
├─────────┼───────────────┼──────┼─────────────┼─────────────────┼────────────────┤
│ server1 │ 192.168.1.97 │ 3306 │ 0 │ Slave, Running │ 1-1-77,2-2-189 │
├─────────┼───────────────┼──────┼─────────────┼─────────────────┼────────────────┤
│ server2 │ 192.168.1.98 │ 3306 │ 0 │ Master, Running │ 1-1-77,2-2-189 │
└─────────┴───────────────┴──────┴─────────────┴─────────────────┴────────────────┘
 
[root@server_a ~]# maxctrl call command mariadbmon switchover MariaDB-Monitor server1 server2
Error: {
"code": "ESOCKETTIMEDOUT",
"connect": false
}



 Comments   
Comment by markus makela [ 2019-04-03 ]

This is likely to be fixed by 2.3.5 where the monitor does less locking.

Comment by markus makela [ 2019-04-15 ]

This is not really a bug: the default value of --timeout is 10 seconds and if a failover takes longer than that, the connection is closed. The failover will still proceed but the client won't know. To fix this, increase the timeout to a larger value.

Comment by Claudio Nanni [ 2019-04-15 ]

Why would:

  1. maxctrl list servers

Also timeout?

Comment by markus makela [ 2019-04-16 ]

The command requires data from the monitor to get the GTID values for each server. In 2.3.4, the monitor holds the lock that protects the GTID values for the duration of the failover whereas in 2.3.5 the lock is only held while the values are being updated.

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