Boost server not reconnecting to MySQL as expected.

Support for the Plugin Architecture

Moderators: Developers, Moderators

Post Reply
Ganesha1902
Posts: 3
Joined: Fri Oct 01, 2010 9:02 am

Boost server not reconnecting to MySQL as expected.

Post by Ganesha1902 »

Hi All,

Before I begin I would just like to say a huge thanks for all your work on the boost plugin and Cacti in general. It is a pretty awesome product and you guys do a awesome job dealing with all the user issues that arise.

Now on to the nitty gritty. :P

I seem to be having an issue with the boost server, where it occasionally loses connection to the MySQL DB. This in turn means I have issue viewing graphs as all my Cacti functions are split between separate servers.
The MySQL error type I get in the logs is type '2006'. I have had a look around and it was suggested on some forums that the max_allowed_packet was not large enough on the mysql server. I have since increased the size of this to 64M. I did not think that would be the issue, as it is such a small select. This did not solve the issue and I now think that for some reason invalid information is being passed to MySQL and the connection is then being dropped.

I have had a look through the Cacti code, and I can see that should a result not contain any data, the code does a db_close and then attempts a db_connect_real. I think this is where the issue comes in and the connection is not properly torn down. If I kill the boost_server at any time while I have this issue, once it restarts and creates a new connection it works as expected. I can see there is something wrong with the connection in my logs as I get a MySQL error type '0'.
I am then unable to connect from the Web interface to the boost_server for on demand updates. It looks like boost loses all of its settings and then blocks the web server IP as it is no longer authorized to communication with the boost server.

I was just wondering if you had any idea where I could look to get this issue sorted. Please give me a shout if you need any more info. I hope you can help and thanks again for all the hard work.

Cacti Setup:
Cacti Version: 0.8.7g
Plugin Architecture Version: 2.8
Boost Version: 4.2
PHP: 5.2.14
MySQL: 5.0.77
Centos 5.5

1 x rrdupdate server, boost server
1 x Web frontend using rrd files from update server over nfs mount.
1 x poller Server
1 x DB server

DB connections are only reaching a quarter of the max connections so I do not think it is a connection limit issue with MySQL.

Code: Select all

grep -r ERROR /var/www/cacti/log/cacti.log
10/01/2010 07:56:02 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:02 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:04 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:05 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:05 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:05 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:05 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:05 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:05 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:05 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:05 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:06 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:06 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:06 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:06 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:06 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:06 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:06 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:56:09 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
10/01/2010 07:59:54 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SHOW TABLES LIKE '%boost%'"
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Boost server not reconnecting to MySQL as expected.

Post by TheWitness »

Download the following from SVN (branches/0.8.7):

lib/database.php

Also apply the PIA 2.9 beta. We should be releasing patches soon enough for the lib/database.php issue soon enough.

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?
Ganesha1902
Posts: 3
Joined: Fri Oct 01, 2010 9:02 am

Re: Boost server not reconnecting to MySQL as expected.

Post by Ganesha1902 »

Hello TheWitness,

Sorry for not replying to your previous update, I have been OOO.

A colleague of mine has implemented your new lib file and this seems to be working as expected. Although we are only using the new lib file due to the PA being in beta still. Our test instance of Cacti is not the same setup as live so we wont be able to replicate there. I will continue to monitor the issue and inform you of the status at the end of the week.

Thanks again for the help and all the hard work. :D
Ganesha1902
Posts: 3
Joined: Fri Oct 01, 2010 9:02 am

Re: Boost server not reconnecting to MySQL as expected.

Post by Ganesha1902 »

Hi,

This does still seem to be stable and I have not had any more issues related to this one.

Thanks again!
bobapple
Posts: 5
Joined: Mon May 30, 2011 6:19 am

Re: Boost server not reconnecting to MySQL as expected.

Post by bobapple »

hi,

i have the same problem as described above.

I replaced lib/database.php with the one from svn and i am using PA 2.9 with boost 4.3.1 and cacti 0.8.7g

after replacing database.php i can now see the graphs if i click 2 or 3 times on the link, but thats no solution.

is there anything i can do to solve this?
otherwise cacti is getting unusable for me

thanks in advance
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Boost server not reconnecting to MySQL as expected.

Post by TheWitness »

Boost 5.0 contains a correction to address this. It is as of yet, unreleased. You can download and install current SVN as it's stable. You can also do a diff of the boost_server.php and glean the differences.

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?
bobapple
Posts: 5
Joined: Mon May 30, 2011 6:19 am

Re: Boost server not reconnecting to MySQL as expected.

Post by bobapple »

Replacing boost_server.php fixes the bug.

Thanks thewitness
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest