When applying licenses to vCenter server from VCF Operations we see below errors:
In /var/log/vmware/cis-license/license.log we see below errors:
ERROR CISLicense 49 [vc@4413 threadName="vmomi-executor-1" logger="vim.vmomi.server.impl.SoapBindingImpl"] Method 'queryAssignedLicenses' completed with undeclared fault of type 'java.lang.IllegalArgumentException'java.lang.IllegalArgumentException: Invalid productRestrictionsData or entitlementLicenseDetailsData are null.
ERROR CISLicense 49 [vc@4413 threadName="vmomi-executor-1" logger="vim.vmomi.server.impl.SoapBindingImpl"] Method 'queryAssignedLicenses' completed with undeclared fault of type 'java.lang.IllegalArgumentException'java.lang.IllegalArgumentException: Invalid productRestrictionsData or entitlementLicenseDetailsData are null.
VCF Operations 9.1.x
On the vcenter there was stale license entity for a vSphere+ license:
# LicenseEntity_#####-#####-#####-####-####, LicenseService, services, vsphere.local dn: cn=LicenseEntity_#####-#####-#####-####-####,cn=LicenseService,cn =services,dc=vsphere,dc=local cn: LicenseEntity_#####-#####-#####-####-####
vmwLicSvcLicenseId: #####-#####-#####-####-#### vmwLicSvcLicenseName: vSphere+
Which was causing operations - getLicenses, searchLicenseUtilizations, queryAssignedLicenses to fail with:
java.lang.IllegalArgumentException: Invalid productRestrictionsData or entitlementLicenseDetailsData are null.
Follow the steps mentioned in the How to remove a License Manually from vCenter using ldapmodify KB article to clear the stale vSphere + license entry.
Note: Please ensure that there is a valid snapshot of vcenter server before proceeding.
/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))" -W/opt/likewise/bin/ldapmodify -h localhost -D "cn=administrator,cn=users,dc=vsphere,dc=local" -W << EOF
<dn: cn=LicenseEntity_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX,cn=LicenseService,cn=services,dc=vsphere,dc=local>
changetype: delete
EOFservice-control --restart cis-license