[solved] poller error when trying to use a scheduled task

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

Moderators: Developers, Moderators

marianne.dherens
Posts: 31
Joined: Mon Mar 09, 2009 5:02 am
Location: Brussels

[solved] poller error when trying to use a scheduled task

Post by marianne.dherens »

Hi guys!

config:
  • Operating System:windows XP
    Webserver: Apache2.2
    Cacti: 0.8.7d
    Spine:0.8.7a
    MySQL: 5.0.77
    PHP: 5.2.9
    RRDTool (Cygwin or Win32 version): 1-2.15
    Net-SNMP:5.4.2.1-1
    Cygwin (cygwin1.dll version): 1.5.20
    Plugin Architecture: none
So I created a host, localhost, which is up. I added a few graphics but I am not getting anything displayed (not even a blank graph). The SNMP queries returns results.

Here is what I am trying to do (this is at the end of the cacti manual):
Log into the user account you'll be using for the scheduled task and verify starting a Cacti polling cycle works. Do this by running the following from the command prompt:

php c:/cacti_web_root/cacti/poller.php

The output should look something like the following:

C:\>php c:\inetpub\wwwroot\cacti\poller.php
OK u:0.00 s:0.06 r:1.32
OK u:0.00 s:0.06 r:1.32
OK u:0.00 s:0.16 r:2.59
OK u:0.00 s:0.17 r:2.62
10/28/2005 04:57:12 PM - SYSTEM STATS: Time:4.7272 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:2 DataSources:4 RRDsProcessed:2

After this has ran once, you should have cacti.log in /cacti/log/ and rrd files in /cacti/rra/.

But I don't get that. This command php c:/cacti_web_root/cacti/poller.php gives me this result:

Code: Select all

04/16/2009 01:10:44 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Scheduled Task Int: '300', Time Since Last: '73467', Max Runtime '298', Poller Runs: '1'
04/16/2009 01:10:44 PM - POLLER: Poller[0] WARNING: Scheduled Task is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Scheduled Task, but 73467 seconds have passed since the last
 poll!
04/16/2009 01:10:44 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Proces
s [CMD: c:/php/php.exe, ARGS: -q "c:/apache/htdocs/cacti/cmd.php" 0 0]
04/16/2009 01:10:45 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q "c:/apache/htdocs/cacti/cmd.php" 2 2]
Waiting on 2/2 pollers.
04/16/2009 01:10:46 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe upd
ate C:\apache\htdocs\cacti\rra\my_windows_localhost_traffic_in_14.rrd --template traffic_out:traffic_in 1239880245:5452475:54412932
04/16/2009 01:10:46 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\apache\htdocs\cacti\rra\my_windows_localhost_proc_8.rrd --template proc 1239880245:81
04/16/2009 01:10:46 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\apache\htdocs\cacti\rra\my_windows_localhost_cpu_12.rrd --template cpu 1239880245:4
04/16/2009 01:10:46 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\apache\htdocs\cacti\rra\my_windows_localhost_cpu_13.rrd --template cpu 1239880245:6
04/16/2009 01:10:46 PM - SYSTEM STATS: Time:1.3813 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:4
Loop  Time is: 1.44945693016
Sleep Time is: 298.496927023
Total Time is: 1.50307297707
These 4 files mentionned are created and I found them in the rra folder (my_windows_localhot_cpu12.rrd ...)

I did try it lots of times in more than just the last 5 minutes, so it is also saying that it out the 300 seconds allowed.
I have no idea what's wrong, so any idea is very welcome :-)

Thanks for your help,

Marianne
Attachments
localhostconfig.JPG
localhostconfig.JPG (55.43 KiB) Viewed 7402 times
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

You get this output because you have logging set to DEBUG
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
marianne.dherens
Posts: 31
Joined: Mon Mar 09, 2009 5:02 am
Location: Brussels

Post by marianne.dherens »

yes I know, but how do I know that the polling really worked ?

and more importantly why don't I have any graph displayed ?

Thanks for helping :)
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Have a look at the timestamp on the RRD files - have they ever been updated ?

Also, post a verbose output of the graph in Debug mode.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Turn on graph debugging to find out why no graphs. Looks like cacti is properly getting and storing the data. Possibly NTFS permission issue on cmd.exe / rrdtool.exe.
marianne.dherens
Posts: 31
Joined: Mon Mar 09, 2009 5:02 am
Location: Brussels

Post by marianne.dherens »

About the rrd files: I think they have been updated (since they were created on wenesday and modified on thursday).

Graph debug gives this output:
RRDTool Command:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="my Windows Localhost - CPU Utilization - CPU0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="percent" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="C\:/apache/htdocs/cacti/rra/my_windows_localhost_cpu_12.rrd":cpu:AVERAGE \
AREA:a#00CF00FF:"CPU Utilization" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n"

RRDTool Says:

OK
I also changed the permission on rrdtool.exe to give all permission to all users (was already done on cmd.exe).

Any ideas ?
marianne.dherens
Posts: 31
Joined: Mon Mar 09, 2009 5:02 am
Location: Brussels

Post by marianne.dherens »

I had a look at your installation guide and I could not find any of those users: IUSR_ and IIS_WPG in the rrdtool.exe properties (see attachment).

I also add a look at the user accounts on my computer and the IUSR_ is there (I changed the rights from guest to admin) but still no IIS_WPG. IIS admin is running I checked that too.

What can I do ?

Thanks for your help :)
Attachments
rrdtoolproperties.JPG
rrdtoolproperties.JPG (68.73 KiB) Viewed 7302 times
Last edited by marianne.dherens on Tue Apr 21, 2009 3:29 am, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Per my installation guide instructions, only Windows 2003 has the IIS_WPG account. Since you're on Windows XP, you'll only have the IUSR_COMPUTERNAME account -- which I do see in that list.

please follow my installation guide, paying attention to the various NTFS permissions which need to be set. The user running the scheduled task also needs permissions -- the installation guide documents this.
marianne.dherens
Posts: 31
Joined: Mon Mar 09, 2009 5:02 am
Location: Brussels

Post by marianne.dherens »

Hi

I followed all the instructions in your guide except the one saying to delete all the dll files in the rrdtool folder because if I do that it does not display anything (not even a blank graph which is the case now) and I got a PHP error message when I run the poller.
I did schedule the poller to run every 5 minutes but it actually never stops (I don't know if it is a problem).
I did set up all permissions for all users for all the directories/files you mentionned in your installation guide... but still no graphs

Any idea ?

I enclosed the view of the PHP task. It says that the task started at 11:54 which was the first time it ran but it stopped after 72 minutes or so so I put it back (that is why it is saying "last run time 1:57"). The "next run time" changes every 5 minutes but not the "last run time"
Attachments
scheduledtasks.JPG
scheduledtasks.JPG (34.59 KiB) Viewed 7299 times
marianne.dherens
Posts: 31
Joined: Mon Mar 09, 2009 5:02 am
Location: Brussels

Post by marianne.dherens »

I just launched manually the poller and it says that it did not run for more than 8000 seconds!

Code: Select all

C:\php>c:\php\php.exe c:\apache\htdocs\cacti\poller.php
04/21/2009 02:27:28 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Scheduled Task Int: '300', Time Since Last: '8269', Max Runtime '298', Poller Runs: '1'
04/21/2009 02:27:28 PM - POLLER: Poller[0] WARNING: Scheduled Task is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Scheduled Task, but 8269 seconds have passed since the lastpoll!
Waiting on 2/2 pollers.
04/21/2009 02:27:29 PM - SYSTEM STATS: Time:1.3375 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:4
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

marianne.dherens wrote:I followed all the instructions in your guide except the one saying to delete all the dll files in the rrdtool folder because if I do that it does not display anything (not even a blank graph which is the case now) and I got a PHP error message when I run the poller.
I strongly suggest you stop using the cygwin builds of rrdtool and instead use the W32 ones -- like 1.2.26. Did you install cygwin too?
marianne.dherens wrote:I did schedule the poller to run every 5 minutes but it actually never stops (I don't know if it is a problem).
yes that IS a big problem. for testing, if you manually run: php cmd.php (with the cacti logging level set to debug), do you see any errors?
marianne.dherens wrote:I did set up all permissions for all users for all the directories/files you mentionned in your installation guide... but still no graphs
I'm having my doubts, because you missed the IUSR_COMPUTERNAME account on various files as it stated. Have you corrected the NTFS permission problems yet?

Any idea ?

I enclosed the view of the PHP task. It says that the task started at 11:54 which was the first time it ran but it stopped after 72 minutes or so so I put it back (that is why it is saying "last run time 1:57"). The "next run time" changes every 5 minutes but not the "last run time"[/quote]
marianne.dherens
Posts: 31
Joined: Mon Mar 09, 2009 5:02 am
Location: Brussels

Post by marianne.dherens »

I strongly suggest you stop using the cygwin builds of rrdtool and instead use the W32 ones -- like 1.2.26. Did you install cygwin too?
Yes I did install it. Shall I remove it ? How do I use the win32 tools ? Are they installed by default ?
marianne.dherens wrote:
I did schedule the poller to run every 5 minutes but it actually never stops (I don't know if it is a problem).

yes that IS a big problem. for testing, if you manually run: php cmd.php (with the cacti logging level set to debug), do you see any errors?
Actually it doesn't do that anymore. I checked a box in settings to stop the task if it runs for 4 minutes. So the task start, run for 4 minutes and 1 minute later it starts again and so on...
marianne.dherens wrote:
I did set up all permissions for all users for all the directories/files you mentionned in your installation guide... but still no graphs

I'm having my doubts, because you missed the IUSR_COMPUTERNAME account on various files as it stated. Have you corrected the NTFS permission problems yet?
Yes I really think I did it correctly, which doesn't mean I can't be wrong ;) (see enclosed files)
About PHP though, I did create 2 folders because they were not there: Session and UploadTemp, I don't know if they were supposed to be in the PHP folder or not.
I also enclosed a screenshot of one graph (the other ones show the same things), I have a pic at one point and then nothing.

And still no graph are being displayed ...
Attachments
graph.JPG
graph.JPG (18.82 KiB) Viewed 7234 times
permissions on the Cacti folder for IUSR_COMPUTERNAME and IUSR
permissions on the Cacti folder for IUSR_COMPUTERNAME and IUSR
permissions.JPG (75.69 KiB) Viewed 7234 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

*sigh*
marianne.dherens wrote:
I strongly suggest you stop using the cygwin builds of rrdtool and instead use the W32 ones -- like 1.2.26. Did you install cygwin too?
Yes I did install it. Shall I remove it ? How do I use the win32 tools ? Are they installed by default ?
yes, remove old rrdtool versions, dlls and cygwin. http://www.gknw.net/mirror/rrdtool/ has the W32 builds of rrdtool. nothing extra to install.
marianne.dherens wrote:Actually it doesn't do that anymore. I checked a box in settings to stop the task if it runs for 4 minutes. So the task start, run for 4 minutes and 1 minute later it starts again and so on...

That is merely a band-aid for the problem, which is STILL present. Not the best thing to do.
marianne.dherens wrote:Yes I really think I did it correctly, which doesn't mean I can't be wrong ;) (see enclosed files)
You still are not adding the IIS_COMPUTERNAME account to the various file/folders which is clearly stated in the installation guide.

I've got an idea, delete everything cacti related (including php and mysql) and give my windows installer a try instead http://forums.cacti.net/viewtopic.php?t=14946
marianne.dherens
Posts: 31
Joined: Mon Mar 09, 2009 5:02 am
Location: Brussels

Post by marianne.dherens »

Hi and thanks for your time.

I removed all the dll files and rrdtool old versions and installed the rrdtool-1.2.30-bin-w32 package.

I erased the rule that made the task stop running after 4 minutes, so now it doesn't stop running again (like before).
You still are not adding the IIS_COMPUTERNAME account to the various file/folders which is clearly stated in the installation guide.
I'm sorry, I don't know how I could do that, I tried to add it manually by typing the name but it says that this user doesn't exist.

I also used Process Monitor to find out what files were denied access to and I found nothing denied. I ran the php task with the task scheduler then I did it using the command line and I think there is another problem. On the exemple you show, I can see the process php.exe and rrdtool.exe but all I can see is explorer and svchost (see enclosed snapshot). However I can find the php.exe process ran by explorer.exe
Attachments
processmonitor.JPG
processmonitor.JPG (394.22 KiB) Viewed 7171 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

marianne.dherens wrote:
You still are not adding the IIS_COMPUTERNAME account to the various file/folders which is clearly stated in the installation guide.
I'm sorry, I don't know how I could do that, I tried to add it manually by typing the name but it says that this user doesn't exist.
COMPUTERNAME is a variable -- use your real computer name. A default install of IIS on Windows XP/2003 will have an user account named IUSR_something. Its been changed/deleted, then its up to you to rectify that problem.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests