monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MySQL host checks in Monit 5.9


From: Jan-Henrik Haukeland
Subject: Re: MySQL host checks in Monit 5.9
Date: Fri, 26 Sep 2014 13:40:52 +0200

Ps. It could also be that if the connection is over TCP on port (3306) then it 
is considered an error, but not if you run the protocol test over a Unix 
Socket. We're testing with both TCP:port and Unix Socket on OS X without 
generating any errors, but only use Unix Socket on Ubuntu. So it might be worth 
testing if you can switch the MySQL connection test to be over Unix Socket only 
and see if the error goes away then. Monit must then of course run on the same 
machine as MySQL and you cannot remotely check MySQL. If you do this, please 
let us know how it went.


On 26 Sep 2014, at 13:27, Jan-Henrik Haukeland <address@hidden> wrote:

> This might explain the problem, 
> http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html. 
> 
> The new MySQL test in Monit 5.9, connects, read the handshake package from 
> MySQL and then disconnect. It is unclear if this operation is considered a 
> "connection request from the given host that were interrupted in the middle”. 
> We didn’t think so and tested the new MySQL protocol test over several days 
> with MySQL 5.5. and 5.6 on OSX and on Ubuntu without the test generating an 
> error and we have max_connect_errors = 10. 
> 
> Can anyone else please confirm that the new MySQL protocol test is generating 
> “host is blocked because of many connection errors”. If not, it might be that 
> Monit is not responsible for this error, but one of your programs. Just 
> speculating. 
> 
> The workaround until this is clarified is to 
> 
> 1. Login to MySQL and issue FLUSH HOSTS;
> 2. then execute "SET GLOBAL max_connect_errors=4294967295;”
> 
> Which should give you at least 135 years until this becomes an error.
> 
> 
> On 25 Sep 2014, at 23:02, Eric Bonfadini <address@hidden> wrote:
> 
>> Hi Martin,
>> 
>> Thanks for your answer.
>> 
>> I unblocked all the hosts using “mysqladmin flush-hosts” and fixed 
>> temporarily the issue, but one hour and a half later I’m in the same 
>> situation on all the machines.
>> My application is anyway working fine and I can connect to mysql using the 
>> command line.
>> 
>> I even tried with a brand new MySQL installation, with anything really 
>> connected to it (apart from Monit) and I notice the same behaviour.
>> The version I’m using is [5.6.20 MySQL Community Server (GPL)] on a CentOS 6.
>> 
>> Regards,
>> Eric
>> 
>> 
>> On 25 Sep 2014, at 14:51, Martin Pala <address@hidden> wrote:
>> 
>>> Hi,
>>> 
>>> Monit 5.9 has new MySQL protocol test - the old one tried anonymous login 
>>> (even negative response was interpreted as success, as MySQL processed the 
>>> request), which generated lot of connection failures and flooded mysql log.
>>> 
>>> The new protocol test doesn't perform the login attempt and also checks the 
>>> response code - if error was returned, the protocol test fails and logs 
>>> details (as in your case). The new protocol test is correct, as when the 
>>> client from which Monit runs the test is blocked, then even application 
>>> which will run on the same host as Monit and will try to connect to MySQL 
>>> will fail as well => MySQL won't work.
>>> 
>>> I recommend to fix the problem as suggested by MySQL error message (unblock 
>>> the host).
>>> 
>>> Regards,
>>> Martin
>>> 
>>> 
>>> 
>>> On 25 Sep 2014, at 13:46, Eric Bonfadini <address@hidden> wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> I installed the new version of Monit (5.9 - binary distribution - 
>>>> http://mmonit.com/monit/dist/binary/5.9/monit-5.9-linux-x64.tar.gz) and 
>>>> now all my MySQL host checks are failing with a message like the following 
>>>> one:
>>>> 
>>>> failed protocol test [MYSQL] at INET[XXX.XXX.XXX.XXX:3306] via TCP -- 
>>>> Server returned error code 1129 -- XXX.XXX.XXX.XXX' is blocked because of 
>>>> many connection errors; unblock with 'mysqladmin flush-hosts'
>>>> 
>>>> Everything was working flawlessly with previous versions of Monit (like 
>>>> 5.8.1)
>>>> Are you aware of any issue with it?
>>>> 
>>>> Thanks,
>>>> Eric
>>>> 
>>>> 
>>>> --
>>>> To unsubscribe:
>>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>> 
>>> --
>>> To unsubscribe:
>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>> 
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]