Licenses are not being applied to vCenter after upgrading vCenter to 9.1.x
search cancel

Licenses are not being applied to vCenter after upgrading vCenter to 9.1.x

book

Article ID: 454287

calendar_today

Updated On:

Products

VCF Operations

Issue/Introduction

When applying licenses to vCenter server from VCF Operations we see below errors:

  • Licenses could not be synchronized with vcenters .
  • Licenses could not be assigned to vCenters.

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.

 

Environment

VCF Operations 9.1.x

Cause

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. 

Resolution

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.

  • In step 4 of the KB, to simplify the output and get only LicenseEntity details from use the below command instead:
    /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
  • In step 4 we need to replace the just line starting with dn: from the output of step 3
    /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
    EOF
  • After steps 4 a restart of license service on vCenter is required using below command
    service-control --restart cis-license
  • Retry the license assignment from VCF Operations.