"Replace cert failed: Exception found(Failed to notify applmgmt on http://localhost:1080/api/appliance/certificates/notification, on all retries)var/log/vmware/certificatemanagement/certificatemanagement-svcs.log, you may find entries similar to:[tomcat-exec-1 [] ERROR com.vmware.certificatemanagement.impl.tls.TlsReplace opId=] TLS Certificate replacement failed : Failed to notify APPLMGMT on http://localhost:1080/api/appliance/certificates/notification, on all retries
var/log/vmware/applmgmt/applmgmt.log, you may find entries similar to:INFO:vmware.appliance.vapi.auth:Authorization request for service_id: com.vmware.appliance.certificates.notification, operation_id: notifyERROR:root:Unable to authorize request with authz client: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unsuitable certificate purpose (_ssl.c:1007)
/usr/lib/vmware-vmca/bin/certificate-manager) utility fails with INVALID_KEY errorERROR certificate-manager ERROR:: INVALID_KEY, the private key doesnot match the certificate. Please provide a valid certificate and Key pair.ERROR certificate-manager Error while replacing Machine SSL Cert, please see /var/log/vmware/vmcad/certificate-manager.log for more information.
"Operation failed: Unable to create entry _MACHINE_CERT in the VECS store MACHINE_SSL_CERT"This issue occurs due to any of the following reasons:
Validating Certificate and Private key:
openssl x509 -noout -modulus -in custom.crt | openssl sha256
openssl rsa -noout -modulus -in private.key | openssl sha256
Note: custom.crt is the custom vCenter certificate and private.key is the private key. If the CSR is generated from the vSphere client, private key can be obtained using /usr/lib/vmware-vmafd/bin/vecs-cli entry getkey --store MACHINE_SSL_CERT --alias __MACHINE_CSR
Note: If the output of above commands do not match, the custom certificate is not created from the CSR generated on the vCenter. To resolve this issue, generate a new CSR from the vCenter and obtain a certification from the CA using the generated CSR.
Validating Extended Key Usage Extensions:
openssl x509 -in custom.crt -text -noout
Note: If the Extended Key Usage section contains the above mentioned entries, the certificate needs to be recreated by the CA.
If Microsoft Certificate authority is being used refer Creating a Microsoft Certificate Authority Template for SSL certificate creation in vSphere