[Pkg-nagios-devel] Bug#291256: marked as done (nagios: Nagios fails with invalid SQL after upgrade)

Debian Bug Tracking System owner@bugs.debian.org
Wed, 19 Jan 2005 12:35:13 -0800


Your message dated Wed, 19 Jan 2005 14:14:02 -0600
with message-id <20050119201402.GA16678@lsli.com>
and subject line nagios: Nagios fails with invalid SQL after upgrade)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 19 Jan 2005 17:41:56 +0000
>From steveg@lsli.com Wed Jan 19 09:41:56 2005
Return-path: <steveg@lsli.com>
Received: from gw.lsli.com [66.47.58.90] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CrJq7-0001FO-00; Wed, 19 Jan 2005 09:41:55 -0800
Received: by gw.lsli.com (Postfix, from userid 501)
	id 37B73288091; Wed, 19 Jan 2005 11:26:50 -0600 (CST)
Received: by lsli.com via smwrap Version 5.1.5
	 id smwraprj16Ih; Wed Jan 19 11:26:16 2005
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: steveg <steveg@lsli.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: nagios: Nagios fails with invalid SQL after upgrade
Reply-To: Steve Greenland <steveg@lsli.com>
Date: Wed, 19 Jan 2005 11:41:19 -0600
Message-Id: <20050119174119.E037B8025@lsli.com>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: nagios
Severity: normal

(Sorry for the long lines, but I wanted to list the log messages and SQL
commands literally.)

After a recent upgrade on a 'testing' machine, nagios is no longer able to update the mysql 
records.  In nagios.log, we have:

[1106156026] Error: Could not insert/update status record for program in table 'programstatus' of database 'nagios'


>From the mysql log, we can see that the command causing the problem is:

INSERT INTO programstatus (last_update,program_start,nagios_pid,daemon_mode,last_command_check,last_log_rotation,enable_notifications,execute_service_checks,accept_passive_service_checks,enable_event_handlers,obsess_over_services,enable_flap_detection,enable_failure_prediction,process_performance_data) VALUES (FROM_UNIXTIME(1106154403),FROM_UNIXTIME(1106154373),'11280','0',FROM_UNIXTIME(1106154401),FROM_UNIXTIME(0),'1','1','1','1','0','0','1','1')

Testing with the mysql client, the problem is the "FROM_UNIXTIME(0)" for the last_log_rotation
field, which produces the error:

ERROR 1048: Column 'last_log_rotation' cannot be null

Substituting a legitimate time value causes the SQL to work. I've no
idea where/how to fix the nagios system.

Note that the "programstatus" table is just an example; I see the same
program with the hoststatus table. My suspicion is that nagios has lost
track of log rotation, but is unable to bootstrap itself.


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.18-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

---------------------------------------
Received: (at 291256-done) by bugs.debian.org; 19 Jan 2005 20:14:05 +0000
>From steveg@lsli.com Wed Jan 19 12:14:05 2005
Return-path: <steveg@lsli.com>
Received: from gw.lsli.com [66.47.58.90] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CrMDM-00054K-00; Wed, 19 Jan 2005 12:14:05 -0800
Received: by gw.lsli.com (Postfix, from userid 501)
	id 10A782880B0; Wed, 19 Jan 2005 13:58:58 -0600 (CST)
Received: by lsli.com via smwrap Version 5.1.5
	 id smwrapuHp2nm; Wed Jan 19 13:58:58 2005
Date: Wed, 19 Jan 2005 14:14:02 -0600
From: Steve Greenland <steveg@lsli.com>
To: <291256-done@bugs.debian.org>
Subject: Re: nagios: Nagios fails with invalid SQL after upgrade)
Message-ID: <20050119201402.GA16678@lsli.com>
References: <20050119174119.E037B8025@lsli.com> <handler.291256.B.11061565164821.ack@bugs.debian.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <handler.291256.B.11061565164821.ack@bugs.debian.org>
User-Agent: Mutt/1.5.6+20040907i
Delivered-To: 291256-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-0.5 required=4.0 tests=BAYES_30 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Nevermind, I saw the reference to the mysql unix time conversion bug.

(Why doesn't the BTS show *all* the bugs for the source package? Note to
self: Must remember to always use the packages.qa.debian.org page...)

Sorry about that.

Steve

-- 
"Outlook not so good." That magic 8-ball knows everything! I'll ask
about Exchange Server next.
                           -- (Stolen from the net)