javax.net.ssl.SSLException: Connection reset in Firebase Cloud Messaging

530 views
Skip to first unread message

Максим Неклюдов

unread,
May 14, 2021, 4:33:55 AM5/14/21
to Firebase Google Group
Good day. I need your help please. I have a java application that sends firebase push notifications to mobile devices. I install this application on different servers. On one server everything works fine. And on another server, when sending a push notification, an error appears: javax.net.ssl.SSLException: Connection reset. Could you tell me what the problem might be.

javax.net.ssl.SSLException: Connection reset
        at sun.security.ssl.Alert.createSSLException(Alert.java:127)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:324)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:267)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:262)
        at sun.security.ssl.SSLTransport.decode(SSLTransport.java:135)
        at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1143)
        at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1054)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:394)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConn
ction.java:185)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1340)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1315)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:264)
        at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:113)
        at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:84)
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1012)
        at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:322)
        at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:346)
        at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential
java:398)
        at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:494)
        at pushNotificationService.FireBase.Messaging.getAccessToken(Messaging.java:50)
        at pushNotificationService.FireBase.Messaging.getConnection(Messaging.java:65)
        at pushNotificationService.FireBase.Messaging.sendMessage(Messaging.java:78)
        at pushNotificationService.FireBase.Messaging.sendOverrideMessage(Messaging.java:109)
        at pushNotificationService.Manipulator.sendPushMessages(Manipulator.java:695)
        at pushNotificationService.Manipulator.manipulate(Manipulator.java:69)
        at pushNotificationService.Main.completeTask(Main.java:65)
        at pushNotificationService.Main.access$000(Main.java:17)
        at pushNotificationService.Main$1.run(Main.java:44)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
        Suppressed: java.net.SocketException: Connection reset by peer: socket write error
                at java.net.SocketOutputStream.socketWrite0(Native Method)
                at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
                at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
                at sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:81)
                at sun.security.ssl.TransportContext.fatal(TransportContext.java:355)
                ... 29 more
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:210)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:457)
        at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:165)
        at sun.security.ssl.SSLTransport.decode(SSLTransport.java:108)
        ... 26 more
Reply all
Reply to author
Forward
0 new messages