以下兩種不同類型的 SSLHandshakeException 錯誤會在連線至 Anypoint Exchange、Design Center、Studio、Connector、Munit、Runtime 更新或將應用程式部署至 Cloudhub 時記錄在 Anypoint Studio 中。
javax.net.ssl.SSLHandshakeException:org.eclipse.ecf.internal.ssl.ECFCertificateException:有效的憑證鏈,但找不到信任憑證!
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:PKIX 路徑建立失敗:sun.security.provider.certpath.SunCertPathBuilderException:找不到要求目標的有效認證路徑
請注意,UI 可能會顯示無法存取、下載或存取遭拒的一般錯誤。系統會在 Anypoint Studio 中擷取憑證錯誤。如需如何檢視 Anypoint Studio 的詳細資訊,請參閱「如何擷取 Studio 錯誤記錄」。
請注意: 如果僅在使用 VPN 時才會發生錯誤,請先確定您已連線至 VPN,然後再完成這些步驟。
步驟:
建立資料夾以在您的電腦上下載/儲存憑證
開啟瀏覽器並前往 https://anypoint.mulesoft.com/login (和/或任何其他在存取時顯示錯誤的 URL,例如 studio.mulesoft.org 或 download.eclipse.org)
針對 Windows:按一下詳細資料,然後複製到檔案。使用憑證匯出精靈將所有憑證下載到您的新資料夾。
複製儲存憑證的資料夾路徑,然後將其貼到文字編輯器。
針對 Mac:若要在 Mac 中複製路徑,請開啟「尋找工具」,以滑鼠右鍵按一下或選取「控制」,然後按一下您需要其路徑的資料夾或檔案,按住 OPTION 鍵,然後您應該會看到「複製為路徑名稱」選項。
針對 Windows:若要在 Windows 中複製路徑,請開啟尋找工具,瀏覽至您需要其路徑的資料夾或檔案,按一下尋找工具頂端顯示位置的區域,便可允許您複製路徑。
在文字編輯器中,複製/貼上下列指令。
請注意,您必須為每個憑證建立一個金鑰工具指令。例如,在上述範例影像中,您需要兩個金鑰工具指令,一個用於 Amazon,一個用於 Amazon CA Root 1。您的金鑰工具指令數量會根據您擁有的憑證數量 (通常是 2 或 3) 而有所不同。
提示:如果您有三個憑證,建議您將下列範例的金鑰工具指令作為新行複製/貼上到文字編輯器中,以便您可以保留一行作為範例,並針對每個憑證編輯其他行。範例如下:
針對 Mac:keytool -importcert -file pathToFolder/ -keystore JDKpath/Contents/Home/lib/security/cacerts -alias ""
針對 Windows:keytool -importcert -file C:\Users\TestUser\Downloads\Mulesoft_Certificates\Zscaler_Root_CA.crt -keystore C:\Users\TestUser\Downloads\AnypointStudio718\plugins\org.mule.tooling.jdk.win32.x86_64_1.3.1\lib\security\cacerts -alias “Zscaler_Root_CA”
將路徑插入到其中表示 pathToFolder 的資料夾。將憑證名稱新增到表示 的位置。
針對 Mac:keytool -importcert -file /Users/myName/cert/amazon.cer -keystore JDKpath/Contents/Home/lib/security/cacerts -alias "amazon.cer"
針對 Windows:keytool -importcert -file /Users/myName/cert/amazon.cer -keystore JDKpath\lib\security\cacerts -alias "amazon.cer"
開啟 Anypoint Studio.ini 檔案。如需如何開啟此檔案的詳細資訊,請參閱「如何尋找 AnypointStudio 初始檔案」。
前往安裝 Studio 的資料夾,瀏覽至外掛程式,然後尋找在.ini 檔案中列出的 JDK 資料夾。其資料夾開頭為 "org.mule.tooling.jdk"。在範例螢幕快照中,"org.mule.tooling.jdk.macosx.x86_64_1.1.1" 是 JDK 資料夾,
針對 Windows:如下所示:
將路徑複製到.ini 檔案中所列的 JDK,並在文字編輯器中將 JDKpath 取代為已複製的路徑。完成的指令將如下所示。
針對 Mac:keytool -importcert -file /Users/myName/cert/Amazon.cer -keystore /Applications/AnypointStudio710.app/Contents/Eclipse/plugins/org.mule.tooling.jdk.macosx.x86_64_1.1.1/Contents/Home/lib/security/cacerts -alias "Amazon.cer"
針對 Windows:keytool -importcert -file /Users/myName/cert/amazon.cer -keystore /Applications/AnypointStudio710.app/Contents/Eclipse/plugins/org.mule.tooling.jdk.win32.x86_64_1.1.1\lib\security\cacerts -alias "amazon.cer"
複製您已下載的所有憑證的指令。請確認每個憑證都有唯一的行。 例如,如果您使用 Mac 並且擁有三個憑證以及名稱為 “cert” 的資料夾,則應該擁有三個像這個這樣的唯一指令。請確定包含 "cacerts":
keytool -importcert -file /Users/myName/cert/certificate_1.cer -keystore /Applications/AnypointStudio710.app/Contents/Eclipse/plugins/org.mule.tooling.jdk.macosx.x86_64_1.1.1/Contents/Home/lib/security/cacerts -alias "certificate_1.cer"
keytool -importcert -file /Users/myName/cert/certificate_2.cer -keystore /Applications/AnypointStudio710.app/Contents/Eclipse/plugins/org.mule.tooling.jdk.macosx.x86_64_1.1.1/Contents/Home/lib/security/cacerts -alias "certificate_2.cer"
keytool -importcert -file /Users/myName/cert/certificate_3.cer -keystore /Applications/AnypointStudio710.app/Contents/Eclipse/plugins/org.mule.tooling.jdk.macosx.x86_64_1.1.1/Contents/Home/lib/security/cacerts -alias "certificate_3.cer"
以管理員的身分開啟 Mac 中的終端或 Windows 中的指令提示。您可在任何目錄中,將先前區段中建立的每個金鑰工具指令一次貼上到該命令。
輸入密碼「changeit」。密碼全部為小寫,且不包含空格。
如果系統詢問您是否信任憑證,請輸入「y」。
執行指令後,請重新啟動 Studio。
即使安裝憑證後,如果 Windows 中仍存在憑證錯誤,則請連絡您的 IT 小組以將 Studio URL 列入白名單。如需詳細資訊,請參閱 - 哪些 URL 需要由 IT 小組列入白名單才能執行 Anypoint Studio?
HTTPS 呼叫失敗,發生「SunCertPathBuilderException:找不到要求目標的有效認證路徑」或「一般 SSLEngine 問題」
001122500

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.