google-code-export / mycheckpoint

Automatically exported from code.google.com/p/mycheckpoint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

default configuration file is not parsed

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. install mycheckpoint debian package
2. create the following /etc/mycheckpoint.cnf file
[mycheckpoint]
smtp_host = localhost
smtp_from = admin@xxxxxx.com
smtp_to = guillaume@xxxxxxxxxxx.eu

[client]
host=localhost
socket=/var/run/mysqld/mysqld.sock
user=root
password=
port=3306

3. try to run mycheckpoint

What is the expected output? What do you see instead?
# mycheckpoint   
-- ERROR: Cannot connect to database
-- ERROR: Failed sending email
(2002, "Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysql.sock' (2)")

If I run "mycheckpoint --defaults-file=/etc/mycheckpoint.cnf" then it will run 
correctly. 

What is the output when running with the "--verbose --debug" options?
# mycheckpoint --verbose --debug
-- Will assume /etc/mycheckpoint.cnf as defaults file
-- mycheckpoint rev 132, build 201006041210. Copyright (c) 2009-2010 by Shlomi 
Noach
-- database is mycheckpoint
-- ERROR: Cannot connect to database
-- Sending cannot access message from admin@xxxxxx.com to: 
guillaume@xxxxxxxxxx.eu via: localhost
-- ERROR: Failed sending email
Traceback (most recent call last):
  File "/usr/bin/mycheckpoint", line 3454, in send_email_message
    s = smtplib.SMTP(smtp_host)
  File "smtplib.py", line 244, in __init__
    (code, msg) = self.connect(host, port)
  File "smtplib.py", line 310, in connect
    raise socket.error, msg
error: (111, 'Connection refused')
(2002, "Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysql.sock' (2)")
Traceback (most recent call last):
  File "/usr/bin/mycheckpoint", line 3661, in ?
    monitored_conn, write_conn = open_connections()
  File "/usr/bin/mycheckpoint", line 109, in open_connections
    db = database_name)
  File "/usr/lib/python2.4/site-packages/MySQLdb/__init__.py", line 75, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 164, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2002, "Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysql.sock' (2)")
--
-- Make sure you have executed mycheckpoint with 'deploy' after last 
install/update.upgrade
--  If not, run again with same configuration, and add 'deploy'. e.g.:
--  mycheckpoint --host=my_host deploy
--

Looks like the socket option is not parsed correctly... The email stuff looks 
to be OK. Besides, it would be cool if the default socket would be equivalent 
to what debian uses (mysqld.sock, not mysql.sock)

What version of the mycheckpoint are you using?
mycheckpoint 132-1

What version of the MySQL are you using? (SELECT VERSION())
5.0.51a

On what operating system?
Debian Etch and Lenny


Thanks in advance

Original issue reported on code.google.com by evilfurr...@gmail.com on 28 Jun 2010 at 3:36

Thank you!
This is now fixed in r155 (not yet released). Expect a release withing the next 
couple of weeks or so. Otherwise, grab the sources from the trunk.

Kindly approve that this is now working for you.

Original comment by shlomi.n...@gmail.com on 29 Jun 2010 at 4:57

  • Changed state: Fixed
If i am opening the /usr/bin/python file with vi I get the computer language. 
The Os i'm running Centos 6 MySQL 5.5 MyCheckPoint 208

Original comment by bobput...@gmail.com on 19 Oct 2011 at 11:09

I'm sorry, I don't understand the issue.
First, is this a new bug?
Second, I don't see the problem. Can you please clarify?

Original comment by shlomi.n...@gmail.com on 20 Oct 2011 at 5:51