Both cactid and poller.php don't produce data

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

Moderators: Developers, Moderators

Post Reply
Sempiterna
Posts: 10
Joined: Mon Sep 24, 2007 3:27 am

Both cactid and poller.php don't produce data

Post by Sempiterna »

I've been trying to get Cacti to show graphs for around 6 hours now, but somehow i can't get any data in the rra directory, and thus also no graphs.

First i tried it the standard way with just poller.php (and crontab). But then i got the error:
09/24/2007 09:29:55 AM - SYSTEM STATS: Time:293.0754 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0
09/24/2007 09:29:55 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
Then i executed it from the command prompt, which resulted in:
[root@thor cacti]# php poller.php
09/24/2007 10:32:49 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/vhosts/<blackedout>/httpdocs/cacti/cmd.php 0 1]
sh: /rrdtool: No such file or directory
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
---etc etc etc for a 100 or so times---
09/24/2007 10:37:42 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
09/24/2007 10:37:42 AM - SYSTEM STATS: Time:292.4501 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0
PHP Warning: pclose(): 56 is not a valid stream resource in /var/www/vhosts/<blackedout>/httpdocs/cacti/lib/rrd.php on line 47
That "sh: /rrdtool: No such file or directory" error is strange as well, because i did supply the correct path to it.

Then i gave up on that one and tried cactid, but both the supplied binary as well as the source which i compiled myself gave the following error when executing poller.php:
[root@thor cacti]# php poller.php
09/24/2007 10:41:24 AM - POLLER: Poller[0] ERROR: The path: /usr/bin/cactid is invalid. Can not continue
Which is a very strange error, because it is located in the correct place:
[root@thor cacti]# whereis cactid
cactid: /usr/bin/cactid /etc/cactid.conf
I have all required dependencies installed, and even some extras while i was testing. I have set all permissions correct. And i even reinstalled the whole thing 3 times, but it simply will not work.

Any ideas what might be the cause? I run a Fedora Core5 system with Plesk as hosting control panel.
Sempiterna
Posts: 10
Joined: Mon Sep 24, 2007 3:27 am

Post by Sempiterna »

I checked some more after reading the posts about SeLinux, but SeLinux is disabled on my server so the problem can't be there.

I'm wondering... maybe my webhosting crontrolpanel (Plesk) is interfering? Has anyone here made it work with Plesk installed on a server?
Sempiterna
Posts: 10
Joined: Mon Sep 24, 2007 3:27 am

Post by Sempiterna »

I found a few patches for my release (0.8.6j), which i installed, but that did not fix things. I also checked the bug repository and found a resolved bug (http://bugs.cacti.net/view.php?id=344) which also talked about files not being found and that seems to have been solved by disabling php safemode.

However, my safemode is already disabled. It is enabled server wide, but for this site that hosts the cacti software, it is disabled.

I now have no ideas left of what i can do to make it work :(
Sempiterna
Posts: 10
Joined: Mon Sep 24, 2007 3:27 am

Post by Sempiterna »

Logfiles showed that openbasedir restrictions were in effect, so i changed that PHP setting. Now the openbasedir errors do not occur anymore. And now when i install cacti, it automatically finds the correct paths... however, executing the poller.php file still shows that it cannot find any of these binaries.

It simply continues to complain that file /rrdtool (among others) is incorrect, eventho that file does exist. I checked if i can access it from cactiuser, and i can. To test it, i also created symlinks to all these files, and still that same error continues to pop up.

The really really frustrating thing is, that when i comment out the restrictions to run poller.php from the broser, and then run it through the webbrowser.... i finally DO get graphs. So somewhere, somehow, when it is run from cron, it failes to do anything.. and when run through the browser.. it works.
Sempiterna
Posts: 10
Joined: Mon Sep 24, 2007 3:27 am

Post by Sempiterna »

Okay i solved the problem... maybe something to add in the manual or whatever:

When you install Cacti in an environment where you have more than one domain (virtual hosting), then disable open_basedir and set safemode to "off" GLOBALLY, since the cron job does not take on the settings that you have for the domain you host cacti on. So if you disable the settings on the domain, while they are still enabled globally... it simply will not work.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest