When attempting to reconnect an ESXi host back to vCenter Server, the following error may occur during license assignment operations: “Make sure the License Service is available. Cannot complete the license assignment operation.”
VMware vCenter Server 7.x
VMware vCenter Server 8.x
This issue arises when the necessary steps to remove stale license entries tied to the vCenter's LDU ID are omitted during corrective actions involving license services.
The failure to clean up old asset entries associated with the vCenter server's License Service results in conflicts, causing license assignment errors.
vmdird.log
YYYY-MM-DDTHH:MM:SS:t@139891144865344:ERROR: VmDirSendLdapResult: Request (Add), Error (LDAP_ALREADY_EXISTS(68)), Message (BEEntryAdd (9706)((MDB_KEYEXIST: Key/data pair already exists)(cn=assetentity_yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy,cn=licenseservice,cn=services,dc=vsphere,dc=local))), (0) socket (127.0.0.1)
YYYY-MM-DDTHH:MM:SS:t@139891144865344:ERROR: VmDirSendLdapResult: Request (Add), Error (LDAP_ALREADY_EXISTS(68)), Message (BEEntryAdd (9706)((MDB_KEYEXIST: Key/data pair already exists)(cn=assetentity_yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy,cn=licenseservice,cn=services,dc=vsphere,dc=local))), (0) socket (127.0.0.1)
YYYY-MM-DDTHH:MM:SS:t@139891144865344:ERROR: VmDirSendLdapResult: Request (Add), Error (LDAP_ALREADY_EXISTS(68)), Message (BEEntryAdd (9706)((MDB_KEYEXIST: Key/data pair already exists)(cn=assetentity_yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy,cn=licenseservice,cn=services,dc=vsphere,dc=local))), (0) socket (127.0.0.1)
vpxd_firstboot.py2023-05-31T10:20:33.000Z Upgrade: Using old VC GUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
2023-05-31T10:20:35.297Z Service ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
2023-05-31T10:20:36.797Z Successfully performed tryupgrade operation for service XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Name: AboutInfo.vpx.name
Description: AboutInfo.vpx.name
Service Product: com.vmware.cis
Service Type: vcenterserver
Service ID: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
Site ID: houstondr
Node ID: 7c26c7c2-c49e-11e3-9f13-005056a33693
Owner ID: [email protected]
Version: 8.0
Endpoints:
Type: com.vmware.cdc.provider
Protocol: vmomi
URL: https://vCenter-FQDN:443/sdk
Use the following command to retrieve the LDU ID:
/usr/lib/vmware-vmafd/bin/vmafd-cli get-ldu --server-name localhost
Example output:
yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
Run the LDAP delete command to remove the conflicting entry:
/opt/likewise/bin/ldapdelete -H ldap://localhost -D "cn=administrator,cn=users,dc=vsphere,dc=local" -w "<password>" "cn=AssetEntity_yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy,cn=LicenseService,cn=Services,dc=vsphere,dc=local"
Note: Replace dc=vsphere,dc=local with your SSO domain.
Reboot vCenter Server
After reboot, reassign the proper vCenter license.