Result from SCRIPT not valid. Partial Result: ...

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

Moderators: Developers, Moderators

Post Reply
CrAZy-BuG
Posts: 5
Joined: Mon Sep 05, 2005 2:57 am

Result from SCRIPT not valid. Partial Result: ...

Post by CrAZy-BuG »

Hi All,

Thanks in advance for taking the time to read my post. I wouldn't normally ask for help, but I have read the forums broken and can't find an answer.

I have just installed cacti 0.8.6f and I am experiencing a problem.

When in debug mode cactid gives me the following warning.

CACTID: Host[1] DS[9] WARNING: Result from SCRIPT not valid. Partial Result: ...

Now my script is a bat file containing just one line. "@Echo 10"

I know you are gonna ask me for one debug log so here it is.
I have two hosts calling the exact same batch file.

09/05/2005 09:15:03 PM - SYSTEM STATS: Time: 2.2061 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 3, Hosts/Process: 3, Data Sources 2, RRDs Processed 2
09/05/2005 09:15:03 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update c:\inetpub\wwwroot\cacti\rra\fast_pc_tendt_8.rrd --template TENDT 1125947701:U
09/05/2005 09:15:02 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update c:\inetpub\wwwroot\cacti\rra\localhost_tendt_9.rrd --template TENDT 1125947701:U
09/05/2005 09:15:02 PM - CACTID: Poller[0] Time: 1.2910 s, Threads: 1, Hosts: 3
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: MYSQL Free & Close Completed
09/05/2005 09:15:02 PM - CACTID: Poller[0] CACTID: Shutting down Net-SNMP API
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: Allocated Variable Memory Freed
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: PHP Script Server Pipes Closed
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: Thread Cleanup Complete
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: SQLCMD: replace into settings (name,value) values ('date',NOW())
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 0
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[2] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (8,'TENDT','2005-09-05 21:15:01','U')
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[2] DS[8] SCRIPT: C:\Inetpub\WWWRoot\Cacti\Scripts\test.bat, output: U
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[2] DS[8] WARNING: Result from SCRIPT not valid. Partial Result: ... 09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[2] ERROR: Empty result [dabug]: 'C:\Inetpub\WWWRoot\Cacti\Scripts\test.bat'
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[2] DEBUG: The POPEN returned the following File Descriptor 7

09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: SQLCMD: update host set status='3',status_event_count='0', status_fail_date='0000-00-00 00:00:00',status_rec_date='0000-00-00 00:00:00',status_last_error='',min_time='6.000040',max_time='20.000220',cur_time='6.000040',avg_time='8.333356',total_polls='9',failed_polls='0',availability='100.0000' where id='2'
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[2] SNMP Result: Host responded to SNMP
09/05/2005 09:15:02 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'cacti' on '127.0.0.1'...
09/05/2005 09:15:02 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'cacti' on '127.0.0.1'...
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 1
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: Valid Thread to be Created
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: In Poller, About to Start Polling of Host
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 0
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
09/05/2005 09:15:02 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (9,'TENDT','2005-09-05 21:15:01','U')
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[1] DS[9] SCRIPT: C:\Inetpub\WWWRoot\Cacti\Scripts\test.bat, output: U
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[1] DS[9] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'C:\Inetpub\WWWRoot\Cacti\Scripts\test.bat'
09/05/2005 09:15:02 PM - CACTID: Poller[0] Host[1] DEBUG: The POPEN returned the following File Descriptor 7

09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: SQLCMD: update host set status='3',status_event_count='0', status_fail_date='0000-00-00 00:00:00',status_rec_date='0000-00-00 00:00:00',status_last_error='',min_time='0.000000',max_time='0.000000',cur_time='0.000000',avg_time='0.000000',total_polls='10',failed_polls='0',availability='100.0000' where id='1'
09/05/2005 09:15:01 PM - CACTID: Poller[0] Host[1] SNMP Result: Host does not require SNMP
09/05/2005 09:15:01 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'cacti' on '127.0.0.1'...
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 1
09/05/2005 09:15:01 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'cacti' on '127.0.0.1'...
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: Valid Thread to be Created
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: In Poller, About to Start Polling of Host
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 0
09/05/2005 09:15:01 PM - CACTID: Poller[0] Host[0] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
09/05/2005 09:15:01 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'cacti' on '127.0.0.1'...
09/05/2005 09:15:01 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'cacti' on '127.0.0.1'...
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 1
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: Valid Thread to be Created
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: In Poller, About to Start Polling of Host
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: Initial Value of Active Threads is 0
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: Parent pid=3644, Script Server pid=0
09/05/2005 09:15:01 PM - CACTID: Poller[0] CACTID: Initializing PHP Script Server
09/05/2005 09:15:01 PM - CACTID: Poller[0] CACTID: Initializing Net-SNMP API
09/05/2005 09:15:01 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'cacti' on '127.0.0.1'...
09/05/2005 09:15:01 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'cacti' on '127.0.0.1'...
09/05/2005 09:15:01 PM - CACTID: Poller[0] CACTID: Version 0.8.6e starting
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The PHP Script Server is Not Required
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: StartHost='0', EndHost='2', TotalPHPScripts='0'
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The script timeout is 25
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The number of concurrent processes is 1
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The polling interval is the system default
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The threads variable is 1
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The log_pstats variable is 0
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The log_pwarn variable is 1
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The log_perror variable is 1
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The ping_timeout variable is 400
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The ping_retries variable is 1
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The ping_method variable is 2
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The ping_failure_count variable is 2
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The ping_recovery_count variable is 3
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The availability_method variable is 2
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The path_php variable is c:/php/php.exe
09/05/2005 09:15:01 PM - CACTID: Poller[0] DEBUG: The log_destination variable is 1
09/05/2005 09:15:00 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:\cactid\cactid.exe, ARGS: 0 2]


Any help would be greatly appreciated. I am sure it is something small that I am missing.

Thanks
CrAZy-BuG
CrAZy-BuG
Posts: 5
Joined: Mon Sep 05, 2005 2:57 am

Post by CrAZy-BuG »

Hi Again,

I forgot to add something.

As a result of this partial results error. My RRDs are saying that the value is NaN which in turn makes the graphs not display any data. The RRDs are created and updated everytime the poller is run.

Thanks again,
CrAZy-BuG
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) Whats the output when you manually run the batch file?
2) Does user running the scheduled task, have rights to execute the batch file?
CrAZy-BuG
Posts: 5
Joined: Mon Sep 05, 2005 2:57 am

Post by CrAZy-BuG »

1. The scripts output is only the string with value 10
2. I am running as administrator on my localmachine which has full control for all the files on the machine.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Please run the batch file and paste the output from the commandline.

Cacti might not be properly executing the batch file, try prefixing: cmd /c to your data query path.
CrAZy-BuG
Posts: 5
Joined: Mon Sep 05, 2005 2:57 am

Post by CrAZy-BuG »

I tried what you sugested. Adding cmd /c to my data input method. Still same result.

I attached a screenshot of my output from test.bat
Attachments
This is the screenshot from the output that my batch file returns. Gif Format
This is the screenshot from the output that my batch file returns. Gif Format
output.gif (2.99 KiB) Viewed 1899 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Ok, so the script seems to be working. Which leads me to believe you Data Input Method is not set up correct.

Post a screenshot of the Data Input Method one you made.
CrAZy-BuG
Posts: 5
Joined: Mon Sep 05, 2005 2:57 am

Post by CrAZy-BuG »

Hi All,

I found a solution to my problem. I switched from CACTID to cmd.php as my poller. BSOD2600 also pointed me into the correct direction. What I did was make the script output two fields.

Output String "VAL1:10 VAL2:20"

Now I only read the first value and it works. I know this is probly not the best fix there is in the world but it will work for me for a while. I would like to get the cactid working though as it is much faster.

BSOD2600 I will post a screenshot of my data input method tonight when I am at home so that you can maybe tell me what is wrong. I really want to solve this problem. I think that the problem might be that you should not capture an output field if you are only specifying one value ?

Thanks for your help,
CrAZy-BuG
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests