Poller.php won't poll. Permissions ?

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

Moderators: Developers, Moderators

Post Reply
nomojo
Posts: 2
Joined: Tue Apr 15, 2008 9:06 am

Poller.php won't poll. Permissions ?

Post by nomojo »

Hi All,

I'm new to Cacti and am having trouble getting off the ground. Got a problem with poller.php / cmd.php on a box with the Plesk control panel installed. My gut says it's permissions, but I can't figure this out.

Trying to create the load average graph in the "Local Linux Machine". Created a device with IP 127.0.0.1, created the graph, and put it the default tree, however the graphs display as broken images. After several cron runs there is nothing in /rra

I've got a user cactiuser that belongs to groups cacti, apache, and psaserv (Plesk group) - I'm taking shots in the dark here.

[cactiuser@vs1 cacti]$ php poller.php

04/15/2008 12:24:52 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '290', Max Runtime '298', Poller Runs: '1'
04/15/2008 12:24:52 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /usr/local/cacti/cmd.php 0 6]
sh: /php: No such file or directory
Waiting on 1/1 pollers.
sh: /rrdtool: No such file or directory
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
...Repeated many more times...

[cactiuser@vs1 cacti]$ /usr/bin/php -q /usr/local/cacti/cmd.php 0 6
sh: /perl: No such file or directory
sh: /perl: No such file or directory
sh: /perl: No such file or directory
sh: /perl: No such file or directory
sh: /perl: No such file or directory

But cactiuser can run perl scripts from cln:

[cactiuser@vs1 scripts]$ /usr/bin/perl ping.pl 127.0.0.1
0.118[cactiuser@vs1 scripts]$

Here's the loadaverage script I'm trying to create a graph for:
[cactiuser@vs1 scripts]$ /usr/bin/perl loadavg.pl
0.68 1.19, 1.50[cactiuser@vs1 scripts]$

Just for grins, here's one without the complete path to perl:
[cactiuser@vs1 scripts]$ perl ping.pl 127.0.0.1
0.089[cactiuser@vs1 scripts]$

Here's what binaries my system is using:
[cactiuser@vs1 scripts]$ which php
/usr/bin/php
[cactiuser@vs1 scripts]$ which perl
/usr/bin/perl
[cactiuser@vs1 scripts]$ which rrdtool
/usr/local/bin/rrdtool


I've read everything I can find on the board with no luck.

My configuration info follows.

Thanks in advance.

========================
Cacti Configuration:

OS: CentOS release 4.6 (Final), running PLESK 8.3, PHP 5.2.5, php-snmp installed & "snmp" visible when php -m run

Cacti 0.8.7b installed in: /usr/local/cacti

owner/group: /usr/local/cacti and all files/subfolders owner group is "root:root" except /rra and /log which are "cactiuser:cacti" and /log/cacti.log which is "cactiuser:apache"

contents of /etc/cron.d/cacti:
*/5 * * * * cactiuser /usr/bin/php /usr/local/cacti/poller.php > /usr/local/cacti/poller.log 2>&1
(I have also had the user in cron above set to root have also had "php" without full path)

contents of /etc/snmp.conf
rocommunity public 127.0.0.1
dontPrintUnits true
includeAllDisks
disk /
proc httpd

(Have also tried with snmp V3 createUser - can verify from shell snmpd is running that it works both ways)

vhost.conf file to map cacti to domain for apache
(for PLESK control panel - tried to install in "normal" domain /cacti web directory, but ran into open_basedir restrictions with snmpwalk,etc. )
Alias /cacti /usr/local/cacti/
<Directory /var/www/vhosts/aisle8.net/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/MYDOMAIN/httpdocs:/tmp:/usr/local/cacti"
</Directory>
buck
Posts: 17
Joined: Tue Sep 04, 2007 10:09 am

Post by buck »

Do the settings on your console -> settings -> Path tab

match these:

[cactiuser@vs1 scripts]$ which php
/usr/bin/php

[cactiuser@vs1 scripts]$ which rrdtool
/usr/local/bin/rrdtool
nomojo
Posts: 2
Joined: Tue Apr 15, 2008 9:06 am

Yes

Post by nomojo »

>>Do the settings on your console -> settings -> Path tab
>> match these:
>> [cactiuser@vs1 scripts]$ which php
>> /usr/bin/php
>> [cactiuser@vs1 scripts]$ which rrdtool
>> /usr/local/bin/rrdtool

Yes, the paths match:
Attachments
path screenshot
path screenshot
Cacti_1208282812671.png (8.54 KiB) Viewed 2763 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests