poller.php and perl file path

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

Moderators: Developers, Moderators

Post Reply
juanito
Posts: 4
Joined: Wed Nov 16, 2005 10:47 am

poller.php and perl file path

Post by juanito »

Hi,

I am running cacti under OpenBsd 3.7, Apache/1.3.29, php5 and mysql 4.0.23.

I am having some trouve with the poller.

When i try to launch poller.php, i tells me that it can't find the perl script, i know why, it's just that the path is not good.

The path to access to the script file shoud be /var/www/htdocs/cacti/scripts and no /htdocs/cacti. But i just can't figure out how to modify it.

If someone could help me it'll be nice ;)

Thx in advance.

Code: Select all

(root@srv-stats) php poller.php
Can't open perl script "/htdocs/cacti/scripts/linux_memory.pl": No such file or directory
Can't open perl script "/htdocs/cacti/scripts/linux_memory.pl": No such file or directory
Can't open perl script "/htdocs/cacti/scripts/loadavg_multi.pl": No such file or directory
Can't open perl script "/htdocs/cacti/scripts/unix_users.pl": No such file or directory
Can't open perl script "/htdocs/cacti/scripts/unix_processes.pl": No such file or directory
OK u:0.00 s:0.00 r:2.06
11/16/2005 04:44:56 PM - SYSTEM STATS: Time:2.2193 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5
OK u:0.00 s:0.00 r:2.07
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:2.07
OK u:0.00 s:0.00 r:2.07
OK u:0.00 s:0.00 r:2.07
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Um...

Did you move you cacti installation?

Either way, go into Utilities and run "Clear Poller Cache", which will rebuild those paths and display the results. It really doesn't clear it, but rebuilds it and shows the new results.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
juanito
Posts: 4
Joined: Wed Nov 16, 2005 10:47 am

Post by juanito »

no i didn't move my cacti installation, i tried what you told me and as there was nothing changed, i uninstalled and reinstalled it completely (even sql database) and i have always the same problem

Code: Select all

(root@srv-stats) php poller.php
Can't open perl script "/htdocs/cacti/scripts/linux_memory.pl": No such file or directory
Can't open perl script "/htdocs/cacti/scripts/linux_memory.pl": No such file or directory
Can't open perl script "/htdocs/cacti/scripts/loadavg_multi.pl": No such file or directory
Can't open perl script "/htdocs/cacti/scripts/unix_users.pl": No such file or directory
Can't open perl script "/htdocs/cacti/scripts/unix_processes.pl": No such file or directory
OK u:0.00 s:0.00 r:1.04
ERROR: opening '/htdocs/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
OK u:0.00 s:0.00 r:1.05
OK u:0.00 s:0.00 r:1.07
ERROR: opening '/htdocs/cacti/rra/localhost_mem_swap_4.rrd': No such file or directory
OK u:0.00 s:0.00 r:1.07
OK u:0.00 s:0.00 r:1.09
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:1.10
OK u:0.00 s:0.00 r:1.12
ERROR: opening '/htdocs/cacti/rra/localhost_users_6.rrd': No such file or directory
OK u:0.00 s:0.00 r:1.12
11/16/2005 05:18:04 PM - SYSTEM STATS: Time:1.2049 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
OK u:0.00 s:0.00 r:1.13
ERROR: opening '/htdocs/cacti/rra/localhost_proc_7.rrd': No such file or directory
OK u:0.00 s:0.00 r:1.13
(root@srv-stats)
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Looks like the web server is running in a chroot, which is causing you path issues.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
juanito
Posts: 4
Joined: Wed Nov 16, 2005 10:47 am

Post by juanito »

yes it's running chrooted because it's the apache openbsd.

but i guess it's possible to do something, isn't it ?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Create a link in the root of the file system so that the poller will work?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
juanito
Posts: 4
Joined: Wed Nov 16, 2005 10:47 am

Post by juanito »

a link won't work, the aim of chrooting a server is that it can't acces to any file or folder outside the folder you consider as /.

I juste unchrooted apache by using -u in rc.conf ;)

Thx for your help anyway :)
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I don't agree...

The chroot is to isolate a known process to a certain directory.

The Poller on the other hand is not running as the web server users under the web server, so it's not chrooted. So, if you did create a link on the root of the file system to the htdocs directory like the poller was looking for, you wouldn't decrease your security of the chrooted web server. Because, it's a link into the chroot, not out of the chroot.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests