2016-07-11 127 views
0

使用WSO2 API Manager(V1.10),我發佈了一個API,並將SSL證書導入到client-truststore.jks。但是當我打電話給這個API,我收到這個錯誤:WSO2 API Manager收到致命警報:handshake_failure

2016-07-11 11:42:11,296 [-] [HTTPS-Sender I/O dispatcher-7] ERROR TargetHandler I/O error: Received fatal alert: handshake_failure 
javax.net.ssl.SSLException: Received fatal alert: handshake_failure 
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) 
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1650) 
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1618) 
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1787) 
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1071) 
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:893) 
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:767) 
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) 
at org.apache.http.nio.reactor.ssl.SSLIOSession.doUnwrap(SSLIOSession.java:228) 
at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:263) 
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:391) 
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:119) 
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159) 
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338) 
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316) 
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277) 
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105) 
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:586) 
at java.lang.Thread.run(Thread.java:745) 
+1

通過將證書導入到client-truststore.jks,你是什麼意思?你的API有不同的SSL證書嗎?在這種情況下,您必須將證書導入到客戶機委託信任和wso2carbon.jks中,然後在您用於調用API的客戶機中使用證書。另請檢查證書中的主機名。由於證書和請求URI中的主機名不同,可能會發生此異常。 –

回答

1

我懷疑你的API調用客戶端程序沒有API服務器的證書。 (通常您導入證書到你的JRE的jacerts或其他信託商店)

But When I call this API, I 'm receving this error: 

當你調用這個API,沒有這個API調用的客戶端程序(Java的,例如)也得到這個WSO2服務器的證書導入?這可能會解決您的問題。

1

根據錯誤日誌,這發生在http發件人。即當api經理調用後端時。如果您的後端是「HTTPS」,則需要將其公共證書導入到APIM的信任列表中

0

Java 1.7中出現同樣的問題。 Java 1.8已解決我的問題

相關問題