Bug 250348 - cacti doesn't draw graphs
cacti doesn't draw graphs
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: cacti (Show other bugs)
7
All Linux
low Severity medium
: ---
: ---
Assigned To: Mike McGrath
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-31 19:50 EDT by Thomas Antony
Modified: 2007-11-30 17:12 EST (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Thomas Antony 2007-07-31 19:50:07 EDT
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
privileges?
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):
cacti-0.8.6j-1


How reproducible:
Always


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-07-31 20:38:24 EDT
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 05:40:40 EDT
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 09:39:04 EDT
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 11:14:34 EDT
Have you been able to do this?
Comment 5 Thomas Antony 2007-08-07 13:42:01 EDT
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
http://cacti.net/download_patches.php
Maybe this resolves the issues.
Comment 6 Mike McGrath 2007-08-07 13:56:34 EDT
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 15:56:42 EDT
[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 16:03:19 EDT
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 16:46:22 EDT
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 11:00:29 EDT
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.