[SOLVED]-No Graphs - Poller runs - says it updates rrd files

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Moderators, Developers

Post Reply
Author
Message
eholz1
Cacti User
Posts: 165
Joined: Mon Oct 01, 2018 10:09 am

[SOLVED]-No Graphs - Poller runs - says it updates rrd files

#1 Post by eholz1 » Wed Nov 06, 2019 12:43 pm

Hello Again,

I have a serious ouch here. Cacti-1.2.7, Linux red hat 7.5.
Running poller as 'cacti' not getting any errors, writing to a poller.log - just getting normal poller data
similar to the log file. All my log data iis green.

rrd files seem to be updated, rra folder is owned by cacti:apache. the rrd files are owned by cacti:apache

The datasource info shows data values, but no data in the rrd file or shows in the graphs.

What is broken here? I could try running the poller as root, but that does not sound good, as
the system was working before with the cacti user.

need some good suggestions on this,

Thanks,

eholz1
Last edited by eholz1 on Wed Nov 13, 2019 2:39 pm, edited 1 time in total.

User avatar
Jeeves
Posts: 30
Joined: Wed Jun 12, 2013 6:25 pm

Re: No Graphs - Poller runs - says it updates rrd files

#2 Post by Jeeves » Thu Nov 07, 2019 1:12 am

Has anyone else bumped into this? I just did with a nearly identical configuration.

netniV
Cacti Guru User
Posts: 3132
Joined: Sun Aug 27, 2017 12:05 am

Re: No Graphs - Poller runs - says it updates rrd files

#3 Post by netniV » Fri Nov 08, 2019 8:39 am

Are you using the OS package version, the cacti package version or the source version?

jtremblay
Posts: 1
Joined: Mon Nov 11, 2019 4:13 pm

Re: No Graphs - Poller runs - says it updates rrd files

#4 Post by jtremblay » Mon Nov 11, 2019 4:17 pm

sounds like my issues. I tried to upgrade from and old centos 6 to rhel 7 , from version 1.1.35 to 1.2.6. I get one graphing per every 6 hours .... sometimes.

User avatar
Jeeves
Posts: 30
Joined: Wed Jun 12, 2013 6:25 pm

Re: No Graphs - Poller runs - says it updates rrd files

#5 Post by Jeeves » Mon Nov 11, 2019 11:14 pm

netniV wrote:
Fri Nov 08, 2019 8:39 am
Are you using the OS package version, the cacti package version or the source version?
I can't speak for the OP; However, mine are always source.
The upgrade routine doesn't flag any permissions issues (not to say things aren't wonky).

Now, I can't say that this is the cause, or that my permissions are anywhere near correct but my cacti installation has been working for a long time.
With this in mind I went digging and testing with my RRA directory.

It appears that my older rrd's are all cacti:apache 744.
New RRA's are created as cacti:cacti with 644.

I tried reverting /rra to cacti:apache & 644 (chmod -R 644 rra/) and I get errors such as:
2019/11/11 20:43:04 - CMDPHP ERROR: Unable to create directory '/usr/share/cacti/rra/5'
2019/11/11 20:43:04 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php[661]:process_poller_output(), /lib/poller.php[547]:rrdtool_function_update(), /lib/rrd.php[753]:rrdtool_function_create(), /lib/rrd.php[706]:mkdir(), CactiErrorHandler())
2019/11/11 20:43:04 - ERROR PHP WARNING: mkdir(): Permission denied in file: /usr/share/cacti/lib/rrd.php on line: 706
2019/11/11 20:43:04 - CMDPHP ERROR: Unable to create directory '/usr/share/cacti/rra/21'
2019/11/11 20:43:04 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php[661]:process_poller_output(), /lib/poller.php[547]:rrdtool_function_update(), /lib/rrd.php[753]:rrdtool_function_create(), /lib/rrd.php[706]:mkdir(), CactiErrorHandler())
2019/11/11 20:43:04 - ERROR PHP WARNING: mkdir(): Permission denied in file: /usr/share/cacti/lib/rrd.php on line: 706
Issuing (chmod -R 744 rra/) and all the errors disappear.

Based on RRA's being created as 644 (and 644's not being writable (or rather, throwing an error)) I'm guessing newly created RRD's aren't writable to cacti.

Cron is
*/1 * * * * cacti php -q /usr/share/cacti/poller.php > /dev/null 2>&1
Clearly i don't suspect it is an issue.
jtremblay wrote:
Mon Nov 11, 2019 4:17 pm
sounds like my issues. I tried to upgrade from and old centos 6 to rhel 7 , from version 1.1.35 to 1.2.6. I get one graphing per every 6 hours .... sometimes.
That doesn't sound like this issue. You should be able to troubleshoot that relatively simply. This problem does not involve a distro upgrade.

eholz1
Cacti User
Posts: 165
Joined: Mon Oct 01, 2018 10:09 am

Re: [SOLVED]-No Graphs - Poller runs - says it updates rrd files

#6 Post by eholz1 » Wed Nov 13, 2019 2:48 pm

Hello All,

I did solve this one. It turns out the permissions were completely messed up.
The cacti-1.2.7 dir, and the rra dir and the log dir somehow were changed (by me!),
and I could not reset or set them correctly. Lesson here is do not mess with the permissions!

In my case, since I had a virtual machine, AND a snapshot, I went back to the snapshot,
and DID not CHANGE anything.

My working version has apache:apache as main owner of the cacti chain, with cacti:apache set on the rra and the log directories.
I did have to set all to write for the log dir for some reason. apache could not write to that dir to update the log file.

Thanks,

Eholz1

netniV
Cacti Guru User
Posts: 3132
Joined: Sun Aug 27, 2017 12:05 am

Re: No Graphs - Poller runs - says it updates rrd files

#7 Post by netniV » Mon Nov 18, 2019 7:31 am

Jeeves wrote:
Mon Nov 11, 2019 11:14 pm
I tried reverting /rra to cacti:apache & 644 (chmod -R 644 rra/) and I get errors such as:
2019/11/11 20:43:04 - CMDPHP ERROR: Unable to create directory '/usr/share/cacti/rra/5'
2019/11/11 20:43:04 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php[661]:process_poller_output(), /lib/poller.php[547]:rrdtool_function_update(), /lib/rrd.php[753]:rrdtool_function_create(), /lib/rrd.php[706]:mkdir(), CactiErrorHandler())
2019/11/11 20:43:04 - ERROR PHP WARNING: mkdir(): Permission denied in file: /usr/share/cacti/lib/rrd.php on line: 706
2019/11/11 20:43:04 - CMDPHP ERROR: Unable to create directory '/usr/share/cacti/rra/21'
2019/11/11 20:43:04 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php[661]:process_poller_output(), /lib/poller.php[547]:rrdtool_function_update(), /lib/rrd.php[753]:rrdtool_function_create(), /lib/rrd.php[706]:mkdir(), CactiErrorHandler())
2019/11/11 20:43:04 - ERROR PHP WARNING: mkdir(): Permission denied in file: /usr/share/cacti/lib/rrd.php on line: 706
Issuing (chmod -R 744 rra/) and all the errors disappear.
I suspect these errors are because you changed the RRA directory to believe it wasn't a directory. As such, you can't create new files/directories beneath it. If you did that on the advice of the installer, let me know as that needs looking into. Generally speaking, these days I prefer to use the flag format of u+rw to ensure I don't mess up the permissions of a directory over a file.

What I mean by believe it wasn't, without the execute permission, you tend not to be able to enter a directory.

User avatar
Jeeves
Posts: 30
Joined: Wed Jun 12, 2013 6:25 pm

Re: No Graphs - Poller runs - says it updates rrd files

#8 Post by Jeeves » Mon Nov 18, 2019 11:49 am

netniV wrote:
Mon Nov 18, 2019 7:31 am
I suspect these errors are because you changed the RRA directory to believe it wasn't a directory. As such, you can't create new files/directories beneath it. If you did that on the advice of the installer, let me know as that needs looking into. Generally speaking, these days I prefer to use the flag format of u+rw to ensure I don't mess up the permissions of a directory over a file.

What I mean by believe it wasn't, without the execute permission, you tend not to be able to enter a directory.
I symlinked my rra path, so that makes sense. Good to know!

Post Reply