All content libraries go missing after renewing the custom machine SSL certificate of vCenter Server.
Content library creation fails with the error message:
"com.vmware.vcenter.apigw.security.AuthenticationException: Failed to log into [uri=http://localhost:1080/cls/, sessionMgr=SessionManagerInfo [_sessionMgrSvcId=com.vmware.cis.session, _loginOpId=create, _logoutOpId=delete], ssoDomain=vsphere.local(c4beb1f0-ce40-11e7-bf3a-000c29c2bb9c)]: com.vmware.vapi.std.errors.unauthenticated => {data=<unset>, error_type=UNAUTHENTICATED, messages=[com.vmware.vapi.std.localizable_message => {args=[], default_message=This method requires authentication., localized=<unset>, id=vapi.method.authentication.required, params=<unset>}]}"
/var/log/vmware/content-library/cls.log:Caused by: org.bouncycastle.tls.TlsFatalAlert: certificate_unknown(46)
Caused by: com.vmware.vim.vmomi.client.exception.VlsiCertificateException: Server certificate chain is not trusted and thumbprint doesn't match
Caused by: java.security.cert.CertificateException: Unable to construct a valid chain
Caused by: java.security.cert.CertPathBuilderException: No issuer certificate for certificate in certification path foundAccessing lifecycle manager by navigating to vCenter UI > Menu > Lifecycle Manager fails with an error message: An unexpected error has occurred.
VECS refresh using the following command fails with the error message: /usr/lib/vmware-vmafd/bin/vecs-cli force-refresh
Error: Failed to trigger root cert refresh
vecs-cli failed. Error 11: Possible errors:LDAP error: Administrative limit exceededWin Error: Operation failed with error ERROR_BAD_FORMAT (11)
VMware vCenter Server 8.x
Note: Take a snapshot of the vCenter Server VM before making any changes. Refer: Snapshot Best practices for vCenter Server Virtual Machines.
Identify the missing intermediate and root certificate signing the Machine SSL certificate in VECS store using the following commands:
List the trusted certificates published to the VMware Directory Service: /usr/lib/vmware-vmafd/bin/dir-cli trustedcert list
List the trusted certificates published in VECS using vecs-cli : /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | less
Compare the outputs and identify the missing certificates in VECS. These certificates are seen in the vCenter UI.
Clean up the VECS / VMDIR and publish the required certificates :
Delete all other expired or stale certificates from the VECS and VMDIR by following the steps in KB :Removing CA Certificates from the TRUSTED_ROOTS store in the VMware Endpoint Certificate Store(VECS).
Unpublish the intermediate and root certificates identified in step 1.c from VMDIR:
Export the certificate: /usr/lib/vmware-vmafd/bin/dir-cli trustedcert get --id ################ --login User@vSphere_Domain_Name.local --password <PASSWORD> --outcert /tmp/certificate _name.cer
Unpublish the certificate: /usr/lib/vmware-vmafd/bin/dir-cli trustedcert unpublish --cert /tmp/certificate _name.cer
Publish the missing certificates : /usr/lib/vmware-vmafd/bin/dir-cli trustedcert publish --cert /var/core/certificate_name.cer --login administrator
Refresh the VECS store: /usr/lib/vmware-vmafd/bin/vecs-cli force-refresh