The poller hangs

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

noisesinmyhead
Posts: 9
Joined: Thu Jan 04, 2007 4:17 pm

The poller hangs

Post by noisesinmyhead »

Hello!

I have the following configuration:
Cacti 0.8.6i
RRDTool 1.2.15
PHP 5.2.0 (4.4.4 is the default one, but it has serios problems with MySQL + UTF8)
Windows XP SP2

I'm a new user of Cacti, but I think I've done everything all right. When I try do run poller.php:

Code: Select all

F:\httpd\cacti>c:\php5\php f:/httpd/cacti/poller.php
01/04/2007 11:19:15 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/cacti/cactid.exe, ARGS:  0 3]
Waiting on 1/1 pollers.

[CUT]

^C
F:\httpd\cacti>
It shows these messages until the maximum execution time is reached. No data is written in the "rra" directory. I tried switching the poller form "cmd.php" to "cactid", but the problem remained. Any ideas? Thanks in advance!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) there is a serious bug with cacti and php 5.2.0 http://bugs.cacti.net/view.php?id=877 Go back to 5.1.6 or use the svn version.

2) read http://forums.cacti.net/viewtopic.php?t=11747
noisesinmyhead
Posts: 9
Joined: Thu Jan 04, 2007 4:17 pm

Post by noisesinmyhead »

Hello!

I've applied poller_output_remainder.patch and tried using PHP 5.1.6 (and it seems that the poller was patched successfully). The result is the same:

Code: Select all

F:\httpd\cacti>c:\php-5.1.6-Win32\php.exe -c c:\php-5.1.6-Win32\ poller.php
01/05/2007 10:05:02 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/cacti/cactid.exe, ARGS:  0 3]
Waiting on 1/1 pollers.
[CUT]
^C
F:\httpd\cacti>
I've missed the Cygwin1.dll version - it's 1005.21.0.0.
Georgi Hristozov
danmac
Posts: 12
Joined: Thu Dec 21, 2006 11:18 am
Location: England

Post by danmac »

Some things you might wanna try ... I warn you tho I'm a bit of a n00b myself with Cacti so take it or leave it :)

Change poller back to cmd.php (less to worry about that way, although I've found cactid is better at not hanging)

Disable all data sources except the ones you know work, or maybe only one on localhost ie. the one most likely to be successful (to make sure a data source isn't the problem)

If you changed the poller to cmd.php - also set the maximum concurrent poller processes (same page you pick cmd.php or cactid) to 2. When you retry polling, if you get "Waiting on 2/2 pollers" something is fundamentally broken with the poller. If you get "Waiting on 1/2 pollers" then it's more likely to be a data source problem. Set it back to 1 when you're done testing, particularly if you intend switching back to cactid.

Check your filesystem permissions with filemon or procmon ( http://www.sysinternals.com ) if you get access denied anywhere on the cacti processes, fix these. (there is an automated script somewhere that sets the permissions but I had to modify it so check the script first)

HTH :)
[size=75][b]Win2003 x86 SP1 | IIS 6 | Cacti 0.8.6i | Cactid 0.8.6i | MySQL 5.0.24 | PHP 4.4.4 | RRD 1.2.15 | NetSNMP 5.3.1 | Cygwin 1.5.23 | P4 2.1GHz | 512MB | 300GB RAID1[/b][/size]
noisesinmyhead
Posts: 9
Joined: Thu Jan 04, 2007 4:17 pm

Post by noisesinmyhead »

I've already tried with both cmd.php and cactid and tried increasing the poller processes. The result was the same - it still hangs. I switched all the data sources to "None", although I'm using MRTG without any problems, the same. I'll monitor the files ASAP to see if there's an error with the permissions, but I think it's less possible.
Georgi Hristozov
danmac
Posts: 12
Joined: Thu Dec 21, 2006 11:18 am
Location: England

Post by danmac »

Sorry dude it sounds like there's something really wrong with your cacti install ... :(

Another thing you can try is opening Task Manager and seeing what new processes appear when you run the poller. Whichever process doesn't go away indicates your problem. For example I found that snmpwalk was hanging my poller this way. (due to a data source that wasn't playing properly)

I'm sure there are much smarter ways to diagnose this but in the meantime it's worth a try.

Is there anything interesting in your cacti logs? If you don't know, maybe post the results of your last poll?
[size=75][b]Win2003 x86 SP1 | IIS 6 | Cacti 0.8.6i | Cactid 0.8.6i | MySQL 5.0.24 | PHP 4.4.4 | RRD 1.2.15 | NetSNMP 5.3.1 | Cygwin 1.5.23 | P4 2.1GHz | 512MB | 300GB RAID1[/b][/size]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) stick with the cmd.php poller until things are working.

