nagios server from nagios-mysql package cannot connect to mysqld using the config generated by dbconfig-common

Bug #156371 reported by Mircea Vutcovici
4
Affects Status Importance Assigned to Milestone
nagios (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: nagios-mysql

Ubuntu 7.10
# dpkg-query -l nagios-mysql
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=============================================-=============================================-==========================================================================================================
ii nagios-mysql 2:1.4-3.1ubuntu1 A host/service/network monitoring and management system

/var/log/messages
Oct 23 13:58:34 mircea-laptop nagios: Nagios 1.4 starting... (PID=21472)
Oct 23 13:58:34 mircea-laptop nagios: Finished daemonizing... (New PID=21473)
Oct 23 13:58:34 mircea-laptop nagios: Error: Could not connect to MySQL database '' on host '' using username '' and password 'XXXXXX'. Status data will not be saved!
Oct 23 13:58:34 mircea-laptop nagios: Error: Could not connect to MySQL database '' on host '' using username '' and password 'XXXXXX'. Retention data will not be processed or saved!
Oct 23 13:58:34 mircea-laptop nagios: Error: Could not re-connect to database server on host '' for status data. I'll keep trying every 60 seconds...
Oct 23 13:58:34 mircea-laptop nagios: Error: Could not connect to MySQL database '' on host '' using username '' and password 'XXXXXX' for comment data!
Oct 23 13:58:34 mircea-laptop nagios: Error: Could not connect to MySQL database '' on host '' using username '' and password 'XXXXXX' for downtime data!
Oct 23 14:08:34 mircea-laptop nagios: Error: Could not re-connect to database server on host '' for status data. I'll keep trying every 60 seconds...
Oct 23 14:18:34 mircea-laptop nagios: Error: Could not re-connect to database server on host '' for status data. I'll keep trying every 60 seconds...

The CGI interface says that nagios is not running. Nagios is actually running, but cannot connect to mysqld see the previous logs.

Workaround: mv /etc/nagios/resource.cfg /etc/nagios/resource.cfg-old; cp /etc/nagios/database.cfg /etc/nagios/resource.cfg

Revision history for this message
Gianluca La Marca (hanging-rock) wrote :

For me it was also necessary to add the following lines to /etc/nagios/cgi.cfg :

xeddb_database=nagios
xeddb_username=nagios
xeddb_password=xxxxxx

xsddb_database=nagios
xsddb_username=nagios
xsddb_password=xxxxxx

xcddb_database=nagios
xcddb_username=nagios
xcddb_password=xxxxxx

xdddb_database=nagios
xdddb_username=nagios
xdddb_password=xxxxxx

Revision history for this message
Hiran Chaudhuri (hiran-chaudhuri) wrote :

I can confirm both behaviours. Furthermore, I had to create the database and tables manually.

The nagios-mysql installation takes care for apache very well but neglects mysql completely.

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The version of Ubuntu your using is in End of Life status. More information may be found at: https://wiki.ubuntu.com/Releases As well, the issue that you reported should be reproducible with the live environment of the Desktop CD development release - Maverick Meerkat. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find more about the development release at http://www.ubuntu.com/testing/. Please repost a detailed error report and update the bug status. Thanks again and we appreciate your help.

Changed in nagios (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nagios (Ubuntu) because there has been no activity for 60 days.]

Changed in nagios (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.