DB error
Re: DB error
OK - but it is still happening even after changing to SERIAL and rerunning database repair. I have to cat /dev/null to my messages file every four hours or it fills my drive.
Re: DB error
*** I found this thread. Tried that, still no good
http://support.nagios.com/forum/viewtop ... 41&p=21916
If you continue to have problems with the table lets run
mysql -u root -pnagiosxi nagios
REPAIR TABLE nagios_timedeventqueue USE_FRM;
*** I found several references to truncating the nagios_timedeventqueue table including
http://marc.info/?l=nagios-devel&m=126295926808951
*** Still getting errors! How can there possibly be a duplicate entry for key 1 when there is no data in the table?
Aug 5 10:44:06 lpnagv01 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_timedeventqueue SET instance_id='1', event_type='0', queued_time=FROM_UNIXTIME(1375713627), queued_time_usec='492085', scheduled_time=FROM_UNIXTIME(1375713798), recurring_event='0', object_id='3414''
Aug 5 10:44:06 lpnagv01 ndo2db: mysql_error: 'Duplicate entry '2147483647' for key 1'
[root@lpnagv01 pnewl01]# echo "select * from nagios_servicechecks;"|mysql -pnagiosxi nagios
[root@lpnagv01 pnewl01]# echo "select * from nagios_systemcommands;"|mysql -pnagiosxi nagios
[root@lpnagv01 pnewl01]# echo "select * from nagios_timedeventqueue;"|mysql -pnagiosxi nagios
[root@lpnagv01 pnewl01]# echo "select * from nagios_timedevents;"|mysql -pnagiosxi nagios
http://support.nagios.com/forum/viewtop ... 41&p=21916
If you continue to have problems with the table lets run
mysql -u root -pnagiosxi nagios
REPAIR TABLE nagios_timedeventqueue USE_FRM;
*** I found several references to truncating the nagios_timedeventqueue table including
http://marc.info/?l=nagios-devel&m=126295926808951
*** Still getting errors! How can there possibly be a duplicate entry for key 1 when there is no data in the table?
Aug 5 10:44:06 lpnagv01 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_timedeventqueue SET instance_id='1', event_type='0', queued_time=FROM_UNIXTIME(1375713627), queued_time_usec='492085', scheduled_time=FROM_UNIXTIME(1375713798), recurring_event='0', object_id='3414''
Aug 5 10:44:06 lpnagv01 ndo2db: mysql_error: 'Duplicate entry '2147483647' for key 1'
[root@lpnagv01 pnewl01]# echo "select * from nagios_servicechecks;"|mysql -pnagiosxi nagios
[root@lpnagv01 pnewl01]# echo "select * from nagios_systemcommands;"|mysql -pnagiosxi nagios
[root@lpnagv01 pnewl01]# echo "select * from nagios_timedeventqueue;"|mysql -pnagiosxi nagios
[root@lpnagv01 pnewl01]# echo "select * from nagios_timedevents;"|mysql -pnagiosxi nagios
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: DB error
Again, as requested before, can you send the following
Also, can you post the output ofscottwilkerson wrote:So the error is still in nagios_timedeventqueue..
Can you runthe reason it is the same number is because that is the max size of the INT field you would have had before making the changeCode: Select all
echo "DESCRIBE nagios_timedeventqueue;"|mysql -pnagiosxi nagios
Code: Select all
tail /var/log/mysqld.logRe: DB error
Sorry Scott - this post didn't show until I closed / reopened my browser. Odd.scottwilkerson wrote:Again, as requested before, can you send the following]
[root@lpnagv01 pnewl01]# echo "DESCRIBE nagios_timedeventqueue;"|mysql -pnagiosxi nagios
Field Type Null Key Default Extra
timedeventqueue_id bigint(20) unsigned NO PRI NULL auto_increment
instance_id smallint(6) NO MUL 0
event_type smallint(6) NO MUL 0
queued_time datetime NO MUL 0000-00-00 00:00:00
queued_time_usec int(11) NO 0
scheduled_time datetime NO MUL 0000-00-00 00:00:00
recurring_event smallint(6) NO 0
object_id int(11) NO MUL 0
Also, can you post the output of /var/log/mysqld.log
130805 10:40:21 mysqld started
130805 10:40:21 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
130805 10:40:21 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
130805 10:40:21 InnoDB: Started; log sequence number 0 43655
130805 10:40:21 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: DB error
No errors reporting for MySQL on this machine, is your MySQL database offloaded? If so you will need to run the command on the remote DB not the local one...
Re: DB error
BINGO! I forgot that this Nagios server has the DB offloaded. Once I ran the 'alter table' on the remote DB server it fixed the problem. Thanks Scott!scottwilkerson wrote:No errors reporting for MySQL on this machine, is your MySQL database offloaded? If so you will need to run the command on the remote DB not the local one...