Cacti: Spine: poller [0] error: SQL failed! Error: '000000', message: 'duplicate entry.

Source: Internet
Author: User

My version is 0.8.7d. This problem has not been solved for a long time. Recently, I upgraded cacti from 0.8.7d to 0.8.7e, but still reported an error of inserting duplicate keys.

Finally, I found the cause carefully and finally solved the problem:

 

Spine: poller [0] error: SQL failed! Error: '200', message: 'duplicate entry '68-cpu-2011-02-16 18:00:03' for key 1'

 

 
Since cacti 0.8.7d for Windows was installed earlier, I do not know whether it is a version bug or a configuration problem. The added host cannot be deleted, later, the data is manually deleted from mysql. However, due to the unclear relationship between the tables in the cacti configuration library, junk data is left in some tables. The duplicate entry should be related to the junk data.
The junk data does not exist in the host table of the cacti database, but its data sources data still exists:

1. Use "message: 'duplicate entry'216-cpu-18:00:03 'for key 1:

Search for cpu_216 in Console> system utilities> poller cache> search.

 

 

 

2. According to the search result above, we can see that the data source name is 192.168.0.216, and then search the IP address in data sources.

Select the result related to 192.168.0.216, select Delete in the lower-right corner, and delete it (before deletion, check the devices to check whether the host exists, which generally does not exist ).

In this way, we can delete the excess junk data sources.

In fact, there is another way to go to the cacti database of MySQL, select * From poller_item P;

Search for the data with none behavior in the result, and find the junk data sources in the rrd_pach column, and then delete the data from the cacti web interface.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.