monit-general
[Top][All Lists]
Advanced

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

Re: Monit did not restart mysql


From: Martin Pala
Subject: Re: Monit did not restart mysql
Date: Sun, 2 Jun 2013 10:43:46 +0200

Hi,

please check monit logs and "monit status" for mysqld. You can run monit in debug mode using "-v" option to see more details.

From the description i'm not sure exactly what happened - it seems that mysql was running and you tried to kill/stop it to see whether monit will recover it? As you have two tests, the mysql error should be detected when the process stops (i.e. the PID in the /var/run/mysqld/mysqld.pid file is not present in the process table) and/or if the connection fails.

As Sven correctly pointed out the 127.0.1.1 is wrong, so the connection test probably always failed. Because you have restart action on connection failure, monit will try to restart it - and since there is also the timeout statement, it'll give up after 5 attempts and will disable the service monitoring.

My guess is, that the misconfigured connection test (127.0.1.1 instead of 127.0.0.1) caused monit to restart mysql five times (as the test failed after the restart too), which led to service unmonitoring => monit most probably doesn't watch mysql anymore and if you killed it, it won't restart it.

The solution if this state is to fix the configuration (127.0.1.1 -> 127.0.0.1) and enable mysql monitoring again: "monit monitor mysqld"


Regards,
Martin



On Jun 2, 2013, at 10:19 AM, frwa onto <address@hidden> wrote:

Hi,
    I have tried both 127.0.1.1 and 127.0.0.1 but yet its not working what else could be done?


On Sun, Jun 2, 2013 at 12:58 AM, frwa onto <address@hidden> wrote:
Sorry I got mixed up what different will 127.0.1.1 make indeed? Thank you .


On Sun, Jun 2, 2013 at 12:55 AM, frwa onto <address@hidden> wrote:
What ROFL ?


On Sun, Jun 2, 2013 at 12:44 AM, sven falempin <address@hidden> wrote:

ROFL ROFL

WELCOME TO FAIL
ProTip stop using your brain use CTRL+F or /



On Sat, Jun 1, 2013 at 11:03 AM, frwa onto <address@hidden> wrote:
Hi Sven,
            I already have it as 127.0.0.1 see below
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
   start program = "/etc/init.d/mysqld start"
   stop program = "/etc/init.d/mysqld stop"
   if failed host 127.0.1.1 port 3306 protocol mysql then restart
   if 5 restarts within 5 cycles then timeout


On Sat, Jun 1, 2013 at 8:25 PM, sven falempin <address@hidden> wrote:
127.0.1.1

xd


On Sat, Jun 1, 2013 at 2:58 AM, frwa onto <address@hidden> wrote:
Hi All,
        We have this in our monit.conf. Earlier it was working smoothly when mysql goes down. Recently I just tried to stop mysqld and the monit did not restart it. But in the top I can see monit is running and I am using upstart so I just kill and it respawn again. Below is part of the config file.


check process mysqld with pidfile /var/run/mysqld/mysqld.pid
   start program = "/etc/init.d/mysqld start"
   stop program = "/etc/init.d/mysqld stop"
   if failed host 127.0.1.1 port 3306 protocol mysql then restart
   if 5 restarts within 5 cycles then timeout


Regards,
Frwa.

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



--
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail 
/\ 

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



--
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail 
/\ 

--
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]