shlomi-noach / mycheckpoint

Automatically exported from code.google.com/p/mycheckpoint
1 stars 3 forks source link

Mycheckpoint runs forever when mysql-server is not responding correctly #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Shutdown mysqld
2. tty 1: ncat -l dev-gnt-2.int.linuxvoid.org 3306
3. tty 2: time mycheckpoint --host=sysserver1.int.linuxvoid.org 
--monitored-host=dev-gnt-2.int.linuxvoid.org --database=mycheckpoint_devgnt2 -v

What is the expected output? What do you see instead?
Time-out expected within 1 or 2 minutes. But it runs to infinity and back.

What is the output when running with the "--verbose --debug" options?
On ^C in ncat:
-- Using /etc/mycheckpoint.cnf as defaults file
-- mycheckpoint rev 208, build 201011041330. Copyright (c) 2009-2010 by Shlomi 
Noach
-- database is mycheckpoint_devgnt2
-- monitored host is: dev-gnt-2.int.dirkzwager.com
-- monitored host credentials undefined; using write host credentials
-- ERROR: Cannot connect to database
-- Sending cannot access message from mycheckpoint@dev-gnt-2.int.dirkzwager.com 
to: mklapwijk@dirkzwager.com via: smtp.int.dirkzwager.com
-- + Sent
(2013, "Lost connection to MySQL server at 'reading initial communication 
packet', system error: 0")
--
-- Re-execute with --verbose --debug for detailed message and strack trace.
--

real    65m3.434s
user    0m0.100s
sys     0m0.000s

On ^C in mycheckpoint followed by ^C in ncat:
-- Using /etc/mycheckpoint.cnf as defaults file
-- mycheckpoint rev 208, build 201011041330. Copyright (c) 2009-2010 by Shlomi 
Noach
-- database is mycheckpoint_devgnt2
-- monitored host is: dev-gnt-2.int.dirkzwager.com
-- monitored host credentials undefined; using write host credentials
^C
Traceback (most recent call last):
  File "/usr/bin/mycheckpoint", line 4845, in <module>
    monitored_conn, write_conn = open_connections()
KeyboardInterrupt

real    0m10.904s
user    0m0.100s
sys     0m0.000s

What version of the mycheckpoint are you using?
rev. 208

What version of the MySQL are you using? (SELECT VERSION())
mysql  Ver 14.14 Distrib 5.1.52, for pc-linux-gnu (x86_64) using readline 5.1

On what operating system?
Linux dev-gnt-2 2.6.34-gentoo-r6 #1 SMP Tue Sep 28 10:16:39 CEST 2010 x86_64 
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux

Please provide any additional information below.
As requested in issue 23.

Original issue reported on code.google.com by mdklapw...@linuxvoid.org on 21 Sep 2011 at 11:13

GoogleCodeExporter commented 9 years ago
I'll need to check on python-mysqldb, which is the module responsible for 
communicating with mysql, whether I can set socket timeout. 
Otherwise, I may kill the program in a separate thread.

Original comment by shlomi.n...@gmail.com on 21 Sep 2011 at 11:54