One or more vCenter instances are not connected to a license server. To avoid service interruption, verify that the vCenter instance is connected to a license server./var/log/vmware/cis-license/license.log contains java.lang.NullPointerException errors similar to the following:#### ERROR ManagementAdapter #### [ops@#### threadName="vcf-licensing-assign-####"] - Error while assigning entitlement to VC: #### at [VC-FQDN] java.lang.NullPointerException
YYYY-MM-DDTHH:MM:SS.815Z ERROR ManagementAdapter ##### [ops@#### threadId="######" threadName="vcf-licensing-assign-####" instanceId="##"] [(##) com.vmware.adapter.management.components.licensing.vcf.H.A] - Error while assigning entitlement to VC: #########-####-####-####-############### at [VC-FQDN] java.lang.NullPointerException: Cannot invoke "com.vmware.vapi.bindings.Structure._hasTypeNameOf(java.lang.Class)" because "<local3>" is null
YYYY-MM-DDTHH:MM:SS.274Z INFO vcf-licensing-plugin ##### [ops@#### threadId="#####" threadName="pool-40-thread-4" operationId=""] [com.vmware.vrops.licensing.vcf.helper.EntitlementAutomaticReassignmentService.runAutomaticReassign] - Checking whether allocations [#########-####-####-####-###############, #########-####-####-####-###############] should be migrated.
YYYY-MM-DDTHH:MM:SS.279Z INFO vcf-licensing-plugin ##### [ops@#### threadId="#####" threadName="pool-40-thread-4" operationId=""] [com.vmware.vrops.licensing.vcf.helper.EntitlementAutomaticReassignmentService.runAutomaticReassign] - Starting migration for allocations [#########-####-####-####-###############, #########-####-####-####-###############]
YYYY-MM-DDTHH:MM:SS.280Z INFO vcf-licensing-plugin ##### [ops@#### threadId="#####" threadName="pool-40-thread-4" operationId=""] [com.vmware.vrops.licensing.vcf.helper.EntitlementAutomaticReassignmentService.runAutomaticReassign] - Reassigning entitlements [#########-####-####-####-###############].
This issue occurs when a stale LicenseEntity exists in the vCenter LDAP database, often due to an upgrade path where a vSAN (TiB) license was assigned without an active vSAN cluster, or when synchronization fails between the new 9.1 License Server and the vCenter instance.
To manually clear the stale license entities, follow these steps:
Create an offline snapshot or backup of the vCenter Server Appliance.
Open an SSH session to the vCenter Server Appliance and log in as the root user.
Execute the following ldapsearch command to list the LicenseEntity and AssetEntity objects. Enter the LDAP password for [email protected] when prompted:/opt/likewise/bin/ldapsearch -b "cn=LicenseService,cn=Services,dc=vsphere,dc=local" -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -s sub "(|(objectclass=vmwLicSvcAssetEntity)(objectclass=vmwLicSvcLicenseEntity))" cn vmwLicSvcAssetName vmwLicSvcAssetProductName vmwLicSvcAssetProductVersion vmwLicSvcAssetLicenseId vmwLicSvcLicenseId vmwLicSvcLicenseName vmwLicSvcLicenseSerialKeys -W
LicenseEntity that needs to be removed (e.g., the stale VMware vSAN license). Note the full dn (Distinguished Name) string. Example: dn: cn=LicenseEntity_#######-####-####-####-############,cn=LicenseService,cn=services,dc=vsphere,dc=localcn: LicenseEntity_#######-####-####-####-############vmwLicSvcLicenseName: 'VMware vSAN (TiB)'vmwLicSvcLicenseSerialKeys: #######-####-####-####-############ldapmodify command, replacing the dn line with the exact value retrieved in Step 4. Paste the block as a whole into the SSH session: /opt/likewise/bin/ldapmodify -h localhost -D "cn=administrator,cn=users,dc=vsphere,dc=local" -W << EOFdn: cn=LicenseEntity_#######-####-####-####-############,cn=LicenseService,cn=services,dc=vsphere,dc=localchangetype: deleteEOF
Example Output:Enter LDAP Password:deleting entry "cn=LicenseEntity_#######-####-####-####-############cn=LicenseService,cn=services,dc=vsphere,dc=local"Verify the LicenseEntity was successfully removed by running the ldapsearch command from Step 3 again.
vmware-cis-license service.service-control --restart vmware-cis-licenseCAUTION: This article outlines how to remove a vCenter Server License. Do not remove a valid vCenter Server License that is currently in use. Only remove the targeted stale or expired LicenseEntity.
This article provides steps to remove a LicenseEntity. Removing the AssetEntity is not required or recommended.
Any licensed assets that were using the removed license will become unlicensed and must be relicensed accordingly.
For further reference on manual license removal, see: How to remove a License Manually from vCenter using ldapmodify.