Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

System.InvalidOperationException from GetComputerInfo component

Created: 17 Dec 2012 | 2 comments

I am using GetComputerInfo component to query servers to check disk space. On various occasions (appears random) the component crashes with the error :-

Execute Time (ms): 115605
System.Exception: exception invoking method ---> System.InvalidOperationException: Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at MonitoringService.Begin()
   --- End of inner exception stack trace ---
   at LogicBase.Framework.DynamicProxy.InvokeMethod(String MethodName, Object[] parameters)
   at LogicBase.Tool.UI.Debugging.DebugEngine.ExecuteMethodThreadStart(Object parameter)

When re-running the Workflow it may complete OK , or stop on a different server. Each time it does this the server is up.

Has anyone experienced this and knows what is the real cause behind it (and how to fix ?)

Comments 2 CommentsJump to latest comment

toomas's picture

From the looks of this error, the response received from the remote computer is unexpected.

If you can predict when this happens, I would try doing some kind of network monitoring (Wireshark, Microsoft Network Monitor) to see what exactly comes back as a response to the request.

kayos99's picture

Hi Toomas,

Im afraid its not predicatbale, its a different server in the list each time that causes the exception, looking at the log its the good old 'Thread was being aborted' thats the main cause of the failure :-

Info,18 December 2012 08:05:31,Current path is
Info,18 December 2012 08:05:32,Exception happened on component execution Get Computer Info (LogicBase.Components.Default.GetComputerInfo)
Info,18 December 2012 08:05:33,Executing Exception Triggers Get Computer Info (LogicBase.Components.Default.GetComputerInfo)
Error,18 December 2012 08:05:33,System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Management.IWbemLocator.ConnectServer_(String strNetworkResource, String strUser, IntPtr strPassword, String strLocale, Int32 lSecurityFlags, String strAuthority, IWbemContext pCtx, IWbemServices& ppNamespace)
   at System.Management.ManagementScope.InitializeGuts(Object o)
   at System.Management.ManagementScope.Initialize()
   at LogicBase.Components.Default.ComputerInfoType..ctor(String host, Boolean useImpersonation, String userName, String password)
   at LogicBase.Components.Default.GetComputerInfo.Run(IData data)
   at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)
   at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)
Debug,18 December 2012 08:05:33,definition to check against ExceptionTriggerComponentID String null allowed? False
Error,18 December 2012 08:05:33,System.Threading.ThreadAbortException: Thread was being aborted.
   at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)
   at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunEngine(List`1 executionQueue)
Error,18 December 2012 08:05:33,System.Exception: Execution Engine Exception  ---> System.Threading.ThreadAbortException: Thread was being aborted.
   at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)
   at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunEngine(List`1 executionQueue)
   --- End of inner exception stack trace ---
   at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunEngine(List`1 executionQueue)
   at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.ExecuteComponent(IData data, IOrchestrationComponent component)
   at LogicBase.Core.Models.Monitoring.MonitoringExecutionEngine.StartInternal(IData data, TestingScenario testingScenario, String testRunId)
Info,18 December 2012 08:06:53,turning off debugger
 

Is this just that the remote machine is taking too long to respond ? (The machines failing are on slightly slower links and are located in India and Malaysia, the server doing the monitoring is Switzerland and another one in the UK)

Is there any way of easily setting a longer timeout on the GetComputerInfo component ?

I will install WireShark on one of these test servers and see if I can find out some more though.

Kind regards,

tim