Script returns no results
-
- Posts: 7
- Joined: Thu Mar 08, 2007 7:49 am
Script returns no results
Hi *.*,
we have the following problem with a ShellScript Test.
Problem:
Our ShellScript Test runs without problems if we run Hostmonitor in Application Mode. It runs also fine when we do a "Lets Try" in RCC.
The Script Parameters are always the same.
If we run Hostmonitor in Service Mode (Local System Account, Interaction with Desktop allowed) we get the following error meassage: "Error: Script returns no results"
To sum it up: ShellScript runs fine in "Application Mode" but does not work in "Service Mode".
Environment:
Windows 2003 Server SP1
Hostmonitor Version 6.54
What can we do?
Regards,
Jens
we have the following problem with a ShellScript Test.
Problem:
Our ShellScript Test runs without problems if we run Hostmonitor in Application Mode. It runs also fine when we do a "Lets Try" in RCC.
The Script Parameters are always the same.
If we run Hostmonitor in Service Mode (Local System Account, Interaction with Desktop allowed) we get the following error meassage: "Error: Script returns no results"
To sum it up: ShellScript runs fine in "Application Mode" but does not work in "Service Mode".
Environment:
Windows 2003 Server SP1
Hostmonitor Version 6.54
What can we do?
Regards,
Jens
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 7
- Joined: Thu Mar 08, 2007 7:49 am
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Do you see the message "Logged on as user "EMEA\hostmon"" in Event Log?
Probably, you are trying to use mapped drives in the script? You should know, that service is running under different account and does not recognize any mapped drive letters. You should use UNC path instead (e.g. \\server\share_name instead of P:\ )
Could you send the script body to support@ks-soft.net?
Regards,
Max
Probably, you are trying to use mapped drives in the script? You should know, that service is running under different account and does not recognize any mapped drive letters. You should use UNC path instead (e.g. \\server\share_name instead of P:\ )
Could you send the script body to support@ks-soft.net?
Regards,
Max
-
- Posts: 7
- Joined: Thu Mar 08, 2007 7:49 am
Hi,
i tried it with a very simple Script (see below). The results are the same.
'-- ---------------------------------------------------------------------------
'-- Main
'-- ---------------------------------------------------------------------------
WScript.StdOut.Write "scriptRes" & ":" & "Ok" & ":" & "42"
i tried it with a very simple Script (see below). The results are the same.
'-- ---------------------------------------------------------------------------
'-- Main
'-- ---------------------------------------------------------------------------
WScript.StdOut.Write "scriptRes" & ":" & "Ok" & ":" & "42"
-
- Posts: 7
- Joined: Thu Mar 08, 2007 7:49 am
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Actually, I yhink you should use "Active Script" test method with such syntax. Quote from the manual:jensfoeller wrote:WScript.StdOut.Write "scriptRes" & ":" & "Ok" & ":" & "42"
http://www.ks-soft.net/hostmon.eng/mfra ... htm#script
==================
Starting from HostMonitor version 3.40 you can create your own tests using different script languages such as Visual Basic Script or Java Script
==================
If you want to use "Schell Script" test method, you should use the following syntax:
Code: Select all
echo ScriptRes:Ok:42
Max
H'm.. I just tested your script on Windows 2000, XP, 2003 SP1 in application and service mode under local system and admins account.
Everything works fine except the following configuration: Windows 2003 SP1, HostMonitor started as sevice under admins account. So we have reproduced the problem.
Test fails because Windows returns the following error: "Cmd.exe - Application Error. The application failed to initialize properply (0xc00000142). Click on OK to terminated the application."
Did not find anything useful in Microsoft manuals yet. Will continue tomorrow...
Regards
Alex
Everything works fine except the following configuration: Windows 2003 SP1, HostMonitor started as sevice under admins account. So we have reproduced the problem.
Test fails because Windows returns the following error: "Cmd.exe - Application Error. The application failed to initialize properply (0xc00000142). Click on OK to terminated the application."
Did not find anything useful in Microsoft manuals yet. Will continue tomorrow...
Regards
Alex
-
- Posts: 7
- Joined: Thu Mar 08, 2007 7:49 am
We checked Microsoft manuals, did not find any explanation of this problem related to CMD.EXE. What is interesting, we tried different user account (member of administrators group) - it works fine.
So, possible workarounds
a) use different user account (make sure it belongs to administrators).
b) use Active Script, it works fine
c) use Windows 2000 SP4
If you choose a), please restart the service
Regards
Alex
So, possible workarounds
a) use different user account (make sure it belongs to administrators).
b) use Active Script, it works fine
c) use Windows 2000 SP4
If you choose a), please restart the service
Regards
Alex
-
- Posts: 7
- Joined: Thu Mar 08, 2007 7:49 am
Hi,
i changed the test to an ActiveScript.
Works but with a very strange behaviour.
A test of the new Script [Test properties] - [Test] runs fine (expected result, and an expected runtime ~ 5s.
If the test is started from Hostmonitor (background execution) it runs fine (expected results) but with a runtime of ~ 40s.
Any idea?
Btw the script calls an external exe which normaly runs 4-5s.
Regards,
Jens
i changed the test to an ActiveScript.
Works but with a very strange behaviour.
A test of the new Script [Test properties] - [Test] runs fine (expected result, and an expected runtime ~ 5s.
If the test is started from Hostmonitor (background execution) it runs fine (expected results) but with a runtime of ~ 40s.
Any idea?
Btw the script calls an external exe which normaly runs 4-5s.
Regards,
Jens
-
- Posts: 7
- Joined: Thu Mar 08, 2007 7:49 am
I think second phrase is answer to 1st one.If the test is started from Hostmonitor (background execution) it runs fine (expected results) but with a runtime of ~ 40s.
...
I configured 10 tests and it seems, that there is always only one test active (at least the is only one exe active) or the other are waiting for the running test
Some Windows components do not work well in multithreaded environment. To avoid problems HostMonitor executes scripts one by one, this may lead to delayed execution when you are using several Active Script test methods.
Regards
Alex