[SOLVED] Poller isn't polling.

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

Moderators: Developers, Moderators

asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

cacti.log remains empty.

poller.log is empty as well.
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

What are the permissons for the log files and for the rra directory?

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

drwxr-xr-x cactiuser www-data
-rw-r--r-- cactiuser www-data
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

Out of curiosity, please add a g+w for the directories (rra and log) and the log- and rra-files as well.

What group is your cactiuser in?

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

Yeah, one of the first things I did, thinking it was a permissions error, was chmod -R 777 rra log. Same results. :(

Cactiuser is currently in "users" but was in "www-data" before.

One thing that's been bothering me is the cactiuser itself. I feel like I'm missing something when creating it... I useradd and passwd it, but I can't remember if there's anything in particular I need to do with Cacti. :\
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

The cactiuser(id) is used by the crontab executing the script with the permissions for the cactiuser (which can easily have a /nologin-shell), therefore the permissions are most important.

But right now, I'm out of ideas as well. :(

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

Damn. :(

Thanks for all the help anyhow. Tomorrow is a slow day, so I'll try some stuff then and see what I can't do.
maanus
Posts: 1
Joined: Mon Mar 17, 2008 2:03 am

Post by maanus »

I have the same problem - no output from poller.php, no logs, nothing. I have also checked/done all recommended debuggin actions - no results.

I am using apache2 with php5 and mysql5 and cacti 0.8.6h all from simple apt-get in Ubuntu 6.06 LTS (also I have patched config.php to overcome the bug described in https://bugs.launchpad.net/ubuntu/+sour ... bug/194687 and changed a line in /etc/cacti/apache.conf to check for mod_php5.c instead of mod_php4.c to overcome the blank page when browsing cacti)

Can it be, that the problem is somehow related to using Ubuntu 6.06? Some expected default tools/paths that are different in Ubuntu and some other distribution? How to debug that?
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

Could be, could also be related to the package installation. I'm running Debian Lenny and my first try to install CACTI was through apt-get as well. But the package install script had problems with creating the database. So I de-installed all related packages/dependencies and started to installed the following packages separately: apache2, mySQL 5.x.x, PHP 5.x.x and rrdtool with apt-get.

After I had done that, I installed CACTI by downloading the archive from this page and following the installation instructions (basicly CACTI is just a bunch of PHP scripts--except the above mentioned packages ;) ).

Doing that it worked for me...
(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

It isn't related to 6.06, as I am running Cacti on another 6.06 install.

I'm gonna upgrade to fiesty or gutsy and see if I get the same issues. When I can, I'll be running hardy. :)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

Throughout my course of upgrading 6.06 -> 6.10 -> 7.04 -> 7.10, Cacti started working. I believe it was during the 6.06 -> 6.10 looking at the timestamps.

Problem solved, sort of. ;)
hosierd
Posts: 19
Joined: Wed Jun 09, 2004 10:55 am
Location: Rockville, Maryland

Post subject: [SOLVED] Poller isn't polling. - Thought

Post by hosierd »

Ran into a similar problem on a brand new build this week.

In troubleshooting found that when issuing php command as the cactiuser nothing would really happen, ie no update to the rrds no log entries in cacti.log. Issuing the same command as root would work as expected.

In my case I found that erros indicating my cactiuser did not have read access to

/var/lib/net-snmp/snmpapp.conf and next an inabllity to create files in the /var/lib/net-snmp direcitory. Modified as needed and I no longer get the net-snmp errors but poller run as anyone other than root does not update my rrds or my cacti.log file. I've confirmed that my cactiuser can create in both locations, /rra &/log so I'm not sure where to go next
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

RUn

Code: Select all

php -q poller.php --force
from cli you should see rrdtool update statements and hopefully some results of those. You may want to pipe output to a file for easier searching
Reinhard
hosierd
Posts: 19
Joined: Wed Jun 09, 2004 10:55 am
Location: Rockville, Maryland

Post by hosierd »

gandalf wrote:RUn

Code: Select all

php -q poller.php --force
from cli you should see rrdtool update statements and hopefully some results of those. You may want to pipe output to a file for easier searching
Reinhard
Thanks.

I must have some sort of rights/path issue. When I look at my /var/log/messages file I see that my crontab entry for the cactiuser is kicking off every 60 seconds as I configured it to. However the rrd's and cacti.log don't get updated. If i run the same syntax as root instead of cactiuser the than the rrds and the log get updated. I've tested and confirmed that the catiuser can created modify and delete files in those two locations. The files are owned by the cactiuser. I also found that the system utilities option for view cacti.log will not show the current log. If i do a more on the log after I've had root run the script ever 60 seconds for 10 minutes, the actual log will have entires that the web view into the log won't show.

This is a clean install:

CACTI 0.8b (patched)
SLES 9
MySQL 4.1.22 Standard
Apache 2.2.8
PHP 5.2.5
RRDTool 1.2.26

I experienced the Invalid PHP_SELF path issue due to the way we use an apache alias for the cacti directory. The only way we could get it to work was to do the following:

PostPosted: Tue Feb 12, 2008 5:52 pm Post subject: Reply with quote
A temporary solution would be to edit global.php like that :
megaman wrote:A temporary solution would be to edit global.php like that :

comment this line:

Code: Select all

if (!((is_file($_SERVER["SCRIPT_FILENAME"])) && (substr_count($_SERVER["SCRIPT_FILENAME"], $_SERVER["PHP_SELF"])))) {
add just under it:

Code: Select all

                        if (!((is_file($_SERVER["SCRIPT_FILENAME"])))) {
but I dont know if this is secure or not, at least cacti is working again
If so how do I resolve the Invalid PHP_SELF issue ?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

???
You've found the current workaround already. What are you missing now?
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests