Configuring a VM for replication fails with the error "invocation failed with "com.vmware.vim.vmomi.core.exception.UnmarshallException: Unexpected element 'html'"
search cancel

Configuring a VM for replication fails with the error "invocation failed with "com.vmware.vim.vmomi.core.exception.UnmarshallException: Unexpected element 'html'"

book

Article ID: 421343

calendar_today

Updated On:

Products

VMware vCenter Server VMware Live Recovery

Issue/Introduction

  • Reconfiguring a VM via VMware Live Recovery UI, may report the below error

A generic error occurred in the vSphere Replication Management Server. Exception details: 'https://<vCenter_FQDN>:443/invsvc/vmomi/sdk/ invocation failed with "com.vmware.vim.vmomi.core.exception.UnmarshallException: Unexpected element 'html'. Expected element is '{http://schemas.xmlsoap.org/soap/envelope/}Envelope'"'.

  • Live Recovery Server - /opt/vmware/hms/logs/hms.log

    YYYY-MM-DDTHH:MM:SS ERROR com.vmware.hms.job [hms-main-thread-150] (..job.impl.PrimaryVc2VcConfigureReplicationWorkflow) [operationID=<OPID>-HMS-555,sessionID=session_id, task=HTID-<TASK ID>] | Failed remote replication configuration
    com.vmware.vim.binding.hms.fault.HmsMethodFault: A generic error occurred in the vSphere Replication Management Server. Exception details: 'https://<vCenter_Server_FQDN>:443/invsvc/vmomi/sdk/ invocation failed with "com.vmware.vim.vmomi.core.exception.UnmarshallException: Unexpected element 'html'. Expected element is '{http://schemas.xmlsoap.org/soap/envelope/}Envelope'"'.
            at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source) ~[?:?]
            at java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) ~[?:?]
            at java.lang.reflect.ReflectAccess.newInstance(Unknown Source) ~[?:?]
            at jdk.internal.reflect.ReflectionFactory.newInstance(Unknown Source) ~[?:?]
            at java.lang.Class.newInstance(Unknown Source) ~[?:?]

  • VM reporting the error has a vSphere Tag assigned
  • vCenter Server - /var/log/vmware/vpxd-svcs/vpxd-svcs.log

    YYYY-MM-DDTHH:MM:SS [dataservice-6 [] WARN  com.vmware.cis.authorization.impl.AclPrivilegeValidator  opId=<OPID>-HMS-555] User VSPHERE.LOCAL\com.vmware.vr-sa-solution-user does not have privileges [System.Read] on object urn%3Avmomi%3AInventoryServiceTag%3A<Tag_ID>%3AGLOBAL
    YYYY-MM-DDTHH:MM:SS [completion-step-6 [] ERROR com.vmware.vim.vmomi.server.http.impl.CompletionContinuerTask  opId=<OPID>-HMS-555] Failed to serialize response
    com.vmware.vim.binding.vmodl.fault.SystemError: Failed to serialize response
            at com.vmware.vim.vmomi.server.exception.ExceptionUtil.buildFaultForInternalException(ExceptionUtil.java:22) ~[vlsi-server.jar:?]
            at com.vmware.vim.vmomi.server.http.impl.CompletionContinuerTask.complete(CompletionContinuerTask.java:102) [vlsi-server.jar:?]

    Caused by: com.vmware.vim.vmomi.core.exception.MarshallException: Unable to append text element <tag name with invalid character>
            at com.vmware.vim.vmomi.core.soap.impl.XmlStreamWriterOutputHandler.writeCharacters(XmlStreamWriterOutputHandler.java:82) ~[vlsi-core.jar:?]
            at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalString(MarshallerImpl.java:685) ~[vlsi-core.jar:?]

            ... 8 more
    Caused by: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0x7) in text to output (in xml 1.1, could output as a character entity)
            at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:458) ~[woodstox-core-asl-4.4.1.jar:4.4.1]
            at com.vmware.vim.vmomi.core.soap.impl.XmlStreamWriterOutputHandler.writeCharacters(XmlStreamWriterOutputHandler.java:80) ~[vlsi-core.jar:?]

     

Cause

The Tag associated with the VM includes invalid character

Resolution

Validate the tag association

  1. Login to vSphere Client
  2. Check the VMs associated with the tag. Refer to  Reviewing and managing tags and tag association

Remove the tag with invalid characters

  1. Login to vCenter Server using vSphere Client
  2. From the vSphere Client Home menu, click Tags & Custom Attributes -> Click Tags.
  3. Select the tag reported in the logs and click Delete.
  4. To confirm the operation, click Delete.