Monit can't detect MySQL, but I can
Posted
by
Matchu
on Server Fault
See other posts from Server Fault
or by Matchu
Published on 2011-01-08T21:30:39Z
Indexed on
2011/01/08
21:55 UTC
Read the original article
Hit count: 314
Monit is configured to watch MySQL on localhost at port 3306.
check process mysqld with pidfile /var/lib/mysql/li175-241.pid
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed port 3306 protocol mysql then restart
if 5 restarts within 5 cycles then timeout
My application, which is configured to connect to MySQL via localhost:3306, is running just fine and can access the database. I can even use MySQL Query Browser to connect to the database remotely via port 3306. The port is totally open and possible to connect to. Therefore, I'm pretty darn certain that it's running.
However, running monit -v
reveals that Monit cannot detect MySQL on that port.
'mysqld' failed, cannot open a connection to INET[localhost:3306] via TCP
This happens consistently, until Monit decides not to track MySQL anymore, as configured.
How can I begin to troubleshoot this issue?
© Server Fault or respective owner