MYSQL error: Duplicate key when polling
Moderators: Developers, Moderators
MYSQL error: Duplicate key when polling
I am seeing a lot of errors:
...
07/12/2006 10:45:02 AM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '3-mem_buffers-2006-07-12 10:45:01' for key 1'
07/12/2006 10:45:02 AM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '17-traffic_in-2006-07-12 10:45:01' for key 1'
07/12/2006 10:45:03 AM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '28-traffic_in-2006-07-12 10:45:01' for key 1'
...
more that 100. I don't know what table the error is coming from.
Anyone have any thoughts on this?
Thanks,
Josh
...
07/12/2006 10:45:02 AM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '3-mem_buffers-2006-07-12 10:45:01' for key 1'
07/12/2006 10:45:02 AM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '17-traffic_in-2006-07-12 10:45:01' for key 1'
07/12/2006 10:45:03 AM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '28-traffic_in-2006-07-12 10:45:01' for key 1'
...
more that 100. I don't know what table the error is coming from.
Anyone have any thoughts on this?
Thanks,
Josh
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Wait for a polling cycle to complete.
When the poller is not running, run the following query on you Cacti database:
It seems a poller crashed in the past leaving items in the poller_output table. Under normal operation, when the poller is not running, this table will have not items in it.
When the poller is not running, run the following query on you Cacti database:
Code: Select all
truncate poller_output;
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
ahh
looking at this table there are no left over entries.
I did just notice that my poller frequency seems to be too short. polling is taking longer than 5 minutes. The previous poller is not done by the time the next one is launched.
I am already using CACTID so I will have to look into why this is taking so long. I did increase snmp timeouts as well as ping timeout so this may be a factor.
Thanks,
Josh
I did just notice that my poller frequency seems to be too short. polling is taking longer than 5 minutes. The previous poller is not done by the time the next one is launched.
I am already using CACTID so I will have to look into why this is taking so long. I did increase snmp timeouts as well as ping timeout so this may be a factor.
Thanks,
Josh
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
How many devices and data source do you have?
How much memory does the server have? You might help you polling time buy just adding more memory to increase the OS disk cache.
How much memory does the server have? You might help you polling time buy just adding more memory to increase the OS disk cache.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Look at the SYSTEM STATS line in the Cacti log and it will tell me all I need to know.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
here is what I am seeing now. pretty much the same:
Code: Select all
07/12/2006 04:45:17 PM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '1572-traffic_in-2006-07-12 16:45:09' for key 1'
07/12/2006 04:49:54 PM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
07/12/2006 04:49:54 PM - SYSTEM STATS: Time:292.4031 Method:cactid Processes:10 Threads:12 Hosts:126 HostsPerProcess:13 DataSources:1533 RRDsProcessed:1358
07/12/2006 04:49:54 PM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
07/12/2006 04:49:54 PM - SYSTEM STATS: Time:292.4074 Method:cactid Processes:10 Threads:12 Hosts:126 HostsPerProcess:13 DataSources:1533 RRDsProcessed:1304
07/12/2006 04:49:54 PM - PCOMMAND: Poller[0] Host[11] WARNING: Recache Event Detected for Host
07/12/2006 04:49:54 PM - PCOMMAND: Poller[0] Host[11] WARNING: Recache Event Detected for Host
07/12/2006 04:49:54 PM - THOLD: Poller[0] Checking Thresholds
07/12/2006 04:49:54 PM - THOLD: Poller[0] Checking Thresholds
07/12/2006 04:49:55 PM - PCOMMAND: Poller[0] Host[15] WARNING: Recache Event Detected for Host
07/12/2006 04:49:55 PM - PCOMMAND: Poller[0] Host[15] WARNING: Recache Event Detected for Host
07/12/2006 04:49:56 PM - PCOMMAND: Poller[0] Host[17] WARNING: Recache Event Detected for Host
07/12/2006 04:49:56 PM - PCOMMAND: Poller[0] Host[17] WARNING: Recache Event Detected for Host
07/12/2006 04:49:57 PM - PCOMMAND: Poller[0] Host[20] WARNING: Recache Event Detected for Host
07/12/2006 04:49:57 PM - PCOMMAND: Poller[0] Host[20] WARNING: Recache Event Detected for Host
07/12/2006 04:50:02 PM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '3-mem_buffers-2006-07-12 16:50:01' for key 1'
07/12/2006 04:50:02 PM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '17-traffic_in-2006-07-12 16:50:01' for key 1'
07/12/2006 04:50:03 PM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '28-traffic_in-2006-07-12 16:50:01' for key 1'
07/12/2006 04:50:03 PM - CACTID: Poller[0] ERROR: Problem with MySQL: 'Duplicate entry '149-traffic_in-2006-07-12 16:50:02' for key 1'
ok got it:
Code: Select all
07/13/2006 02:55:15 PM - SYSTEM STATS: Time:13.8235 Method:cactid Processes:10 Threads:12 Hosts:126 HostsPerProcess:13 DataSources:1533 RRDsProcessed:1280
07/13/2006 02:55:15 PM - SYSTEM STATS: Time:13.8333 Method:cactid Processes:10 Threads:12 Hosts:126 HostsPerProcess:13 DataSources:1533 RRDsProcessed:1197
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
What OS? Distro?
I would suggest you take the poller offline and run a check/repair on the database.
I would suggest you take the poller offline and run a check/repair on the database.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Can you please update to the SVN version of Cactid? BRANCH_0_8_6. This problem is caused by a data query.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest