MySQL Error 2006 and 2013

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

Moderators: Developers, Moderators

Post Reply
Djiguidjik
Posts: 35
Joined: Tue Sep 29, 2009 4:36 am

MySQL Error 2006 and 2013

Post by Djiguidjik »

Hi,

I've got the following error in my Cacti LOG :

Code: Select all

10/19/2016 12:41:02 PM - SPINE: Poller[0] WARNING: SQL Failed! Error:'2006', Message:'MySQL server has gone away', Attempting to Reconnect
10/19/2016 12:41:02 PM - SPINE: Poller[0] ERROR: SQL Failed! Error:'2013', Message:'Lost connection to MySQL server during query', SQL Fragment:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (812,'traffic_in','2016-10-19 12:41:02','3889267436'),(812,'traffic_out','2016-10-19 12:41:02','688521102443'),(813,'traffic_in','2016-10-19 12:41:02','2067419188'),(813,'traffic_out','2016-10-19 12:41:02','1044092945327'),(814,'traffic_in','2016-10-19 12:41:02','2960267478'),(814,'traffic_out','2016-10-19 12:41:02','764009017182'),(815,'traffic_in','2016-10-19 12:41:02','3507394352'),(815,'traffic_out','2016-10-19 12:41:02','748565533888'),(816,'traffic_in','2016-10-19 12:41:02','0'),(816,'traffic_out','2016-10-19 12:41:02','0'),(848,'wlctotalap','2016-10-19 12:41:02','560'),(886,'wlcssid01','2016-10-19 12:41:02','1'),(887,'wlcssid02','2016-10-19 12:41:02','41'),(888,'wlcssid03','2016-10-19 12:41:02','0'),(889,'wlcssid04','2016-10-19 12:41:02','52'),(890,'wlctotalclients','2016-10-19 12:41:02','94') ON DUPLICATE KEY UPDATE output=VALUES(output)'
10/19/2016 12:41:02 PM - SPINE: Poller[0] WARNING: SQL Failed! Error:'2006', Message:'MySQL server has gone away', Attempting to Reconnect
10/19/2016 12:41:02 PM - SPINE: Poller[0] ERROR: SQL Failed! Error:'2013', Message:'Lost connection to MySQL server during query', SQL Fragment:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (355,'traffic_in','2016-10-19 12:41:01','10587553848011'),(355,'traffic_out','2016-10-19 12:41:01','6315304880929666'),(356,'5min_cpu','2016-10-19 12:41:01','16'),(368,'traffic_in','2016-10-19 12:41:01','18817262304'),(368,'traffic_out','2016-10-19 12:41:01','279193453468'),(369,'traffic_in','2016-10-19 12:41:01','70518116712663'),(369,'traffic_out','2016-10-19 12:41:01','23757373526990'),(370,'traffic_in','2016-10-19 12:41:01','84'),(370,'traffic_out','2016-10-19 12:41:01','84'),(371,'traffic_in','2016-10-19 12:41:01','84'),(371,'traffic_out','2016-10-19 12:41:01','84'),(372,'traffic_in','2016-10-19 12:41:01','84'),(372,'traffic_out','2016-10-19 12:41:01','84'),(373,'traffic_in','2016-10-19 12:41:01','84'),(373,'traffic_out','2016-10-19 12:41:01','84'),(374,'traffic_in','2016-10-19 12:41:01','42536928'),(374,'traffic_out','2016-10-19 12:41:01','42536928'),(375,'traffic_in','2016-10-19 12:41:01','6985243036'),(375,'traffic_out','2016-10'
I tried to find something on the forum but nothing I found really helps. Any ideas ? :)

Thanks
I run Cacti Version 0.8.8b
I'm on Ubuntu 14.04.1 LTS
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: MySQL Error 2006 and 2013

Post by cigamit »

Check the poller_output table, it is probably crashed. 0.8.8b is a bit old, not sure if it comes with the cli script for repairing the database.
Djiguidjik
Posts: 35
Joined: Tue Sep 29, 2009 4:36 am

Re: MySQL Error 2006 and 2013

Post by Djiguidjik »

I have this from poll_output table ;

Code: Select all

mysql>
mysql> select * from poller_output;
Empty set (0.00 sec)

mysql>
mysql> select * from poller_output;
Empty set (0.00 sec)

mysql>
Is it normal ?
Sorry I took so long to reply... How do I check this table ? Or rebuild it ?

thanks
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: MySQL Error 2006 and 2013

Post by smiles »

Poller output table should only have records in it during polling cycle. It's typically empty.

check your /path-to-cacti/cli folder for repair.database.php
Djiguidjik
Posts: 35
Joined: Tue Sep 29, 2009 4:36 am

Re: MySQL Error 2006 and 2013

Post by Djiguidjik »

Hi,

I've done a repair and now it seems OK.

Ty a lot :D
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: MySQL Error 2006 and 2013

Post by Osiris »

Spine 0.8.8h+ has some changes that work around database connection losses. Oracle just recently fixed a 5 year old bug with lost connections. It's in MySQL 5.7.17, but that release is not supported until Cacti 1.0. The latest 5.5 release might have it too though.
Before history, there was a paradise, now dust.
Djiguidjik
Posts: 35
Joined: Tue Sep 29, 2009 4:36 am

Re: MySQL Error 2006 and 2013

Post by Djiguidjik »

You think I should update my cacti ?
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: MySQL Error 2006 and 2013

Post by Osiris »

If you are a Cacti veteran, and have no fear of change, the GitHub version is quite nice. Don't make the change cold if your job depends on it though.
Before history, there was a paradise, now dust.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest