2017-08-08 1 views
0

Ich versuche, Push-Benachrichtigungen an IOS zu schicken javapns verwenden. Der Pfad zur Keystore-Datei (P12) und sein Kennwort werden im Code korrekt angegeben.javapns Handhabung Ausnahme: javax.net.ssl.SSLException: Empfangene fatal Alarm: INTERNAL_ERROR

List <PushedNotification> NOTIFICATIONS = Push.payload(payload, "/home/sunil/Downloads/pushCertCurrent.p12", "password", false, "7964b31ec8b8a194f8c6b84924088d7b29bd98ecc28162e771f623d5ef0a39b6"); 

Aber während Benachrichtigung an das Gerät senden Gerät Token als letzten Parameter in dem obigen Code erwähnt habe, erhalte ich javax.net.ssl.SSLException: Schwerwiegender Alarm empfangen: INTERNAL_ERROR

Ich habe angehängter Debugger mit -Djavax.net.debug = alle Parameter und erhalten folgende Protokoll in der Konsole.

Dies ist ein Teil des Protokolls, das ich bekomme.

main, READ: TLSv1.2 Alert, length = 2 
main, RECV TLSv1.2 ALERT: fatal, internal_error 
%% Invalidated: [Session-1, SSL_RSA_WITH_3DES_EDE_CBC_SHA] 
main, called closeSocket() 
main, handling exception: javax.net.ssl.SSLException: Received fatal alert: internal_error 
javax.net.ssl.SSLException: Received fatal alert: internal_error 
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) 
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) 
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023) 
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125) 
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) 
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) 
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) 
    at java.io.OutputStream.write(OutputStream.java:75) 
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:427) 
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:366) 
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:336) 
    at javapns.Push.sendPayload(Push.java:178) 
    at javapns.Push.payload(Push.java:149) 
    at com.icube.apns.TestPushNotificationApp.main(TestPushNotificationApp.java:35) 
17063 [main] INFO javapns.notification.PushNotificationManager - Attempt failed (Received fatal alert: internal_error)... trying again 
main, called close() 
main, called closeInternal(true) 
18495 [main] DEBUG javapns.communication.ConnectionToAppleServer - Creating SSLSocket to gateway.sandbox.push.apple.com:2195 
Allow unsafe renegotiation: false 
Allow legacy hello messages: true 
Is initial handshake: true 
Is secure renegotiation: false 
main, setSoTimeout(30000) called 
26600 [main] DEBUG javapns.notification.PushNotificationManager - Reading responses 
main, setSoTimeout(5000) called 

Bitte helfen Sie mir, herauszufinden, wo ich etwas falsch mache und das ist ein Problem von meiner Seite oder von der Seite Apfel.

Antwort

0

Ich fand das Problem, es war kein Problem mit meinem Code. Ich habe gerade das Apple-Zertifikat/Keystore (P12) neu erstellt und es hat begonnen zu arbeiten, da könnte es ein Problem bei der Erstellung von Keystore geben.

Verwandte Themen