Troubleshooting PKIX path building failure in Anypoint Studio
In this blog post, we will see how to resolve the PKIX path building failed error when we install the Anypoint Studio and try to run a project for the first time. This is a common issue that happens when JVM cannot find the Anypoint Platform certificates in its trust store.
Solution: Import the Mulesoft Certificates to JVM
Step 1: Find which Java is used by Anypoint Studio
- Go to Anypoint Studio ???? Window ???? Preferences ???? Java ???? Installed JREs
- Copy the location of the Java: C:\AnypointStudio\plugins\org.mule.tooling.jdk.win32.x86_64_1.1.5
- Make sure AnypointStudio.ini file also refer to the same
Step 2: Download MuleSoft Certificates
- Go to https://anypoint.mulesoft.com/login/
- Click on the Lock pad Icon ????Connection is secure ???? Certificate is valid ???? Details
- Select Root Tag in Certificate Hierarchy and click on Export and download the file as “Der-encoded binary, Single Certificate”
- Do the same for child tags as well. (Download all 3 certificates.Der file type)
- In this case
- Root Tag: Cato Networks CA
- Child Tag: Cato Networks Server chicatod1
- Child Tag: anypoint.mulesoft.com
- Open a command prompt and navigate to the java folder which we have copied in Step1 C:\AnypointStudio\plugins\org.mule.tooling.jdk.win32.x86_64_1.1.5 \jre\lib\security
- Cmd keytool -importcert -file “Certificate File Path” -keystore cacerts -alias “Alias Name” -storepass changeit
- Execute the below commands individually and type “changeit” for the password and “yes” for the Trust This certificate.
- keytool -importcert -file C:/Users/ksumar/Downloads/anypoint.mulesoft.der -keystore cacerts -alias “anypoint.mulesoft cert”
- keytool -importcert -file C:/Users/ksumar/Downloads/CatoNetworkserverchicatod1.der -keystore cacerts -alias “CatoNetworkserverchicatod1 cert”
- keytool -importcert -file C:/Users/ksumar/Downloads/CatoNetworkCA.der -keystore cacerts -alias “CatoNetworkCA cert”
- Once all the certificates are successfully added to JVM restart the studio and run the API again.
Find more MuleSoft Technical Guides at Caelius Consulting Resource Centre.