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. > > Otherwise, you just get a string of messages like the following: > > [EMAIL PROTECTED]:/# less /var/log/nagios/nagios.log > [1117766679] Nagios 1.3 starting... (PID=20707) > [1117766910] Nagios 1.3 starting... (PID=21683) > [1117766910] Error: Could not connect to MySQL database '' on host '' using > username '' and password 'XXXXXX'. Status data will not be saved! > [1117766910] Error: Could not connect to MySQL database '' on host '' using > username '' and password 'XXXXXX'. Retention data will not be processed or > saved! > [1117766910] Error: Could not re-connect to database server on host '' for > status data. I'll keep trying every 60 seconds... > [1117766910] Error: Could not connect to MySQL database '' on host '' using > username '' and password 'XXXXXX' for comment data! > [1117766910] Error: Could not connect to MySQL database '' on host '' using > username '' and password 'XXXXXX' for downtime data! > Only if you've modified the mysql.user table to not accept a blank user. > > which only happen every 60 seconds or so. > > 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. > > 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. > > Finally, even if I've allowed nagios to connect to the database, all > it does is the following: > > [1117768283] Nagios 1.3 starting... (PID=30460) > [1117768283] Error: Could not read program retention data from table > programretention > [1117768283] Error: Could not read host retention data from table > hostretention > [1117768283] Error: Could not read service retention data from table > serviceretention > [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' > > (This is on a brand new chroot with mysql-server already runnign when > nagios was installed, and nagios started up as well.) > > 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. -- Andres Salomon <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part