Error: "AuthenticationException" during content library creation due to missing machine SSL signing certificate within VECS store
search cancel

Error: "AuthenticationException" during content library creation due to missing machine SSL signing certificate within VECS store

book

Article ID: 394085

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • 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>}]}"

  • Following errors are observed in /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 found
  • Accessing 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 exceeded
    Win Error: Operation failed with error ERROR_BAD_FORMAT (11)

Environment

VMware vCenter Server 8.x

Cause

  • The root and intermediate CA certificates required to validate the machine SSL certificate exist within the VMware Directory Service (VMDIR), but are missing from the VMware Endpoint Certificate Store (VECS).

Resolution

Note: Take a snapshot of the vCenter Server VM before making any changes. Refer: Snapshot Best practices for vCenter Server Virtual Machines.

  1. Identify the missing intermediate and root certificate signing the Machine SSL certificate in VECS store using the following commands:

    1. List the trusted certificates published to the VMware Directory Service: /usr/lib/vmware-vmafd/bin/dir-cli trustedcert list

    2. List the trusted certificates published in VECS using vecs-cli : /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | less

    3. Compare the outputs and identify the missing certificates in VECS. These certificates are seen in the vCenter UI.

  2. Clean up the VECS / VMDIR and publish the required certificates :

    1. 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). 

    2. Unpublish the intermediate and root certificates identified in step 1.c from VMDIR: 

      1. 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

      2. Unpublish the certificate: /usr/lib/vmware-vmafd/bin/dir-cli trustedcert unpublish --cert /tmp/certificate _name.cer

    3. Publish the missing certificates : /usr/lib/vmware-vmafd/bin/dir-cli trustedcert publish --cert /var/core/certificate_name.cer --login administrator

    4. Refresh the VECS store: /usr/lib/vmware-vmafd/bin/vecs-cli force-refresh