VMware {code} Community
tos2k
Expert
Expert

Exception on RetrieveProperties (vCenter)

Has any of you experienced that kind of exception?


System.InvalidOperationException: There is an error in XML document (7, 5802765). ---> System.IO.IOException: Unable to read data from the transport connection: The connection was closed.
   at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
   at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
   at System.Xml.XmlTextReaderImpl.ReadData()
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
   at System.Xml.XmlTextReaderImpl.ParseText()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at System.Xml.XmlReader.ReadElementString()
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read296_ElementDescription(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read1387_HostNumericSensorInfo(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read1388_HostSystemHealthInfo(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read1389_HealthSystemRuntime(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read1394_HostRuntimeInfo(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read1396_HostListSummary(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read1_Object(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read4_DynamicProperty(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read1801_ObjectContent(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVimService.Read3168_RetrievePropertiesResponse()
   at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer1789.Deserialize(XmlSerializationReader reader)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
   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 VimApi.VimService.RetrieveProperties(ManagedObjectReference _this, PropertyFilterSpec[] specSet)

any suggestions?

Tos2k

0 Kudos
4 Replies
tmilner
Enthusiast
Enthusiast

I have seen this periodically where the XML gets truncated. I dumbed the XML (after SSL decryption) when this has occurred and its clear that the XML is truncated at an arbitrary spot. Reconnecting/re-transmitting the request seems to work since this happens only rarely (in my experience).

Tom

0 Kudos
tos2k
Expert
Expert

Hi!

Unfortunately reconnecting does not help me.

I have several vCenter instances, and things work fine for all instances, except one: The vCenter instance with a special setup, a configuration that we have been using for a long time.

I am assuming that the behaviour comes from the data in the database for that specific vCenter istance.

Anyway, nice to hear that I am not the only one experiencing that - I did not find any hints on the internet else...

Where exactly come the xml files in play? Basically I think it should not be necessary to build any XML files, to create a dynamic webbage based on data from a database.

Are there eny tools that can check consistency of a vCenter database, according to generating these XML files properly?

Tos2k

0 Kudos
tmilner
Enthusiast
Enthusiast

The Soap packets are transmitted in encrypted XML, which in normal usage we would have no interest in seeing. But occasionally I've run across Soap issues (like yours) or errors where more details could be found in the XML and having the XML was helpful. Since I'm using .NET, Microsoft has a backdoor that allows you to trap the outgoing Soap XML before it gets encrypted, and on return just after decryption. This "backdoor" is described at: http://msdn.microsoft.com/en-us/library/esw638yk%28VS.71%29.aspx

Tom

0 Kudos
tos2k
Expert
Expert

I have my development environment (windows) running in a VM on Mac Fusion.

That error comes up in some cases when my development VM was suspended.

Recompile resolves the issue in that case.

Tos2k

0 Kudos