0.8.6 Problems with Task Scheduler

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

Moderators: Developers, Moderators

vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

0.8.6 Problems with Task Scheduler

Post by vtmgr »

We just upgraded to 0.8.6, and all went very smoothly, except that
I can't get the poller to work under task scheduler.

Works fine from the command line, but just flashes a DOS box, and disappears when running from Windows Task scheduler.

Running on IIS 6, PHP 4.3.8, mySQL.

same behaviour with nncron. Cron job runs fine, just doesn't do anything.

I have tried various combinations of rights and running as...

It was working before on 0.8.5.

Thanks in advance for your help.

b.t.w Very nice job on 0.8.6!
Teppe

Post by Teppe »

Hi Vtmgr,

Do you call poller.php? In previous version you needed to call cmd.php.
Command line in task sheduler must be something like c:\php\php.exe c:\inetpub\wwwroot\cacti\poller.php (check the install on win32 manual)


Cheers,
Teppe
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

All,

Please download the latest pre-release of 0.8.6a to correct intermittant graphing problems. It is dated September 21st. Thanks for the good word, but let me tell you, it didn't go off without a few nasty hitches.

The answer to your question is yes, you do schedule poller.php. Please note, if you use PHP 5.x, you need to schedule PHP-WIN.EXE ... and not PHP.EXE.

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?
vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

0.8.6 Problems with Task Scheduler

Post by vtmgr »

Thanks for help...

Yes, I am scheduling poller. Command line is:

"d:\php\php.exe d:\inetpub\wwwroot\cacti\poller.php"

I have tried changing the execution directory, and running it as system, administrator, etc. to no avail.

I _did_ put it in a .bat wrapper to see if I could see the message, and it includes this: <br><strong>This script is only meant to run at the command line.</strong>

So now I am tring to learn enough php to figure out what this is telling me.

Still runs if I open a command window, and run the above command line. Many new errors, but that is the subject of another post...
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

vtmgr,

First, apply the pre-release patch to 0.8.6a. It can be located at http://www.cacti.net/downloads/beta

Then, please state the following:

PHP Version
OS Version
Apache/IIS Version
Net-SNMP Version (if using CACTID)
Using cmd.php or cactid
Cygwin Installed

You should only have to modify three lines in config.php if using cmd.php as the poller. Therefore, don't make any other changes. You also must be more specific with what your problems are.

Thanks,

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?
vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

Post by vtmgr »

OK, sorry for ambiguity.

I am running:

PHP Version: 4.3.8
OS Version: Windows 2003 Server
Apache/IIS Version: IIS 6
Net-SNMP Version (if using CACTID): 5.1.2
Using cmd.php or cactid: cmd.php (tried cactid, but it just hangs)
Cygwin Installed: no

Updated to 0.8.6a

adjusted only the three lines in config.php.

The problem is poller.php dies immediately, with the following message:

<br><strong>This script is only meant to run at the command line.</strong>

And I guess the question is why poller.php thinks it is _not_ being run from a command line.

Thanks for your help with this.

TheWitness wrote:vtmgr,

First, apply the pre-release patch to 0.8.6a. It can be located at http://www.cacti.net/downloads/beta

Then, please state the following:

PHP Version
OS Version
Apache/IIS Version
Net-SNMP Version (if using CACTID)
Using cmd.php or cactid
Cygwin Installed

You should only have to modify three lines in config.php if using cmd.php as the poller. Therefore, don't make any other changes. You also must be more specific with what your problems are.

Thanks,

TheWitness
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Clear logfile, disable scheduled task, turn logging to DEBUG, open a command window and run c:\php\php.exe c:\<webroot>\cacti\poller.php and post the results from the command line and logfile.

Thanks,

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?
vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

Post by vtmgr »

This does not (to my eye) address the poller issue, but does show some interesting things.

Also, I tried changing the php executable I was pointing at to the one in the cli directory (d:\php\cli\php.exe).

It seems to run, although I am not updating yet (poller is timing out, as shown in the logfile).

The results I am sending are from running as you specified, not as mentioned above.

Thanks again.
Attachments
logfile.txt
(117.72 KiB) Downloaded 289 times
poller1.txt
Output of poller command line
(85.79 KiB) Downloaded 230 times
vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

Post by vtmgr »

forgot to include...

rrdtool version 1.0.48
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

First of all, you are getting the following output:

'cat' is not recognized as an internal or external command,
operable program or batch file.
'cat' is not recognized as an internal or external command,
operable program or batch file.
'uptime' is not recognized as an internal or external command,
operable program or batch file.
'who' is not recognized as an internal or external command,
operable program or batch file.

This indicates that your are attempting to run programs that don't exist. You are likely using the default "localhost" template provided by Cacti. It does not work on most Windows systems without a supplemental addons to that environment. So delete it if you are using it.

More comments to follow as I review your output.

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?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I am interested in the following lines. They will go away once you delete the bad host selections, but I need to modify this code to be a little better behaved.

TheWitness

<br />
<b>Warning</b>: stream_select(): unable to select [0]: No error in <b>d:\inetpu
b\wwwroot\cacti\lib\rrd.php</b> on line <b>150</b><br />
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?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You also have a problem with the following perl script. You should run from the command line and clean it up, whatever it is.

<br />
<b>Warning</b>: stream_select(): unable to select [0]: No error in <b>d:\inetpu
b\wwwroot\cacti\lib\rrd.php</b> on line <b>150</b><br />

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?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It also appears that because of the STDERR issue mentioned a note or two ago, the RRDTool is locking up. I will change the behavior and repost a new pre-release tonight. Thanks for the information. For now, if you clean up all the mischivous perl scripts and hosts, you will start generating output.

I will be posting to the web site a revised RRD.PHP file to correct the undesirable behavior in the poller.

Thanks Again,

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?
Guest

Post by Guest »

Wow! Such support! If only our internal developers understood their code as well.

but I digress...

I will track down and remove the errant Unix commands.

Your middle two posts seem to be missing something. just had the php complaint.

And I will check for the new rrd.php tomorrow AM. Do I just replace the module, or do a full upgrade. or...?

as always, thanks for the hard work, and the wonderful tool all of you have crafted.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Guest,

Ian made a few more changes so I suggest you simply download the entire package. Unfortunately, I am having problems with the RRDTool process pipe and may have to abandon it completely due to compatability problems between *nix and Windows. That makes me sad!!

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 1 guest