Page 1 of 1

CCM issues after 1.7 upgrade

Posted: Wed Apr 10, 2013 8:07 pm
by jsmurphy
After upgrading from 1.6 to 1.7 I started getting the following error when opening CCM: "Error connecting to database.", NagiosQL thankfully still works fine.

I noticed that nagiosxi/html/includes/components/ccm/config.inc.php had the default server and credentials in it (I don't know if this is supposed to have the default creds or not), I updated it to the correct details and restarted apache, but this doesn't seem to have resolved the issue.

nagiosxi/html/config.inc.php also has the correct server and credentials in it for nagiosql.

It appears to be attempting to connect to the localhost still but I can't find anywhere else that these settings might live, to point it at the right server:
[Thu Apr 11 10:52:41 2013] [error] [client 172.31.121.248] PHP Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/includes/components/ccm/includes/common_functions.inc.php on line 378, referer: http://nagioshost/nagiosxi/includes/com ... -index.php

Re: CCM issues after 1.7 upgrade

Posted: Thu Apr 11, 2013 8:11 am
by BanditBBS
jsmurphy wrote:nagiosxi/html/includes/components/ccm/config.inc.php
nagiosxi/html/config.inc.php
I can tell you that I am running 1.7 as well. My nagiosxi/html/includes/components/ccm/config.inc.php still has localhost connection information in it. The nagiosxi/html/config.inc.php does have the offloaded mysql information in it. Mine is working fine.

Check this post and my reply - http://support.nagios.com/forum/viewtop ... 875#p36387

Re: CCM issues after 1.7 upgrade

Posted: Thu Apr 11, 2013 9:19 am
by mguthrie
Try running:

Code: Select all

touch /usr/local/nagiosxi/html/config.inc.php
This should force the CCM to update the credentials.

Re: CCM issues after 1.7 upgrade

Posted: Thu Apr 11, 2013 5:24 pm
by jsmurphy
That killed the problem dead, thanks mike :)

Re: CCM issues after 1.7 upgrade

Posted: Thu Apr 11, 2013 6:39 pm
by lmiltchev
Marking this issue as resolved.