ERROR: illegal attempt to update using time

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
poperszky
Posts: 25
Joined: Mon Mar 04, 2002 7:00 pm

ERROR: illegal attempt to update using time

Post by poperszky »

I had a NTP server freak out on me and start handing a date out that was several weeks in the future. Since then rrdtool has generated the following error every time Cacti trys to run it for collection:

ERROR: illegal attempt to update using time 1032184031 when last update time is 1033302900 (minimum one second step)

What do I do to fix this?

Terry
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This error happens when rrdtool thinks you are handing it more data than it thinks you should in a given time period. I have often wondered how to fix this myself. The date/time is off on my server as well, and changing the time would mess up the rrd like you said.

Do any rrd hackers out there have any insight into this?

(I would start by doing an rrdtool dump <filename.rrd> and seeing if there is anything obvious that could be altered)

Sorry I wasn't more of a help.

-Ian
poperszky
Posts: 25
Joined: Mon Mar 04, 2002 7:00 pm

This is the response that I received off of the RRD mailing

Post by poperszky »

> When I do a rrdtool dump, it shows a large gap of data where the NTP
> server malfunctioned, the data collection for a few days afterwards,
> then no data collection after I reset the date. Is there any way to
> fix this?

Sure. Restore a backup.

If you didn't backup your database, you can probably(!) change the database but make sure you understand the round robin mechanism.

1) visualize each RRA as a circle and a hand. The hand points to the
next slot to be filled. The entire amount of time in this RRA is
the amount of time per row times the amount of time per entry
2) from that position, go back in time one row at a time. For each
entry encountered, decrease the timestamp with the amount of time
in that RRA. This means you're canceling that update
3) alter the last update time

This only covered the basics. There's much more happening in reality. For each RRA there's also an entry where the next row is prepared as each PDP is inserted in that RRA.

Most likely the best way to cope with this (short of restoring your
backup!) is to go back in time so that each RRA has no partial updates happening (I think this is called the least common denominator?).

Oh, and don't forget to set each row that was "rolled back" to NaN. I'm talking about step 2 here. If you don't, you will have altered the past.
poperszky
Posts: 25
Joined: Mon Mar 04, 2002 7:00 pm

Post by poperszky »

The restore worked fine, but once I run the collection command it sets all the lines up to the current date to NaN (which I believe is correct behavior), the error messages are gone. BUT, the rrd files are not being updated and Cacti still shows no information.
illsci

b0h

Post by illsci »

thats usual cacti behavior... :)
poperszky
Posts: 25
Joined: Mon Mar 04, 2002 7:00 pm

Post by poperszky »

Spoke too soon, the rrd files ARE being updated but no information in Cacti. If I delete the rrd and recreate it, everything works fine.
bocasman
Posts: 24
Joined: Mon Aug 19, 2002 8:27 am
Location: Panama
Contact:

Post by bocasman »

I havind the same error that you reports some time ago. But I think that I not going to be able tu dump my MySQLdb 'cause I dont have a backup to restore from, any else thing that have could be done to fix my problem, and for dont pass it again?

Code: Select all

ERROR: illegal attempt to update using time 1034443518 when last update time is 1034443518 (minimum one second step)
ERROR: illegal attempt to update using time 1034443518 when last update time is 1034443518 (minimum one second step)
ERROR: illegal attempt to update using time 1034443518 when last update time is 1034443518 (minimum one second step)
ERROR: illegal attempt to update using time 1034443519 when last update time is 1034443519 (minimum one second step)
ERROR: illegal attempt to update using time 1034443519 when last update time is 1034443519 (minimum one second step)
ERROR: illegal attempt to update using time 1034443520 when last update time is 1034443520 (minimum one second step)
Thanks.
Regards,
BM
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests