編輯:問題與沃森和HTTPS
我不認爲這是關係到沃森,所以我貼了不同的問題有關javax.net和SSL here
我有3個沃森服務,TTS,STT和會話,併入Java Spring Web應用程序,所有這三項工作都能在Eclipse/localhost中正常運行應用程序。我最近將生產服務器配置(Apache/Tomcat)更新爲安全站點(帶有LetsEncrypt證書的HTTPS/SSL),以便在Chrome中訪問麥克風。現在,當我部署應用程序時,我在執行getVoices()TTS方法時看到SSLException。
javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
我找不到任何文檔或SO相關的問題,從一個安全的網站訪問沃森服務,但我認爲這是可能考慮到Chrome的要求,即訪問麥克風的應用程序必須是安全的。
是否需要設置,標記或其他配置才能使其工作?
這裏是日誌的相關部分:
Caused by: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[?:1.7.0_80]
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) ~[?:1.7.0_80]
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979) ~[?:1.7.0_80]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086) ~[?:1.7.0_80]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) ~[?:1.7.0_80]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) ~[?:1.7.0_80]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) ~[?:1.7.0_80]
at okhttp3.internal.io.RealConnection.connectTls(RealConnection.java:239) ~[okhttp-3.3.1.jar:?]
at okhttp3.internal.io.RealConnection.establishProtocol(RealConnection.java:196) ~[okhttp-3.3.1.jar:?]
at okhttp3.internal.io.RealConnection.buildConnection(RealConnection.java:171) ~[okhttp-3.3.1.jar:?]
at okhttp3.internal.io.RealConnection.connect(RealConnection.java:111) ~[okhttp-3.3.1.jar:?]
at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:187) ~[okhttp-3.3.1.jar:?]
at okhttp3.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:123) ~[okhttp-3.3.1.jar:?]
at okhttp3.internal.http.StreamAllocation.newStream(StreamAllocation.java:93) ~[okhttp-3.3.1.jar:?]
at okhttp3.internal.http.HttpEngine.connect(HttpEngine.java:296) ~[okhttp-3.3.1.jar:?]
at okhttp3.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) ~[okhttp-3.3.1.jar:?]
at okhttp3.RealCall.getResponse(RealCall.java:243) ~[okhttp-3.3.1.jar:?]
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201) ~[okhttp-3.3.1.jar:?]
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163) ~[okhttp-3.3.1.jar:?]
at okhttp3.RealCall.execute(RealCall.java:57) ~[okhttp-3.3.1.jar:?]
at com.ibm.watson.developer_cloud.service.WatsonService$1.execute(WatsonService.java:179) ~[core-3.5.0.jar:?]
更新#1
只是爲了確保,我翻了Apache/Tomcat的配置回HTTP,重啓都和異常做不會發生。所以,我猜想它可能是Okhttp(由Watson JDK使用)或Apache/Tomcat的配置問題。或者,也許沃森不承認LetsEncrypt證書?
更新#2
我一直在試圖研究例外,我認爲這是可能的一個Apache/Tomcat的配置問題,可能與SSL協議。我將它添加到Apache httpd.conf中,但問題仍然存在。
SSLProtocol all -SSLv3
SSLProxyProtocol all -SSLv3
我加了Apache Tomcat的&中的標籤希望有人比我更熟悉它們的配置可能會指出我在正確的方向來解決這個問題。