vCenter patching fails with the error "Invalid Type, Expected String, Instead got None Type"
search cancel

vCenter patching fails with the error "Invalid Type, Expected String, Instead got None Type"

book

Article ID: 378081

calendar_today

Updated On:

Products

VMware vCenter Server 7.0

Issue/Introduction

  • Below error in the VAMI page during the patch process: 


  • Checking Patchrunner.log under may show similar entries:

    var/log/vmware/applmgmt/PatchRunner.log
    
    YYYY-MM-SS HH:MM:SS vmidentity:Contract INFO vmidentity Failed to register Active Directory Service with Lookup Service.
    YYYY-MM-SS HH:MM:SS vmidentity:Contract ERROR vmware_b2b.patching.executor.hook_executor Patch hook 'vmidentity:Contract' failed.
    Traceback (most recent call last):
      File "/storage/updatemgr/software-updateeb91vwh2/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor.py", line 74, in executeHook
        executionResult = systemExtension(args)
      File "/storage/updatemgr/software-updateeb91vwh2/stage/scripts/patches/libs/sdk/extensions.py", line 106, in __call__
        result = self.extension(*args)
      File "/storage/updatemgr/software-updateeb91vwh2/stage/scripts/patches/libs/sdk/extensions.py", line 123, in _func
        return func(*args)
      File "/storage/updatemgr/software-updateeb91vwh2/stage/scripts/patches/payload/components-script/vmidentity/__init__.py", line 287, in contract
        raise e
      File "/storage/updatemgr/software-updateeb91vwh2/stage/scripts/patches/payload/components-script/vmidentity/__init__.py", line 283, in contract
        registerActiveDirectoryServiceWithLookupService()
      File "/storage/updatemgr/software-updateeb91vwh2/stage/scripts/patches/payload/components-script/vmidentity/__init__.py", line 234, in registerActiveDirectoryServiceWithLookupService
        raise e
      File "/storage/updatemgr/software-updateeb91vwh2/stage/scripts/patches/payload/components-script/vmidentity/__init__.py", line 231, in registerActiveDirectoryServiceWithLookupService
        dynVars=dynVars)
      File "/usr/lib/vmware-cm/bin/cloudvmcisreg.py", line 714, in cloudvm_sso_cm_register
        serviceId = do_lsauthz_operation(cisreg_opts_dict)
      File "/usr/lib/vmware/site-packages/cis/cisreglib.py", line 1185, in do_lsauthz_operation
        ls_obj.reregister_service(svc_id, svc_set_spec)
      File "/usr/lib/vmware/site-packages/cis/cisreglib.py", line 348, in add_securityctx_to_requests
        return req_method(self, *args, **kargs)
      File "/usr/lib/vmware/site-packages/cis/cisreglib.py", line 364, in reregister_service
        self.service_content.serviceRegistration.Set(svc_id, svc_set_spec)
      File "/usr/lib/vmware/site-packages/pyVmomi/VmomiSupport.py", line 595, in <lambda>
        self.f(*(self.args + (obj,) + args), **kwargs)
      File "/usr/lib/vmware/site-packages/pyVmomi/VmomiSupport.py", line 385, in _InvokeMethod
        return self._stub.InvokeMethod(self, info, args)
      File "/usr/lib/vmware/site-packages/pyVmomi/SoapAdapter.py", line 1570, in InvokeMethod
        raise obj  # pylint: disable-msg=E0702
    pyVmomi.VmomiSupport.lookup.fault.EntryNotFoundFault: (lookup.fault.EntryNotFoundFault) {
       dynamicType = <unset>,
       dynamicProperty = (vmodl.DynamicProperty) [],
       msg = '',
       faultCause = <unset>,
       faultMessage = (vmodl.LocalizableMessage) [],
       errorMessage = 'Entry with name serviceId: 35f2df1e-5c65-####-####-caa2def97831 not found.',
       name = 'serviceId: 35f2df1e-5c65-####-####-caa2def97831'
    }
    YYYY-MM-SS HH:MM:SSZ WARNING root stopping status aggregation...
    YYYY-MM-SS HH:MM:SSZ ERROR __main__ Patch vCSA failed

Environment

VMware vCenter Server 7.x

Cause

The vCenter patch failed due to a duplicate service registration issue.

Specifically, there were multiple registrations for the Active Directory (AD) service, and the current service registration did not match the expected AD service registration ID found during the patch process.

Steps to validate Duplicate Service Registration:

Prerequisites:

  • Download lsdoctor.py to the vCenter Server, following KB:  Using the 'lsdoctor' Tool.

  • Ensure SSH access is enabled on the vCenter Server.

  • Important: Take powered-off snapshots of the vCenter Server before making any changes, especially in environments using Linked Mode.

Connect to vCenter via SSH and navigate to the directory where lsdoctor.py is located.

Run the lsdoctor tool in check mode to identify duplicate service registrations:

python lsdoctor.py -l 

Look for output indicating duplicate registrations for the Active Directory service. It will appear similar to:

"Problems Detected": {
  "Duplicates Found": {
    "Description": "Duplicate Endpoints Detected",
    "Duplicates by Node ID": {
      "b2d6f63e-####-####-####-fca432019134": {
        "activedirectory": [
          "35f2df1e-5c65-####-####-caa2def97831",
          "53b91be9-1e00-####-####-2825dde405c0",
        ]
      }
    },
    "Recommended Action": "Ignore if this is the PSC HA VIP. Otherwise, you must unregister the extra endpoints.",
    "Severity": "High"
  }
}

Resolution

To resolve the issue of duplicate Active Directory service registrations in vCenter, use the lsdoctor tool, available in the following knowledge base article: Using the 'lsdoctor' Tool

Steps:

Run the lsdoctor tool in rebuild mode to correct the duplicate service registration:

python lsdoctor.py -r

When prompted, choose option 3 to replace an individual service:

        ========================

        0.  Exit
        1.  Generate a template.
        2.  Replace all services with new services.
        3.  Replace individual service.
        4.  Restore services from backup file.

        ========================

Please select an action: 3

From the list of services, select the one corresponding to activedirectory. This is typically option number 6, but verify it in the output:

[0] topologysvc
[1] certificatemanagement
...
[6] activedirectory
...
Select number: 6

 

After the rebuild completes, confirm that the service has been successfully registered. You should see output like:

YYYY-MM-SSTHH:MM:SS INFO unregisterServiceType: Unregistered 35f2df1e-5c65-####-####-caa2def97831
YYYY-MM-SSTHH:MM:SS INFO rebuild_single_service: Registered service: activedirectory with service ID: 53b91be9-1e00-####-####-2825dde405c0

Exit the application using option 0 and retry the update. 

        ========================

        0.  Exit
        1.  Generate a template.
        2.  Replace all services with new services.
        3.  Replace individual service.
        4.  Restore services from backup file.

        ========================

Please select an action: 0
YYYY-MM-SSTHH:MM:SS INFO menu: Exiting...

Additional Information

If the lsdoctor tool indicates that the required templates are missing and presents a list of available templates, select the version that most closely matches the build number of your vCenter Server.

For further assistance, contact Broadcom Support and reference this Knowledge Base article.