我们正在尝试将一些数据发布到firebase实时数据库,并且出于某种原因,某些请求即使对等方未经过身份验证,并且某些请求正常运行。没有模式,但有些随机请求失败。
请注意,没有服务器重启或任何更改。
随机某些请求即可获得SSL peer not authenticated错误。
请帮助解决此问题。
成功要求:
2018/04/05 18:16:25,150- FlowContext-161 INFO - serviceAccount done
2018/04/05 18:16:25,151- FlowContext-161 INFO - FirebaseInvoker | postToFireBase | line No :49 | Firebase calledjava.io.FileInputStream@40d108c9 | |
2018/04/05 18:16:25,152- FlowContext-161 INFO - FirebaseInvoker | postToFireBase | line No :60 | Authenticating Using Google Credentials | |
2018/04/05 18:16:25,152- FlowContext-161 INFO - FirebaseInvoker | postToFireBase | line No :62 | Authentication Done | |
2018/04/05 18:16:25,227- FlowContext-161 INFO - HttpClientUtil | postRequest[52] | |
2018/04/05 18:16:25,227- FlowContext-161 INFO - HttpClientUtil | postRequest[53] | | Inside PostRequest Method . Input data >> Request Properties = {Content-Type=text/plain} Header data =null Request Data = Cert =null is-Via-Proxy?? = true
2018/04/05 18:16:25,228- FlowContext-161 INFO - HttpClientUtil | postRequest[76] | | Adding Custom HostNameVerifier.
2018/04/05 18:16:25,228- FlowContext-161 INFO - HttpClientUtil | getConnection[142] | | Opening Connection via proxy server.
2018/04/05 18:16:25,228- FlowContext-161 INFO - HttpClientUtil | postRequest[81] | | Connection Opened . Request Method : DELETE
2018/04/05 18:16:25,228- FlowContext-161 INFO - HttpClientUtil | postRequest[95] | | Setting Request Header values
2018/04/05 18:16:25,228- FlowContext-161 INFO - HttpClientUtil | postRequest[98] | | Key : Content-Type Value : text/plain
2018/04/05 18:16:26,067- FlowContext-161 INFO - Response Code:::200
2018/04/05 18:16:26,068- FlowContext-161 INFO - HttpClientUtil | readResponse[168] | | Response Message Received : null
2018/04/05 18:16:26,068- FlowContext-161 INFO - Response Code:::200
2018/04/05 18:16:26,068- FlowContext-161 INFO - HttpClientUtil | postRequest[125] | | Response Received : null
2018/04/05 18:16:26,068- FlowContext-161 INFO - FirebaseInvoker | postToFireBase[81] | | Response : null
2018/04/05 18:16:26,069- FlowContext-161 INFO - APIResponseBuilder | buildsellerModeResp | line No :2234 | Preparing build sellerMode Response Message. | |
2018/04/05 18:16:26,069- FlowContext-161 INFO - APIResponseBuilder | buildsellerModeResp | line No :2256 | Response Message >> : {"errorCode":0,"reqRefNo":"PAYLAH3822E7684F314364A45D43D2"} | |
失败的原因:
2018/04/05 18:19:26,247- FlowContext-167 INFO - serviceAccount done
2018/04/05 18:19:26,247- FlowContext-167 INFO - FirebaseInvoker | postToFireBase | line No :49 | Firebase calledjava.io.FileInputStream@25c89678 | |
2018/04/05 18:19:26,249- FlowContext-167 INFO - FirebaseInvoker | postToFireBase | line No :60 | Authenticating Using Google Credentials | |
2018/04/05 18:19:26,249- FlowContext-167 INFO - FirebaseInvoker | postToFireBase | line No :62 | Authentication Done | |
2018/04/05 18:19:26,284- FlowContext-167 INFO - FirebaseInvoker | postToFireBase | line No :87 | Firebase Posting started Step 5javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:399)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.updateSecureConnection(DefaultClientConnectionOperator.java:167)
at org.apache.http.impl.conn.AbstractPoolEntry.layerProtocol(AbstractPoolEntry.java:275)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.layerProtocol(AbstractPooledConnAdapter.java:138)
at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:704)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:421)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
at com.google.api.client.http.apache.ApacheHttpRequest.execute(ApacheHttpRequest.java:67)
at com.google.api.client.http.HttpRequest.execute(HttpRe
答案 0 :(得分:0)
问题是SSL证书已过期,我已下载并添加到服务器jks并开始工作。