Remote pooler stuck in Heartbeat

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

Moderators: Developers, Moderators

Post Reply
enrikio
Posts: 14
Joined: Wed Jan 10, 2024 8:32 am

Remote pooler stuck in Heartbeat

Post by enrikio »

I deployed a new remote pooler on remote location and now have trouble when doing full sync of both data collectors of getting the remote pooler into "Idle" (it always stays in Heartbeat). All database GRANTS are correct from both ends (Both are on cacti 1.2.26 and spine 1.3.0, spine.conf and config.php were also edited accordingly on both ends with correct db values of both). Anyone knows the root cause of this?

Note: on remote pooler logs I am getting a lot of "CMDPHP ERROR: A DB Exec Failed!, Error: Unknown or incorrect time zone: 'Europe/Ljubljana'".

I checked in /etc/php/7.4/apache2/php.ini and /etc/php/7.4/cli/php.ini and it looks like i have it right...Could this make problems?
Attachments
RemotePoolerTrouble.png
RemotePoolerTrouble.png (142.25 KiB) Viewed 867 times
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Remote pooler stuck in Heartbeat

Post by macan »

Result of SQL query:
SELECT * FROM mysql.time_zone_name where name like '%lju%';


Have a look at mysql timezone mentioned here
https://docs.cacti.net/General-Installi ... uctions.md
Let the Cacti grow!
enrikio
Posts: 14
Joined: Wed Jan 10, 2024 8:32 am

Re: Remote pooler stuck in Heartbeat

Post by enrikio »

Thanks; now I got rid of Error: Unknown or incorrect time zone on remote pooler. But still, when i try to make full sync of both data collectors: main pooler and remote pooler, the remote pooler stays in Heartbeat mode (and again; connection test is succesfull when i open remote pooler on main pooler).

Any further advice?
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Remote pooler stuck in Heartbeat

Post by macan »

on remote poller try to run php script:
<?php
phpinfo();
?>

and check timezone. Is it correct?

You didn't show result of sql query from main poller and remote poller:
SELECT * FROM mysql.time_zone_name where name like '%lju%';
Let the Cacti grow!
enrikio
Posts: 14
Joined: Wed Jan 10, 2024 8:32 am

Re: Remote pooler stuck in Heartbeat

Post by enrikio »

Hello,

I correctly set timezone, because the database now also shows the timezone Europe/Ljubljana...
I think i found what the problem could be but can't figure out the solution; please hear me out...

We have site to site vpn to remote cacti which is in completely other network segment. Initially we just opened ports 3306, 443 and 80, and now also all ports (I did all tests and both ends listen on ports 3306 and 80. On 443 it can't listen because I'm only running on 80 currently, but that is okay). I also did db connection test on linux in mysql and from cacti and also everything is ok. I commented out #bind-address = 127.0.0.1 (in mariadb.conf.d) on both ends also so both can listen to each other on their ports.

Now the strange thing is, I tried installing the cacti pooler in our network segment locally with completely same settings and it works (right away I can see status idle on main cacti without even touching timezones)! Only difference here is, that this test pooler had completely same network segment as main cacti.

Is there something else i should configure in some config in linux maybe in case these poolers are in other networks?
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Remote pooler stuck in Heartbeat

Post by macan »

try on remote poller mysql -h cacti_host -u your_cacti_user -p is working?

https://docs.cacti.net/How-To-Setup-Remote-Pollers.md
Let the Cacti grow!
enrikio
Posts: 14
Joined: Wed Jan 10, 2024 8:32 am

Re: Remote pooler stuck in Heartbeat

Post by enrikio »

Yes, I tried this many times before. I can connect from remote pooler on both databases with their credentials successfully (172 segment is remote pooler and 10 segment is our local network).
Attachments
Db connectionTestCacti.png
Db connectionTestCacti.png (74.33 KiB) Viewed 810 times
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Remote pooler stuck in Heartbeat

Post by Osiris »

Edit the remote pollers and set it's timezones from the main Cacti server. Then, maybe do a full sync to it.
Before history, there was a paradise, now dust.
enrikio
Posts: 14
Joined: Wed Jan 10, 2024 8:32 am

Re: Remote pooler stuck in Heartbeat

Post by enrikio »

Already tried all of that (I don't have any errors in cacti log)- also it is very weird that without even touching timezones, the remote pooler seems to work ok and goes into idle right away if it is deployed on the same network which i mentioned above.
Today installed new main testing cacti 1.2.26 with spine 1.2.26 and then also new remote pooler cacti on customer network also with cacti 1.2.26 and spine 1.2.26. That also didn't solve problem with remote pooler heartbeat status. As it seems cacti only likes remote poolers on same network :roll:

If someone actually deployed remote pooler's at other (outside) networks successfully with these cacti/spine versions, please inform me.
I also went as far and ditched site to site vpn if that was maybe the problem. Now I'm using Zero tier network to communicate between cacti's.

I can't count anymore how many times i have deployed remote pooler from scratch, just to be sure I got everything right (Now I also have completely fresh main cacti)...
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Remote pooler stuck in Heartbeat

Post by TheWitness »

The mysql communication must work in both directions. Remote pollers work fine once you figure things out. So, from the remote poller, you should be able to run:

Code: Select all

mysql -ucactiuser -pcactiuser -hmain-poller -A cacti
And from the main poller

Code: Select all

mysql -ucactiuser -pcactiuser -hremote-poller -A cacti
Some people never figure that one out.
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest