The "CA SAM Discovery" tab within the "Common Asset Viewer" is showing error when trying to open.
Error: There was an error when attempting to connect SAM web service. Please see the log file for more details.
One of the causes for the above error can be that CA SAM has been configured to run in SSL (https) and the website certificate is not being recognized by AMS Tomcat service. The following error may be logged in AMS.log:
04/02 12:12:08.085[http-8443-6] DEBUG HTTPSender 146 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: java.security.cert.CertPathBuilderException: Could not build a validated path
The solution for the above problem requires some manual steps to be executed from the server where AMS is installed.
- Stop AMS service;
- Browse CA SAM web service site using https in IE browser (you can find the URL in APM > Administration > System Configuration > Software Asset Management > CA SAM Web Service WSDL Url);
- Click on the website certificate which is located in IE;
- Go to detail tab and click on 'Copy to file' button;
- Save the file in local box using default parameters;
- Run the below command via command prompt to add the certificate in java security:
keytool -importcert -file "filePath" -keystore "JRE_PATH\lib\security\cacerts"
keytool -importcert -file "C:\Users\Administrator\Desktop \CASAM.cer" -keystore "C:\Program Files (x86)\Java\jdk1.7.0_45\jre\lib\security\cacerts"
- It will ask you for cacerts password, the default password is "changeit".
- If above steps are successful then start the AMS service.