nagios server from nagios-mysql package cannot connect to mysqld using the config generated by dbconfig-common
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=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii nagios-mysql 2:1.4-3.1ubuntu1 A host/service/
/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/
For me it was also necessary to add the following lines to /etc/nagios/cgi.cfg :
xeddb_database= nagios nagios xxxxxx
xeddb_username=
xeddb_password=
xsddb_database= nagios nagios xxxxxx
xsddb_username=
xsddb_password=
xcddb_database= nagios nagios xxxxxx
xcddb_username=
xcddb_password=
xdddb_database= nagios nagios xxxxxx
xdddb_username=
xdddb_password=