Ubuntu 16.04 Apache "rrdcached: Permission denied"

After enabling rrdcached , graph stop and I’m getting this error

ERROR: Unable to connect to rrdcached: Permission denied
How I can solve this?
I’m sorry I’m new with Linux so any help will be appreciated

regards
JC

https://docs.librenms.org/#Extensions/RRDCached/

run back though the doc… you may have missed something

set the permissions.
chown librenms:librenms /var/run/rrdcached
chmod 755 /var/run/rrdcached

Hi thank you for you answer
I’m using rrdcached v 1.6.0 , hope thats ok.
in Ubuntu 16.04 I do not have that directory in /var/run/

But I do have this fliles
rrdcached.sock
rrdcached.pid

So 775 to those files ?
how librenms user can own it?
chown librenms:librenms /var/run/rrdcached.xxx?

I did everything the docs have related Ubuntu 16.04 rrdcached.

regards JC

Yes to those directories

OK I will set those to 775 and will back in 10 min.

regards
JC

this file in /etc/default/rrdcached is owned by root
wondering if librenms user should owned too.
Do I have to add this line in libre config file :?
$config[‘rrdtool_version’] = ‘1.6.0’;

still this output :

RRDTool Output
1550x351
ERROR: Unable to connect to rrdcached: Permission denied

Yes add in whichever version you have to config
Yes librenms user should have permissions

still :tired_face:

RRDTool Output
1550x351
ERROR: Unable to connect to rrdcached: Permission denied

Please run . /validate.php and pastebin the output.

thank you -

root@ubuntuServer:/opt/librenms# ./validate.php

Component Version
LibreNMS 1.32
DB Schema 209
PHP 7.0.22-0ubuntu0.16.04.1
MySQL 10.0.31-MariaDB-0ubuntu0.16.04.2
RRDTool 1.6.0
SNMP NET-SNMP 5.7.3

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

[OK] Database connection successful
[OK] Database schema correct

and you set the permissions correctly for?
/var/run/rrdcached

maybe try restarting rrdcached service?

inside /var/run I do not have a directory named rrdcached ,
I do have two files :
-rwxr-xr-x 1 librenms librenms 5 Oct 4 11:21 rrdcached.pid
srwxr-xr-x 1 librenms librenms 0 Oct 4 11:21 rrdcached.sock

the file in /etc/default/
-rwxr-xr-x 1 librenms librenms 841 Oct 3 15:35 rrdcached

I just restarted rrdcached , let wait 10 min to see if the graph finally work lol

thank you so much for helping me, this server is not in production yet but I will love to use it soon.
regards
JC

Now everything is down! it was green 1 min before , ping my devices and they are alive !! don’t know why this happens!! rrrrr LOL

this has happened b4? if it has you need to check your poller

nope .
validate.php output :face_with_raised_eyebrow:
[OK] Database connection successful
[OK] Database schema correct
[WARN] Some devices have not been polled in the last 5 minutes.
You may have performance issues. Check your poll log and see: http://docs.librenms.org/Support/Performance/

all was working fine until a friend suggested me to use rrdcached so I went to the Doc and fallows wha is there.

try running the poller ./poller-wrapper.py 16

INFO: poller-wrapper polled 99 devices in 59 seconds with 16 workers

but everything still the same


and
RRDTool Output
1550x351
ERROR: Unable to connect to rrdcached: Permission denied

if was me I would run back through the doc for rrd cached starting at the top… make sure you have everything set correctly.

and check that version of rrdcached set in config

Solve!
Thank you for your help.
After you send me a screen shot of how you .sock look I realize I was not sending parameters to rrdcached so I decide to read the rrdcached man pages:
here is how I did solve it,

If you read the Documentation for Ubuntu 16 :

Edit /etc/default/rrdcached to include:
DAEMON=/usr/bin/rrdcached
DAEMON_USER=librenms
DAEMON_GROUP=librenms
WRITE_THREADS=4
WRITE_TIMEOUT=1800
WRITE_JITTER=1800
BASE_PATH=/opt/librenms/rrd/
JOURNAL_PATH=/var/lib/rrdcached/journal/
PIDFILE=/var/run/rrdcached.pid
SOCKFILE=/var/run/rrdcached.sock
SOCKGROUP=librenms
BASE_OPTIONS="-B -F -R"

this option was not working for me, what I did was edit the file /etc/default/rrdcached like this:

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

options to be passed to rrdcached

(do not specify -p - this is handled by the init script)

default: see /etc/init.d/rrdcached

OPTS="-w 1800 -z 1800 -f 3600 -s librenms -j /var/tmp -l unix:/var/run/rrdcached.sock -t4 -F -b /opt/librenms/rrd"

boom!! it work as soon I restarted the service.

Wondering how we can pass this info to person to write the doc.

well have a nice day and thank you for taking your time to help me
JC

1 Like