No files in cacti/rra - permissions? [fixed with reinstall]

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

Moderators: Developers, Moderators

Post Reply
bbach
Posts: 10
Joined: Thu May 24, 2007 10:54 pm

No files in cacti/rra - permissions? [fixed with reinstall]

Post by bbach »

I'm pulling my hair out on this. Can someone tell me how to set the the permissions/ownership so that the "apache" user and the "cacti" user can read and write to the cacti/raa directory and the cacti/log directory?

I have it set like:

[cacti]# ls -lad log rra
drwxrwxr-x 2 cacti apache 4096 May 24 23:38 log
drwxrwxr-x 2 cacti apache 4096 May 24 23:39 rra

I can purge the log and stuff is getting written to it but no rra files are ever created. I tried to delete the "Localhost" device and recreate it and its graphs, but the rrd files never seem to be created. Are these supposed to be created from the web interface or the cron job?

I don't see anything in any logs indicating an error occurred when trying to create the .rrd files. The permissions thing is only a guess -- it could be something totally different. Thanks. -- Bud

Thanks. -- Bud
Last edited by bbach on Tue May 29, 2007 11:47 am, edited 2 times in total.
southernhick
Posts: 6
Joined: Thu May 24, 2007 12:48 pm
Location: North Carolina - USA

Post by southernhick »

What's your crontab look like for the poller.php? What account is it setup to run under?
isosysadm
Posts: 11
Joined: Wed May 23, 2007 1:31 pm
Location: Austin

No new files in rra or log directories

Post by isosysadm »

southern,

I am running into the same thing.

From root's crontab, I see:

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

The user, cactiuser, owns rra and log.

The device snmp polling *seems* to be working ok. IE I'm not getting snmp access errors.
bbach
Posts: 10
Joined: Thu May 24, 2007 10:54 pm

Post by bbach »

Cron Tab is

*/5 * * * * cacti php /var/www/cacti/poller.php &>/dev/null


I also tried changing to run under apache.

This is a new install. I'm on Centos 4.4 and I downloaded the latest cacti-0.8.6j.tar.gz. rrdtool -v shows:

RRDtool 1.2.18 Copyright 1997-2007 by Tobias Oetiker <tobi@oetiker.ch>

-- Bud
southernhick
Posts: 6
Joined: Thu May 24, 2007 12:48 pm
Location: North Carolina - USA

Post by southernhick »

Have you tried to run it under root just to see if it will?
bbach
Posts: 10
Joined: Thu May 24, 2007 10:54 pm

Post by bbach »

Tried as root with no change in results:

*/5 * * * * root php /var/www/cacti/poller.php &>/dev/null
bbach
Posts: 10
Joined: Thu May 24, 2007 10:54 pm

Post by bbach »

Running poller.php from the command line, yields:

[root@apps cacti]# php poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
[and so on, until...]
05/29/2007 10:39:23 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
05/29/2007 10:39:23 AM - SYSTEM STATS: Time:293.3359 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:11 RRDsProcessed:0
PHP Warning: pclose(): 45 is not a valid stream resource in /var/www/cacti/lib/rrd.php on line 48
bbach
Posts: 10
Joined: Thu May 24, 2007 10:54 pm

Post by bbach »

OK. I have it working.

I deleted everything including the database and then started over using the cacti distribution from rpmforge for centos. One thing I was specific about was to select the version :

yum install cacti-0.8.6j

it appears that there is another older version of cacti (0.8.6i) that it wanted to install -- i guess since it was more specific to my i386 architecture.

Everything is working well now but I am having problems charting a cisco router. I'll start a new thread for that. Thanks. -- Bud
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Be careful to not upgrading cacti accidentally (yum upgrade). This may yield "unwanted" results
Reinhard
bbach
Posts: 10
Joined: Thu May 24, 2007 10:54 pm

Post by bbach »

gandalf wrote:Be careful to not upgrading cacti accidentally (yum upgrade). This may yield "unwanted" results
Reinhard
Thanks for the tip! -- Bud
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests