Failed to connect to remote collector

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

Moderators: Developers, Moderators

Post Reply
antras
Posts: 38
Joined: Mon Apr 06, 2015 7:01 am

Failed to connect to remote collector

Post by antras »

Hi,

I'm using cacti 1.2.10 with rhel 7.8 in configuration with mainpoller and one remotepoller, apache uses http on non default port 5985, so cacti is accessible as http://mainpoller:5985/cacti (or http://remotepoller:5985/cacti on remote poller).
There is no issues with connectivity between main and remote collectors if I check it via Data Collection -> Data Collectors and full sync works just fine.

However if I have some snmp devices which are linked with remote collector (as poller association) I'm not able to run Reload Query on them (if I'm logged in to mainpoller web interface) - it works only if I logged to remotepoller web interface.
And if I try to open device which is associated with remotepoller from mainpoller web interface i get "ERROR: Failed to connect to remote collector" for SNMP Information on top of device setting.

Any idea what it can be?
bmfmancini
Cacti User
Posts: 250
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Failed to connect to remote collector

Post by bmfmancini »

Upgrade to 1.2.12 which has a bunch of fixed for remote pollers and I am sure this was one of them

if you don't want to do a full upgrade try updating remotepollers.php and remote_agent.php from the 1.2.x branch
but make sure to do a backup first
Telecom Lifer, Monitoring and performance enthusiast, Father, Husband

Cacti Bug Hunter and Member

www.seanmancini.com
sean(at)seanmancini.com
github.com/bmfmancini

My Cacti scripts and templates ( Non official)
Cacti install wizard https://github.com/bmfmancini/cacti-install-wizard
Cacti templates https://github.com/bmfmancini/Cacti-templates

Always willing to help!
antras
Posts: 38
Joined: Mon Apr 06, 2015 7:01 am

Re: Failed to connect to remote collector

Post by antras »

seanmancini wrote: Thu Jul 02, 2020 12:29 pm Upgrade to 1.2.12 which has a bunch of fixed for remote pollers and I am sure this was one of them

if you don't want to do a full upgrade try updating remotepollers.php and remote_agent.php from the 1.2.x branch
but make sure to do a backup first
Thanks for suggestion, however I prefer to find the problem and then look for fix.

Do you know how main and remote collectors talk to each other? What ports/interfaces are used in that case?
antras
Posts: 38
Joined: Mon Apr 06, 2015 7:01 am

Re: Failed to connect to remote collector

Post by antras »

Today I tried to upgrade to latest cacti version to 1.2.14 (from 1.2.10), but issue is still there.
If device is collected by remote poller and I try to open it via main one I get "Failed to connect to remote collector".
Should it work if not default (tcp/80 or tcp/443) port is used for apache?
Should I amend $url_path from '/cacti/' to ':nonstandard_port/cacti/'?

Can somebody from developers confirm why main server says that it can't connect to remote collector if Test Database Connection is successful and remote collector sends collected stats to main one correctly?
antras
Posts: 38
Joined: Mon Apr 06, 2015 7:01 am

Re: Failed to connect to remote collector

Post by antras »

I've just enabled tcpdump on mainpoller (192.168.8.1) server and opened device (via mainpoller web interface) which is collected by remotepoller (192.168.8.2).
From the below tcpdump it's visible that everything starts on 5985 port which is correct, but then request is sent to port 80 (which nothing is listening):

Code: Select all

17:28:56.390411 IP 10.0.2.2.54025 > 192.168.8.1.5985: Flags [P.], seq 1999:2439, ack 114598, win 65535, length 440: HTTP: GET /cacti/host.php?action=ping_host&id=2 HTTP/1.1
17:28:56.390434 IP 192.168.8.1.5985 > 10.0.2.2.54025: Flags [.], ack 2439, win 34782, length 0
17:28:56.446877 IP 192.168.8.1.45622 > 192.168.8.2.80: Flags [S], seq 583668797, win 29200, options [mss 1460,sackOK,TS val 22493364 ecr 0,nop,wscale 7], length 0
17:28:56.447145 IP 192.168.8.2.80 > 192.168.8.1.45622: Flags [R.], seq 0, ack 583668798, win 0, length 0
17:28:56.450024 IP 192.168.8.1.5985 > 10.0.2.2.54025: Flags [P.], seq 114598:115298, ack 2439, win 34782, length 700: HTTP: HTTP/1.1 200 OK
17:28:56.450183 IP 10.0.2.2.54025 > 192.168.8.1.5985: Flags [.], ack 115298, win 65535, length 0
I believe it's bug and it should be fixed.

Published as issue https://github.com/Cacti/cacti/issues/3845
Post Reply

Who is online

Users browsing this forum: fpiorek and 2 guests