mysql protocol test not compatible?

Issue #25 resolved
Michael Bakker created an issue

Today I partitially rolled out monit 5.7 (was 5.1.1 before) and the MySQL service check always fails:

'mysqld' failed protocol test [MYSQL] at INET[localhost:3306] via TCP -- MYSQL: error receiving login response

As far as I see there was not relevant change between 5.7 and 5.8 concerning the mysql protocol test anyway I even tried it with 5.8 which behave the same concerning this problem.

My plattform information are:

  • monit: 5.7, 5.8
  • OS: Debian 6.0 (squeeze)
  • MySQL: Percona 5.5.36-34.2-648.squeeze

Monit Service configuration:

check process mysqld with pidfile "/var/run/mysqld/mysqld.pid" start program = "/etc/init.d/mysql start" with timeout 60 seconds stop program = "/etc/init.d/mysql stop" if failed port 3306 protocol mysql then restart

Is there anything special in this Percona version thats not compatible?

Comments (11)

  1. Tildeslash repo owner

    In Monit 5.7 we merged this PR which revert to using the MySQL 4.1 protocol to support connection via proxy (I believe).

  2. Michael Bakker reporter

    Maybe thats the problem in my case. Can I supply any more information or debug stuff for you in this case?

  3. Tildeslash repo owner

    Maybe Percona is not so much a drop-in replacement for MySQL as it wants us to believe? MySQL 5.x seems to work fine with this new-old mysql protocol test, so not sure what todo. If we revert the old code back then something else breaks. Some versioning is probably best, like protocol mysql version 4 and without version, defaults to latest (5.x protocol), protocol mysql. We'll think about it.

  4. Michael Bakker reporter

    If its not possible to have a 100% compatible code for all different versions its an absolutely reasonable way to have it configurable. Maybe you can have a look at the latest 5.5 percona sources so see whats the difference exactly.

    Just let me know if I can do some tests for you.

  5. Tildeslash repo owner

    I have tried to replicate the problem with Percona 5.5.34 (part of Ubuntu 14.04) - works normally (using development Monit version):

    'percona' succeeded testing protocol [MYSQL] at INET[localhost:3306] via TCP
    

    The related Monit configuration:

    check process percona with pidfile /var/run/mysqld/mysqld.pid
        if failed port 3306 protocol mysql then alert
    

    Please can you test it with the development Monit version and see if the problem still persists? You can get it here:

    https://bitbucket.org/tildeslash/monit/get/master.tar.gz
    

    To compile:

    ./bootstrap
    ./configure
    make
    

    If the problem will persist, please get the network trace of Monit mysql test attempt and send it to support@mmonit.com, for example this way:

    tcpdump -i any -s 0 -w /tmp/mysql.pcap port 3306
    

    (refine the filter to match Monit host only - if there is other traffic, you can filter out packets related to Monit only to not uncover sensitive data ... for example using Wireshark).

  6. Michael Bakker reporter

    The host where I was experiencing this issue was somehow screwed up :-/ Obviously MySQL was working from my point of view although this monit problem appeared. I have now reinstalled the machine and I cannot reproduce this problem anymore with different Percona versions.

    Sorry for wasting your time!

  7. Log in to comment