Firebase实时数据库的SSL对等方未通过身份验证异常 [英] SSL peer not authenticated Exception for Firebase real time database

查看:73
本文介绍了Firebase实时数据库的SSL对等方未通过身份验证异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正尝试将一些数据发布到Firebase实时数据库,并且由于某些原因,一些请求无法获得对等方的身份验证,而某些请求则正常工作.没有模式,但是一些随机请求失败.

We are trying to post some data to firebase real time database and for some reason some of the request im getting peer not authenticated and some of the request are working properly . There is no pattern but some random request are failing.

请注意,没有重新启动服务器或进行任何更改.

Please note there is no server restart or any change .

随机一些请求使SSL对等方未通过身份验证错误.

Randomly some request im getting SSL peer not authenticated error.

请帮助解决此问题.

成功请求:

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

推荐答案

问题是SSL证书已过期,我下载并添加到服务器jks并开始工作.

The issue was the SSL cert has expired and i downloaded and added to server jks and started working.

这篇关于Firebase实时数据库的SSL对等方未通过身份验证异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