Distributed Poller RRD Cache is not working

Hi,
I have configured rrdcache on the servers with the webui. I have 5 other brand new distributed pollers. Although the rrdcache on the first server seems to be working the other 5 pollers are showing an error that they can not connect.

I followed the default steps here for Centos 7 https://docs.librenms.org/Extensions/RRDCached/

with sudo systemctl status rrdcached.service I can see that the service is started. The trouble is using netstat -an | grep 42217 I don’t see rrdcached listening on port 44217.

How can I troubleshoot this issue?

Validate.php from the distributed poller:
./validate.php

Component Version
LibreNMS 1.51-14-g554e22d
DB Schema 2019_02_10_220000_add_dates_to_fdb (390)
PHP 7.2.16
MySQL 5.7.14-8-log
RRDTool 1.7.1
SNMP NET-SNMP 5.7.2

====================================

[OK] Composer Version: 1.8.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] Cannot connect to rrdcached instance

config.php running on the remote pollers:
$config[‘rrdcached’] = “X.X.X.X:42217”;

The status of the service:
sudo systemctl status rrdcached
● rrdcached.service - Data caching daemon for rrdtool
Loaded: loaded (/etc/systemd/system/rrdcached.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2019-05-10 08:25:27 CDT; 2min 31s ago
Process: 167588 ExecStart=/usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/run/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/ (code=exited, status=0/SUCCESS)
Main PID: 167589 (rrdcached)
CGroup: /system.slice/rrdcached.service
└─167589 /usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -U lib…

Validation from the box running the rrdcache service
./validate.php

Component Version
LibreNMS 1.51-13-g6e76f1d
DB Schema 2019_02_10_220000_add_dates_to_fdb (390)
PHP 7.2.16
MySQL 5.7.14-8-log
RRDTool 1.7.1
SNMP NET-SNMP 5.7.2

====================================

[OK] Composer Version: 1.8.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

config.php on the box running rrdcached
$config[‘rrdcached’] = “X.X.X.X:42217”;
$config[‘rrdcached’] = “unix:/run/rrdcached.sock”;

I guess that 443 is just a misstype and you actually mean 42217.

But, your issue is that you are running rrdcached only listening on socket.

Read Scaling LibreNMS - LibreNMS Docs and adapt to your needs/OS.

Thanks. I ended up modifying etc/systemd/system/rrdcached.service to look like instead of what was in the instructions so it would listen on port 42217.
ExecStart=/usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l X.X.X.X:42217 -t 4 -F -b /opt/librenms/rrd/

Then I did a sudo systemctl daemon-reload and sudo systemctl restart rrdcached.service.

And then I changed config.php to only list:
$config[‘rrdcached’] = X.X.X.X:42217";

And I removed this:
$config[‘rrdcached’] = “unix:/run/rrdcached.sock”

This seems to now be working.
Thanks again for all the help.

Hi sus_madel,

It is very good to see you updated your answer to your ticket. Please give me your recommendation if you can. :slight_smile:

I have one LibreNMS Central Server (web + database + rrdcached), and one remote poller

The server OS are: Centos 7, rrdtool = 1.7.1

I have followed your instruction to configure etc/systemd/system/rrdcached.service. Now I can see port 42217 on the Central Server:

[root@NETQ-LibreNMS01 librenms]# netstat -an | grep 42217
tcp 0 0 192.168.100.62:42217 0.0.0.0:* LISTEN

Also I have configured: /etc/default/rrdcached


[Unit]
Description=Data caching daemon for rrdtool
After=network.service

[Service]
Type=forking
PIDFile=/run/rrdcached.pid
ExecStart=/usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/run/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/

[Install]
WantedBy=default.target


But my devices are still showing Error Drawing Graph from remote poller. (devices from local poller are working fine). Can you please give me an advice?

Thanks

Jeff Deng

Hi Jeff,

Did you configured in your remote poller the correct rrdcached instance?

Can you telnet to that port from the remote poller? Just to see if it’s a network issue or something else.

Thanks :slight_smile:

I missed some some setting in /etc/default/rrdcachedthanks, it has been resolved now.