In a VMware Cloud Foundation (VCF) environment, integrated component communication (vCenter, NSX, VxRail) fails after a certificate renewal or replacement. Symptoms include:
{"message":"Identity Internal Server Error","code":"IDENTITY_INTERNAL_SERVER_ERROR","status":500}Connection cannot be established because certificate is not trusted".review" option to attempt to trust the vCenter certificate, the certificate validation fails with error: "Failed to trust Certificate(s). Error while validating certificate"/var/log/vmware/vcf/operationsmanager/operationsmanager.logYYYY-MM-DDTHH:MM:SS DEBUG [vcf_om, 16#####################, ar##] [c.v.v.s. t. DynamicTrustManager, om-exec-7] Error checking certificate chainO=####, L=#####, ST=#####, C=##, CN=<vCenter-FQDN>. for validity.sun. security. validator. ValidatorException: PKIX path building failed: sun. security.provider. certpath. SunCertPathBuilderException: unable to find valid certification path to requested target.This issue occurs when integrated component certificates are updated or regenerated outside of SDDC Manager (out-of-band), causing a mismatch between the certificate presented by the component and the trust store held in the SDDC Manager database.
VcRootCaSync.py script attached to the KB to the /home/vcf directory on the SDDC Manager, and execute the script as the root user.python VcRootCaSync.pyerror state, or the management vCenter Server. (Refer Broadcom KB: Import the vCenter root certificate into the SDDC manager TrustStore for details)# python VcRootCaSync.pyPlease provide SSO administrator user[[email protected]]:Provide password for [email protected]:Available vCenter Servers:[1] ERROR | vcsa1.example.com[2] ACTIVE | vcsa2.example.com
Select a vCenter server by entering the corresponding number: 1 Selected vCenter: vcsa1.example.com
Session token created successfully Root certificate saved to /tmp/root.cer
vCenter vcsa1.example.com Root Certificate Found:-----BEGIN CERTIFICATE-----M#############################################b
-----END CERTIFICATE-----
vCenter Root certificate added to SDDC Manager trust stores. Refreshing certificate store Deleting root certificate from temp
active./opt/vmware/vcf/operationsmanager/scripts/cli/sddcmanager_restart_services.sh, or restart the SDDC Manager VM.vi /tmp/certificate.cerpass=$(cat /etc/vmware/vcf/commonsvcs/trusted_certificates.key)keytool -importcert -alias <aliasname> -file <certificate file> -keystore /etc/vmware/vcf/commonsvcs/trusted_certificates.store -storepass <trust store key>keytool -importcert -alias new_mgmt_root -file /tmp/certificate.cer -keystore /etc/vmware/vcf/commonsvcs/trusted_certificates.store -storepass $passkeytool -importcert -alias <aliasname> -file <certificate file> -keystore /etc/alternatives/jre/lib/security/cacerts --storepass changeitkeytool -importcert -alias new_mgmt_certificate -file /tmp/certificate.cer -keystore /etc/alternatives/jre/lib/security/cacerts --storepass changeitkeytool -list -v -keystore /etc/vmware/vcf/commonsvcs/trusted_certificates.store -storepass $pass | lesscurl -X POST localhost/appliancemanager/trustedCertificates/refreshawk 'NF {sub(//, ""); printf "%s\\n",$0;}' /tmp/certificate.crt
# awk 'NF {sub(//, ""); printf "%s\\n",$0;}' /tmp/certificate.crt-----BEGIN CERTIFICATE-----<certicate..............>-----END CERTIFICATE-----\ncertificate and certificateUsageType.API Explorer > APIs for managing Trusted Certificates > POSTTRUSTED_FOR_OUTBOUND" into the certificateUsageType field.Execute. Steps to extract certificate for vCenter Server :
/usr/lib/vmware-vmca/bin/certool --getrootca --cert=/tmp/root.cer/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store trusted_rootsvi /tmp/root.cerSteps to extract certificate for NSX Manager :
/tmp directory on the SDDC Manager Appliance.Note: If the same CA is signing all three NSX manager nodes and VIP, only one Root certificate file is needed.
Steps to extract certificate for VxRAIL Manager :
/tmp directory on the SDDC Manager Appliance.