歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Cacti SQL Failed! Error:’1062′故障排除

Cacti SQL Failed! Error:’1062′故障排除

日期:2017/2/28 16:09:26   编辑:Linux教程

cacti日志報錯:

05/25/2011 11:40:01 AM – SPINE: Poller[0] ERROR: SQL Failed! Error:'1062', Message:'Duplicate entry '3-mem_buffers-2011-05-25 11:40:01' for key 'PRIMARY'', SQL Fragment:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (3,'mem_buffers','2011-05-25 11:40:01','927912'),(4,'mem_swap','2011-05-25 11:40:01','4192956'),(5,'','2011-05-25 11:40:01','1min:0.10 5min:0.16 10min:0.23'),(6,'users','2011-05-25 11:40:01','4'),(7,'proc','2011-05-25 11:40:01','169'),(8,'hdd_free','2011-05-25 11:40:01','47949780'),(8,'hdd_used','2011-05-25 11:40:01','44424292')'

Check
- /etc/crontab
- /etc/cron.d/cacti
- crontab of root and cactiuser

cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

crontab -l -u cactiuser
*/5 * * * * /usr/local/php/bin/php /opt/local/www/html/cacti/poller.php > /dev/null 2>&1

cat /etc/cron.d/cacti
*/5 * * * * cacti php /var/www/cacti/poller.php &>/dev/null
注釋以上語句故障排除。

Copyright © Linux教程網 All Rights Reserved