[Pkg-nagios-devel] Bug#311695: Rather difficult to reproduce

Andres Salomon Andres Salomon <dilinger@debian.org>, 311695@bugs.debian.org
Fri, 03 Jun 2005 00:08:54 -0400


--=-8dgJyEL9l9KMeFqow+td
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2005-06-02 at 20:33 -0700, Don Armstrong wrote:
> The only way you can get this bug to occur is if you're configuring
> the database while nagios is running, and manage to create the user so
> nagios can connect, and not give it the appropriate grant statements
> to actually do what it is supposed to do to the database.


Nope; nagios's resource.cfg was totally unconfigured.  What I suspect (I
can tell you for sure tomorrow, when I'm at work) is that one of the
default mysql users (the '' user) was not removed; so, nagios could
connect with user '', and no password.  Just doing a fresh mysql-server
install and a nagios-mysql install gets me:

Jun  2 23:56:10 spiral nagios: Error: Could not lock status data tables
in database ''
Jun  2 23:56:40 spiral last message repeated 2 times
Jun  2 23:57:40 spiral last message repeated 4 times

Same type of error, though not nearly as frequently.

>=20
> Otherwise, you just get a string of messages like the following:
>=20
> root@archimedes:/# less /var/log/nagios/nagios.log=20
> [1117766679] Nagios 1.3 starting... (PID=3D20707)
> [1117766910] Nagios 1.3 starting... (PID=3D21683)
> [1117766910] Error: Could not connect to MySQL database '' on host '' usi=
ng username '' and password 'XXXXXX'.  Status data will not be saved!
> [1117766910] Error: Could not connect to MySQL database '' on host '' usi=
ng username '' and password 'XXXXXX'.  Retention data will not be processed=
 or saved!
> [1117766910] Error: Could not re-connect to database server on host '' fo=
r status data.  I'll keep trying every 60 seconds...
> [1117766910] Error: Could not connect to MySQL database '' on host '' usi=
ng username '' and password 'XXXXXX' for comment data!
> [1117766910] Error: Could not connect to MySQL database '' on host '' usi=
ng username '' and password 'XXXXXX' for downtime data!
>=20

Only if you've modified the mysql.user table to not accept a blank user.

>=20
> which only happen every 60 seconds or so.
>=20
> Since I've no clue why you'd have nagios running while you were
> configuring it, and the package doesn't actually exhibit the behavoir
> you describe when you've just installed it, I don't see this being RC.
>=20

> Of course, nagios should fall back gracefully when it can't insert
> data into a table because of a permisions error, and not try to insert
> the same data over and over.
>=20
> Finally, even if I've allowed nagios to connect to the database, all
> it does is the following:
>=20
> [1117768283] Nagios 1.3 starting... (PID=3D30460)
> [1117768283] Error: Could not read program retention data from table prog=
ramretention
> [1117768283] Error: Could not read host retention data from table hostret=
ention
> [1117768283] Error: Could not read service retention data from table serv=
iceretention
> [1117768283] Error: Could not lock status data tables in database 'nagios=
'
> [1117768298] Error: Could not lock status data tables in database 'nagios=
'
> [1117768313] Error: Could not lock status data tables in database 'nagios=
'
>=20
> (This is on a brand new chroot with mysql-server already runnign when
> nagios was installed, and nagios started up as well.)
>=20
> Since this appears to be unreproduceable on two people's systems,
> critical is clearly the wrong severity.

I disagree; I suspect I'll be able to reproduce it fairly easily, if I
try.  The only wildcard is mysql's setup.


--=20
Andres Salomon <dilinger@debian.org>

--=-8dgJyEL9l9KMeFqow+td
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBCn9fW78o9R9NraMQRAqReAJ4ox94IVS50O/l8WXCpSsL+456VPQCeOnEg
KHBcnjBNroGHlRv0QugnL6w=
=B17Z
-----END PGP SIGNATURE-----

--=-8dgJyEL9l9KMeFqow+td--