2) re-enable your data sources

3) clear the poller cache

4) re-read the installation guide in my signature, paying special attention to the various NTFS settings one must set.

5) Manually run: php <path_cacti>\poller.php from YOUR command prompt -- does it work? paste the output

6) Change the logging level in cacti to debug for a cycles. Run the cacti scheduled task again. Paste the log file.
danmac
Posts: 12
Joined: Thu Dec 21, 2006 11:18 am
Location: England

Post by danmac »

BSOD2600 wrote:3) clear the poller cache
Can't believe I forgot that one ... doh ...

Anyway I'm done wasting time at work, have a good weekend y'all :)

Good luck!
[size=75][b]Win2003 x86 SP1 | IIS 6 | Cacti 0.8.6i | Cactid 0.8.6i | MySQL 5.0.24 | PHP 4.4.4 | RRD 1.2.15 | NetSNMP 5.3.1 | Cygwin 1.5.23 | P4 2.1GHz | 512MB | 300GB RAID1[/b][/size]
noisesinmyhead
Posts: 9
Joined: Thu Jan 04, 2007 4:17 pm

Post by noisesinmyhead »

I did all the steps and ran the script (Cacti-Security). The output of the poller:

Code: Select all

F:\>c:\php-5.1.6-Win32\php.exe -c c:\php-5.1.6-Win32\ f:\httpd\cacti\poller.php
01/05/2007 08:27:09 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/cacti/cactid.exe, ARGS:  0 3]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.

...

^C
F:\>
Here is the logfile.
Georgi Hristozov
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) why are you still using cactid, when I said to use cmd.php?

2) Please read in my FAQ (near the bottom) about enabling debug mode -- yours is not in it.
noisesinmyhead
Posts: 9
Joined: Thu Jan 04, 2007 4:17 pm

Post by noisesinmyhead »

I selected DEBUG logging level in the Cacti settings. All the checkboxes below it are checked. I quite can't understand why there isn't any information about SNMP etc. in the log file and I think it's the bug mentioned in the end of your document.

I switched to cmd.php and here is the result:

Code: Select all

F:\>c:\php-5.1.6-Win32\php.exe -c c:\php-5.1.6-Win32\ f:\httpd\cacti\poller.php

01/05/2007 10:40:12 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q f:/httpd/cacti/cmd.php 0 3]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.

[CUT]

^C
F:\>
Here is the logfile. It's nearly the same, but I can't understand the whole thing with the DEBUG mode...
Last edited by noisesinmyhead on Fri Jan 05, 2007 4:13 pm, edited 1 time in total.
Georgi Hristozov
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

noisesinmyhead wrote:I selected DEBUG logging level in the Cacti settings. All the checkboxes below it are checked. I quite can't understand why there isn't any information about SNMP etc. in the log file and I think it's the bug mentioned in the end of your document.
Some times cacti doesnt seem to get into debugging mode properly. often enabling/disabling and then reenabling it works.

Fire up Sysinternals FileMon when you run the poller and post the log.
noisesinmyhead
Posts: 9
Joined: Thu Jan 04, 2007 4:17 pm

Post by noisesinmyhead »

I tried enabling the DEBUG mode like this, but it still doesn't report all the information. I ran poller.php again and here's the log. Here are only a few cycles with the "Waiting on 1/1 pollers." message, because every time it showed, the log was filled with many identical entires.
Georgi Hristozov
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You appear to have limited Filemon to only show php.exe. please re-run with nothing filtered.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well the problem here is BSOD that you should also be having them turn logging to MEDIUM and then having them run the following from a command line:

"php <path_cacti>/cmd.php"

and post the reponse. When we run Cactid and it's not setup properly, we should also run the following from the command line:

"./cactid"

and then post the results as well. If the command returns data, then it's either rrdtool, paths or permissions.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests