Bug 250348 - cacti doesn't draw graphs
Summary: cacti doesn't draw graphs
Alias: None
Product: Fedora
Classification: Fedora
Component: cacti (Show other bugs)
(Show other bugs)
Version: 7
Hardware: All Linux
Target Milestone: ---
Assignee: Mike McGrath
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-07-31 23:50 UTC by Thomas Antony
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-21 15:00:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Thomas Antony 2007-07-31 23:50:07 UTC
Description of problem:
After a successfull cacti installation via yum, cacti doesn't draw any graphs.
The source of the problem are wrong permission on the directory /var/lib/cacti/rra/
I have changed the group ownership to apache and add write permissions to the
group. That worked for me, but maybe it would be better that the owner is apache
and the group cacti.

Why is there a cacti user anyway since cacti isn't daemon which must drop root
Wouldn't it make more sense to run poller.php as user apache and don't create
the user cacti?

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install cacti via yum
2. Configure cacti in the way README.fedora describes
3. Create devices and then graphs
Actual results:
no graphs

Expected results:
fancy graphs

Comment 1 Mike McGrath 2007-08-01 00:38:24 UTC
Who is your poller running as?  The default permissions do work properly with
the poller running as cacti.

Comment 2 Thomas Antony 2007-08-01 09:40:40 UTC
The poller is running as user cacti, but it didn't work for me till i changed
the permissions on that folder.

Comment 3 Mike McGrath 2007-08-01 13:39:04 UTC
Change the permissions back and let me know if it continues to work:

drwxr-xr-x 2 cacti root /var/lib/cacti/rra

Comment 4 Mike McGrath 2007-08-07 15:14:34 UTC
Have you been able to do this?

Comment 5 Thomas Antony 2007-08-07 17:42:01 UTC
I changed the permissions and i still have troubles with the graphs.
When i add a graph, the .rrd files are not created. Apache can't find those
files and they are missing on the filesystem.
Could you please apply the patches from the cacti homepage for version 0.8.6j
Maybe this resolves the issues.

Comment 6 Mike McGrath 2007-08-07 17:56:34 UTC
Please past the exact line you have in your crontab for the cron job, as well as a 

ls -l /var/lib/cacti/rra/ | tail

I've not heard from anyone else having this issue and I've been unable to
recreate it on any environment (FC[6-7], RHEL[4-5])

Comment 7 Thomas Antony 2007-08-07 19:56:42 UTC
[thomas@srv1 ~]$ sudo cat /etc/cron.d/cacti
*/5 * * * *     cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

[thomas@srv1 ~]$ ls -l /var/lib/cacti/rra/ | tail
-rw-r--r-- 1 cacti root  94816 2007-08-07 21:20 srv1_localhost_hdd_free_43.rrd
-rw-r--r-- 1 cacti root 141640 2007-08-07 21:20 srv1_localhost_load_1min_39.rrd
-rw-r--r-- 1 cacti root  47992 2007-08-07 21:20 srv1_localhost_proc_41.rrd
-rw-r--r-- 1 cacti root  47992 2007-08-07 21:20 srv1_localhost_users_40.rrd
-rw-r--r-- 1 cacti root  47992 2007-08-01 02:00 srv1_mem_buffers_11.rrd
-rw-r--r-- 1 cacti root  47992 2007-08-01 02:00 srv1_mem_buffers_20.rrd
-rw-r--r-- 1 cacti root  47992 2007-08-01 02:00 srv1_mem_cache_21.rrd
-rw-r--r-- 1 cacti root  47992 2007-08-01 02:00 srv1_mem_free_22.rrd
-rw-r--r-- 1 cacti root  47992 2007-08-01 02:00 srv1_mem_swap_12.rrd
-rw-r--r-- 1 cacti root  47992 2007-08-01 02:00 srv1_proc_13.rrd

[thomas@srv1 ~]$ sudo tail /var/log/httpd/error_log
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory
ERROR: opening '/usr/share/cacti/rra/srv1_localhost_traffic_in_38.rrd': No such
file or directory

After the first initial installation and configuration no graph has been
displayed. Actually only the traffic graph does not work, because the other .rrd
files were created earlier. New created graphs are also not displayed.
For testing purposes i changed the crontab for the cron job too 
( /usr/bin/php /usr/share/cacti/poller.php >> /var/log/cacti_poller 2>&1)
, but there are no info or error messages in /var/log/cacti_poller. The file
isn't even created.
I'm running F7 x86_64.

Comment 8 Mike McGrath 2007-08-07 20:03:19 UTC
Something is borked on your machine (either through a 3rd party repo or a mis
configuration).  Perhaps selinux, I'm not quite sure.  The fact that some stuff
is working and some stuff is not.

Try runing the poller manually and looking for errors (as root)

sudo -u cacti   /usr/bin/php /usr/share/cacti/poller.php

Comment 9 Thomas Antony 2007-08-07 20:46:22 UTC
I know this is a strange problem. selinux is disabled.
I deleted all graphs and devices and recreated them -> No graphs
After running "sudo -u cacti /usr/bin/php /usr/share/cacti/poller.php" the
graphs are displayed.
/var/log/cron doesn't show me any error messages.

Comment 10 Mike McGrath 2007-09-21 15:00:29 UTC
Stop by #cacti on irc.freenode.net, this sounds like something strange is going
on with the machine and since I've not heard any bugs / reports from anyone
else, I'm assuming this is an isolated instance.  I'm also mmcgrath on
irc.freenode.net (usually in #fedora-admin) stop by sometime and we'll get it
figured out.  In the meantime I'm going to close this bug.

Note You need to log in before you can comment on or make changes to this bug.