This is expected behavior with NSX.
Workaround:
The following needs to be done whenever certificates are changed on the controller with a not well known CA:
1. Export the root CA certificate and the intermediate certificate from the ALB and upload them onto the NSX manager with SCP.
a. From ALB UI: Templates > Security > SSL/TLS Certificates
b. Root/Intermediate CA > export > export to clipboard
c. Save to a .pem file in a text editor
2. Run the below commands as root from the NSX-T Manager CLI where <ca-file-path> is to location of the certificate uploaded in step 1:
a. keytool -importcert -alias startssl -keystore /usr/lib/jvm/jre/lib/security/cacerts -storepass changeit -file <ca-file-path>Trust the certificate by typing yes:
b.
Trust this certificate? [no]: yes
If the above path is not found, please use the command below:keytool -importcert -alias startssl -keystore /usr/java/jre/lib/security/cacerts -storepass changeit -file <ca-file-path>
c. sudo cp <ca-file-path> /usr/local/share/ca-certificates/
d. sudo update-ca-certificates
e. service proton restart
3. Log into the NSX UI: System > Appliances, and confirm that ALB is showing a stable cluster.
Note:
The certificate has to be imported on all three Managers.
When attempting to import a certificate into the cacerts keystore, if you encounter the following error:
keytool error: java.lang.Exception: Certificate not imported, alias <startssl> already exists
This error occurs because a certificate with the alias <startssl> already exists in the cacerts keystore. Since each alias must be unique within the keystore,
you cannot import a new certificate using an existing alias.
Verification:
To check whether the alias already exists in the cacerts keystore, use the following keytool commands:
-List all certificates and search for the alias:
keytool -list -v -keystore /usr/java/jre/lib/security/cacerts -storepass changeit | grep -i alias
-Check details of a specific alias:
keytool -list -v -keystore /usr/java/jre/lib/security/cacerts -alias startssl
Resolution:
To resolve this error, you should use a different alias when importing the certificate. Follow these steps:
1.Backup the existing cacerts keystore:
cd /usr/java/jre/lib/security/
cp -p cacerts cacerts_backup
2.Import the certificate with a new alias:
keytool -importcert -alias startssl1 -keystore /usr/java/jre/lib/security/cacerts -storepass changeit -file <ca-file-path>
Replace <ca-file-path> with the path to your certificate file.
Note:
The alias is a unique identifier for each certificate within the keystore. Using a different alias ensures that there are no conflicts and allows the new certificate
to be imported successfully.
If you are contacting Broadcom support about this issue, please provide the following:
Handling Log Bundles for offline review with Broadcom support