Upgrade to 1.2.2 Cacti & Spine (Poller problems)

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

Moderators: Moderators, Developers

Post Reply
Author
Message
Lalbee99
Cacti User
Posts: 95
Joined: Mon Mar 03, 2008 2:07 pm

Upgrade to 1.2.2 Cacti & Spine (Poller problems)

#1 Post by Lalbee99 » Wed Feb 27, 2019 2:04 pm

I have upgraded both my cacti & spine from 0.8.8b to 1.2.2. When I run the poller I am seeing is alot of messages in the cacti error log that say

MYSQL: Connection Failed: Error:'2003', Message:'Can't connect to MySQL server on '127.0.0.1' (4)'


I am able to login to the database fom the server with the following command line examples with no problems:

I don't see how the poller could be throwing those errors if I can connect without an issue

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

[[email protected] log]# mysql -u cacti -h 127.0.0.1 -p -P 3306
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 450
Server version: 5.5.60-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

[[email protected]]# mysql -u cacti -h localhost -p -P 3306
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 451
Server version: 5.5.60-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

netniV
Cacti Guru User
Posts: 3020
Joined: Sun Aug 27, 2017 12:05 am

Re: Upgrade to 1.2.2 Cacti & Spine (Poller problems)

#2 Post by netniV » Thu Feb 28, 2019 12:19 pm

Check your cacti.conf and your spine.conf (if you are using spine) have the correct settings for the database. Also, if you only experience this from apache, check that allow network connections is on and you have all the required modules.

Additionally, make sure you have the correct path for your spine.conf set.

pianograndpulp
Posts: 10
Joined: Wed Mar 22, 2017 3:31 pm
Location: Saint Louis, MO
Contact:

Re: Upgrade to 1.2.2 Cacti & Spine (Poller problems)

#3 Post by pianograndpulp » Sun Jun 30, 2019 12:44 am

Did you happen to figure out this error message? I'm tracking down a lot of aborted connections in my Cacti MariaDB. The first huge chunk of disconnects was simply having too many connections to the database because I set the thread pool waaaaay higher than it needed to be. However - I'm still getting about 20 errors every polling cycle.

MYSQL: Connection Failed: Error:'2003', Message:'Can't connect to MySQL server on '<hostname>' (4)'

Running spine on version 1.2.3 - and I've been able to remove most if not all of the gaps in the graphs. Just wondering how to track down these last few stragglers as both sides (Cacti and MariaDB) are complaining a little bit - but everything appears to be okay now...

Thanks!

_DS

netniV
Cacti Guru User
Posts: 3020
Joined: Sun Aug 27, 2017 12:05 am

Re: Upgrade to 1.2.2 Cacti & Spine (Poller problems)

#4 Post by netniV » Mon Jul 01, 2019 5:27 pm

Try reducing things a little bit more or upping the maximum number of connections on MySQL?

pianograndpulp
Posts: 10
Joined: Wed Mar 22, 2017 3:31 pm
Location: Saint Louis, MO
Contact:

Re: Upgrade to 1.2.2 Cacti & Spine (Poller problems)

#5 Post by pianograndpulp » Mon Jul 01, 2019 6:39 pm

I have had the max connections at 2000 and when I looked, the most number of connections to my DB as been 303. I've tried several combinations of threads, processes, and script servers but those few connections aborted still sneak in - maybe down to 4-5 per 30 second polling period - and it's always spine doing it - never the UI. Will keep hunting! Thanks!!

User avatar
Osiris
Cacti Pro User
Posts: 886
Joined: Mon Jan 05, 2015 10:10 am

Re: Upgrade to 1.2.2 Cacti & Spine (Poller problems)

#6 Post by Osiris » Tue Jul 02, 2019 7:19 am

There are two issues that this could be. First there is a setting call 'max_connection_errors'. Set it real high. There periodically 'flush hosts' (once a day or so).

Second issue is a MySQL client library bug that was fixed a while ago. I just use MariaDB these days, and some of the more recent versions. If using MySQL, I would use the latest 5.6 or 5.7 versions. MySQL at those levels is pretty solid. You will have to recompile spine of course.
Before history, there was a paradise, now dust.

Post Reply