[Solved] Scheduled task weirdness

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

Moderators: Developers, Moderators

Post Reply
drinkingbird
Posts: 7
Joined: Sat Nov 17, 2007 12:01 am

[Solved] Scheduled task weirdness

Post by drinkingbird »

When I run poller.php by hand, all is well. When I run it via scheduled task, I get this error from the Spine window that pops up:

Code: Select all

SPINE: Using spine config file [spine.conf]
SPINE: Version 0.8.7a starting
//.snmp/snmp.conf: No such host or network path
//.snmp/snmp.local.conf: No such host or network path
//.snmp/snmpapp.conf: No such host or network path
//.snmp/snmpapp.local.conf: No such host or network path
//.snmp/snmp.conf: No such host or network path
//.snmp/snmp.local.conf: No such host or network path
//.snmp/snmpapp.conf: No such host or network path
//.snmp/snmpapp.local.conf: No such host or network path
I've played around with the "start in" directory which usually fixes relative path issues but this seems more like some sort of issue with the leading //. I'm a bit stumped as to why it would do this under scheduled task and not when doing it manually (using the same user account and a paste of the command from the scheduled task, executed in the same "start in" directory). Anyone else seen this? CMD.php seems to work fine.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

If you manually run spine (with cacti's logging level set to debug), does it successfully run like it should?

Spine is built with net-snmp, which apparently is trying to find the default snmp.conf config file, for some reason. TheWitness will know more details.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Very wierd, what permissions doe the poller user have?
I run it as an admin and don't have these issues. However, I also have a complete install of Cygwin. I guess I should also test this on a minimum install box as well. Please explain you deployment a little.

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?
drinkingbird
Posts: 7
Joined: Sat Nov 17, 2007 12:01 am

Post by drinkingbird »

TheWitness wrote:Very wierd, what permissions doe the poller user have?
I run it as an admin and don't have these issues. However, I also have a complete install of Cygwin. I guess I should also test this on a minimum install box as well. Please explain you deployment a little.

TheWitness
Currently to test I'm running the task as administrator (while logged in as administrator). If I run it manually, also logged in as administrator, I don't get the issue. I've tried running poller.php from command.com, cmd.exe, and from start-run, works fine all 3 ways with the pasted string from the sched task, just something funky with the scheduled task. I don't seem to have the issue if I use cmd.php, runs quick and no errors reported.

I'm using the plain spine binary, don't have cygwin installed. I have net-snmp installed with just the tools and mibs (and the required standard agent, not the windows one).

Just can't figure out for the life of me what the sched task is doing differently. It should run the task just as though you had gone to start-run and pasted it in yourself but obviously there is some slight difference. I can swap back to CMD.php but I plan to add a bunch more devices in and don't want it to get bogged down.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Just a clarification, the scheduled task run field should be: c:\php\php.exe c:\inetpub\wwwroot\cacti\poller.php. And the start in should be c:\inetpub\wwwroot\cacti.

If you want, run Sysinternals FileMon during ONE polling cycle and upload the log file.
drinkingbird
Posts: 7
Joined: Sat Nov 17, 2007 12:01 am

Post by drinkingbird »

BSOD2600 wrote:Just a clarification, the scheduled task run field should be: c:\php\php.exe c:\inetpub\wwwroot\cacti\poller.php. And the start in should be c:\inetpub\wwwroot\cacti.

If you want, run Sysinternals FileMon during ONE polling cycle and upload the log file.
Yup, that's it (well a bit different for my install obviously but the equivalent). I've even tried doing "start in" as a few other locations just to see if it was a relative path issue. It seems more of a command error related to the //.

I'm going to try changing it to use PHP SNMP instead of net-snmp (I think this is done via a config file somehwere, I'll look it up) just to see if there is any difference. I have both. I've tried having my mibdirs set to either one with the same results.
drinkingbird
Posts: 7
Joined: Sat Nov 17, 2007 12:01 am

Post by drinkingbird »

Well I'm gonna swap back to cmd.php for now. Here is a debug output in case it helps. Not sure if the net-snmp error right before the other errors is normal or not? I have the latest net-snmp installed. Obviously I trimmed the beginning and end.

Code: Select all

11/21/2007 09:47:29 PM - SPINE: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 10
11/21/2007 09:47:29 PM - SPINE: Poller[0] Version 0.8.7a starting
11/21/2007 09:47:29 PM - SPINE: Poller[0] DEBUG: MySQL is Thread Safe!
11/21/2007 09:47:29 PM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
11/21/2007 09:47:29 PM - SPINE: Poller[0] DEBUG: Issues with SNMP Header Version information, assuming old version of Net-SNMP.
//.snmp/snmp.conf: No such host or network path
//.snmp/snmp.local.conf: No such host or network path
//.snmp/snmpapp.conf: No such host or network path
//.snmp/snmpapp.local.conf: No such host or network path
//.snmp/snmp.conf: No such host or network path
//.snmp/snmp.local.conf: No such host or network path
//.snmp/snmpapp.conf: No such host or network path
//.snmp/snmpapp.local.conf: No such host or network path
11/21/2007 09:47:32 PM - SPINE: Poller[0] SPINE: Initializing PHP Script Server(s)
11/21/2007 09:47:32 PM - SPINE: Poller[0] DEBUG: SQL:'SELECT id FROM host WHEREdisabled='' AND id BETWEEN 0 AND 3 ORDER BY id'
11/21/2007 09:47:32 PM - SPINE: Poller[0] DEBUG: Initial Value of Active Threads is 0
11/21/2007 09:47:32 PM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
bunglega
Posts: 9
Joined: Mon Nov 12, 2007 9:06 am

..

Post by bunglega »

I'm having the exact same issue ... did anyone ever find a solution to this problem? Spine was working fine, I added 2 new devices and then I started receiving this error? I have made no changes to net-snmp directories, files or locations and the scheduled task is setup according to the tips in this thread.

HELP!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What error? whats your versions? Make sure you're using the latest cacti and spine.
bunglega
Posts: 9
Joined: Mon Nov 12, 2007 9:06 am

..

Post by bunglega »

I'm using:

AMD Dual-Core 2.6 GHz CPU
4 GB RAM (upgrading to 16 in the near future)
Windows 2K3 Standard
Cacti Version 0.8.7a
Cacti OS win32
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x

I updated Spine using the file downloaded from the main page:
cacti-spine-0.8.7a.zip

I receive the SNMP error message about missing the .conf file

Code: Select all

//.snmp/snmp.conf: No such host or network path 
//.snmp/snmp.local.conf: No such host or network path 
//.snmp/snmpapp.conf: No such host or network path 
//.snmp/snmpapp.local.conf: No such host or network path 
//.snmp/snmp.conf: No such host or network path 
//.snmp/snmp.local.conf: No such host or network path 
//.snmp/snmpapp.conf: No such host or network path 
//.snmp/snmpapp.local.conf: No such host or network path 
Everything was working fine ... I added two additional hosts and scaled the logging back to information only. At that point, Spine started reporting this error. It appears to work correctly when I execute from a command prompt. I have since gone back to cmd.php and it fixed the problem - however, I would prefer to use spine since I will be monitoring 100 plus servers with about 10 graphs per server.

I bumped Cacti logging back up to full and it actually appeared to improve the problem - I was spawning 5 sessions of Spine, of those 5 - 2 would complete and 3 would fail.

My originial installation was performed using the Windows Installer application (excellent piece of work by the way).

Thanks All....
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Upgrade to cacti 0.8.7b.

As for spine, if it's working properly (as in polling devices, etc) then just ignore those conf errors. When you say spine fails, what do you mean exactly?
bunglega
Posts: 9
Joined: Mon Nov 12, 2007 9:06 am

..

Post by bunglega »

I guess it doesn't really fail ... it executes, reports the SNMP errors and my graphs stop updating. I will upgrade to b and see if that clears up my problem.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests