Ubuntu 16.04 Apache "rrdcached: Permission denied"

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

Thank you juanquy for passing that info we are actually right in the middle of a refresh for the docs RRDcached. So I will look into adding what you did here.

thanks -

Kev

No problem glad I go to figure out.
BTW: I’m trying to setup sendmail here ,I do remember testing that transport but for some reason stop working . So I un-install it.
I also tried smtp using smtp.office365.com: 587 but when I click on test transport button not email in my inbox.
So my question is ? : what MTA are you using in order to send email alerts, postfix, sendmail. etc??
Do you have your MTA running in the same server Libre is running?

regards JC

juanquy,

im using the “mail” transport option.

can you post the full out put of /etc/default/rrdcached and past to pastebin.com

just did it on pastebin.com

and here its just in case:

/etc/default/rrdcached

0: start rrdcached on boot, 1: do not start rrdcached on boot

default: 0

DISABLE=0

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/rrdcache$

number of seconds to wait for rrdcached to shut down

(writing the data to disk may take some time;

tune this according to your setup)

default: 30

MAXWAIT=30

0: do not enable core-files, 1: enable core-files … if rrdcached crashes

default: 0

ENABLE_COREFILES=0

can you provide link to the post please?

Doing this from my phone hope it works . If not I will do it tomorrow

https://pastebin.com/vTWZ9Jkb

1 Like

got it thank you

Changing my BASE_PATH= to “/opt/librenms/rrd/” fixed it. I obviously missed this when editing my file.

Made all other suggestions here and I’m back to normal:
https://docs.librenms.org/Support/Performance/

Hopefully we’re optimized now :smiley: