VMware Cloud Community
joshferrellatsa
Contributor
Contributor

Error in deserializing body of reply message for operation 'ReadNextEvents'

I ran across a VIEvent problem I've seen others have and wanted to share what I found. I poll 32 vCenters for VM Migration events which are written to a database we use for troubleshooting application errors. I like several others I found on the Internet started receiving the deserializing error you see in the subject line while enumerating through the event pages and sometimes when initially creating the eventCollector.

I finally started sniffing the traffic and found the response for event types matching 'HostSubSpecificationUpdateEvent' was the cause of the problem. It seems the event has a hostSubSpec property sent as binary data. It's my belief that PowerCLI is trying to then convert this and add it as an XML element but fails.

We can circumvent the issue by specifying 'DrsVmMigratedEvent' as the EventTypeId in the EventFilterSpec but if you have multiple event types you're querying for it may be problematic. I thought I'd share.

4 Replies
LucD
Leadership
Leadership

That is a great find, and explains a lot (see also issue Docker Start failed on nightlys build).

For what it's worth, I created PowerCLI Idea 118.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

joshferrellatsa
Contributor
Contributor

For those searching Google I thought I’d add you’re likely to see this error if the latestpages returned during collector creation contains the same event type.

Error in deserializing body of reply message for operation 'RetrieveProperties’

0 Kudos
joshferrellatsa
Contributor
Contributor

Thanks, I would have settled for API documentation that mentioned you could use comma separated strings for multiple EventTypeIds in the EventFilterSpec. That could just be me being unfamiliar with XML though.

0 Kudos
LucD
Leadership
Leadership

With 1400+ types of events that might be cumbersome :smileygrin:

See my Event-O-Matic for a list


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos