Symptoms:
There are multiple potential causes for this issue, but the most common are:
A fix for PEM files with DOS-style newlines was made in NSX-T 4.1.1.
Workaround:
**It is recommended that backups are confirmed to be in place before making any changes**
Option 1) If the NSX-T Manager UI is not accessible and the API is not accessible for NSX-T Manager cluster then perform the below workaround:
Step 1 - Validate if the pem files are valid using below command if any one of the file has problem move to step 2:
openssl x509 -noout -text -in /home/secureall/secureall/.store/.tomcat_cert.pem
openssl x509 -noout -text -in /home/secureall/secureall/.store/.vip_cert.pem
Step 2 - Make a copy of the files ".tomcat_cert.pem" and ".vip_cert.pem"
cp /home/secureall/secureall/.store/.tomcat_cert.pem /tmp/.tomcat_cert.pem
cp /home/secureall/secureall/.store/.vip_cert.pem /tmp/.vip_cert.pem
Step 3 - Take a copy of the invalid pem files and run the following command from a helper Linux machine using "dos2unix", else rectify the issue manually if the error is noticeable:
dos2unix .tomcat_cert.pem
dos2unix .vip_cert.pem
Step 4 - Replace the rectified ".tomcat_cert.pem" and ".vip_cert.pem" at the path "/home/secureall/secureall/.store/"
Step 5 - Restart http service
restart service http
Option 2) If the NSX-T Manager UI is accessible and the API is accessible for NSX-T Manager cluster then perform the below workaround:
Step 1 - Re-import the CA-signed certificate.
Step 2 - Determine the node IDs of the three manager nodes.
Step 3 - Apply the new certificate to the manager nodes and VIP.
curl -k -u admin -H "Content-Type: application/json" -X POST 'https://<nsx-mgr>/api/v1/trust-management/certificates/<ca-certificate-id>?action=apply_certificate&service_type=API&node_id=<nsx-mgr1-node_id>'
curl -k -u admin -H "Content-Type: application/json" -X POST 'https://<nsx-mgr>/api/v1/trust-management/certificates/<ca-certificate-id>?action=apply_certificate&service_type=API&node_id=<nsx-mgr2-node_id>'
curl -k -u admin -H "Content-Type: application/json" -X POST 'https://<nsx-mgr>/api/v1/trust-management/certificates/<ca-certificate-id>?action=apply_certificate&service_type=API&node_id=<nsx-mgr3-node_id>'
curl -k -u admin -H "Content-Type: application/json" -X POST 'https://<nsx-mgr>/api/v1/trust-management/certificates/<ca-certificate-id>?action=apply_certificate&service_type=MGMT_CLUSTER'
Step 4 - Restart the reverse proxy service on each manager node.
Once the correct certificate has been applied, you can delete the bad certificate from the System -> Certificates page in the NSX Manager UI.