"Invalid handshake packet sequence id -- not MySQL protocol" with mariadb
I have a simple database check for if mariab is running:
check process mariadb with pidfile /var/run/mariadb/mariadb.pid
group database
start program = "/usr/sbin/service mariadb start"
stop program = "/usr/sbin/service mariadb stop"
if failed port 3306 protocol mysql for 3 cycles then restart
if 10 restarts within 10 cycles then timeout
but I keep getting:
2022-08-10 10:45:05 24 [Warning] Aborted connection 24 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
[2022-08-10T10:41:57+0000] debug : Socket test failed for [127.0.0.1]:3306 -- Invalid handshake packet sequence id -- not MySQL protocol
[2022-08-10T10:41:57+0000] error : 'mysqld' failed protocol test [MYSQL] at [localhost]:3306 [TCP/IP] -- Invalid handshake packet sequence id -- not MySQL protocol
[2022-08-10T10:41:57+0000] debug : -------------------------------------------------------------------------------
[2022-08-10T10:41:57+0000] debug : monit() [0x42062b]
[2022-08-10T10:41:57+0000] debug : monit() [0x4212b4]
[2022-08-10T10:41:57+0000] debug : monit() [0x41a377]
[2022-08-10T10:41:57+0000] debug : monit() [0x43402c]
[2022-08-10T10:41:57+0000] debug : monit() [0x43597b]
[2022-08-10T10:41:57+0000] debug : monit() [0x4357d3]
[2022-08-10T10:41:57+0000] debug : monit() [0x40586d]
[2022-08-10T10:41:57+0000] debug : /lib64/libc.so.6(__libc_start_main+0xea) [0x7f1fed97613a]
[2022-08-10T10:41:57+0000] debug : monit() [0x406215]
using:
This is Monit version 5.32.0
Built with ssl, with ipv6, with compression, with pam and with large files
Copyright (C) 2001-2022 Tildeslash Ltd. All Rights Reserved.
with mariadb
Version: '10.5.10-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
Comments (5)
-
repo owner -
reporter I’m not really sure how to do that. I’m on a linux command line
Is there debug version of monit or something instead?
-
repo owner you can use tcpdump then:
sudo tcpdump -i any -s 0 -w mysql.pcap port 3306
please send the mysql.pcap to support@mmonit.com
-
repo owner - changed status to resolved
Fixed: Issue
#1047: If the MariaDB server doesn't allow access to the host from which Monit test is running, Monit reported "Invalid handshake packet sequence id -- not MySQL protocol".→ <<cset 0a9f448df85a>>
-
repo owner Fixed. It seems the error was MariaDB specific - it worked fine with true MySQL, as it returns packet sequence number #0 in the same error situation and Monit reported the error correctly.
- Log in to comment
please can you send a network trace? (you can use for example Wireshark)