简体   繁体   English

APNS NetworkIOException SSLHand使用java版本1.6.0_37在Centos中失败

[英]APNS NetworkIOException SSLHandshake Failure in Centos with java version 1.6.0_37

I am facing a issue while pushing notification to APNS Servers for all apps present in my Linux Server. 我在向Linux服务器中存在的所有应用程序推送APNS服务器通知时遇到问题。

It is able to Push Notifications sometime and sometime it throws error, Checked Certificates it is Ok. 它可以在某个时间推送通知,有时它会抛出错误,Checked Certificates就可以了。

I use java_apns to push notification. 我使用java_apns来推送通知。

Below is the Error which I encounter, Can anyone please help me solving this. 以下是我遇到的错误,有谁可以帮我解决这个问题。

2016-04-13 10:15:41,245 [pool-1-thread-1] WARN  com.timeinc.ae.push.services.APNSService - com_timesmedia_countrylife_magazine Error posting to multiple devices
com.notnoop.exceptions.NetworkIOException: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at com.notnoop.apns.internal.Utilities.wrapAndThrowAsRuntimeException(Utilities.java:284)
    at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:342)
    at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:312)
    at com.notnoop.apns.internal.ApnsPooledConnection$2.call(ApnsPooledConnection.java:43)
    at com.notnoop.apns.internal.ApnsPooledConnection$2.call(ApnsPooledConnection.java:41)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:941)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1320)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:698)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:119)
    at java.io.OutputStream.write(OutputStream.java:75)
    at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:328)
    ... 8 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(InputRecord.java:482)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:922)
    ... 13 more

Any help would be greatly appreciated. 任何帮助将不胜感激。

My code was working fine with certificate and suddenly it stooped working with handshake failure. 我的代码在证书上运行良好,突然间它因握手失败而弯腰。

We finally found the problem is when certificate is out side war file(some local folder.) 我们终于发现问题是当证书出来时是战争文件(一些本地文件夹)。

1) first test with apns_test (node test) if this will send test notification then you have problem with security configuration. 1)首先使用apns_test进行测试(节点测试)如果这将发送测试通知,那么您的安全配置有问题。

Finally put certificate with in the war file. 最后把证书放在war文件中。 if you are testing out side folder then you might face this problem. 如果您正在测试侧文件夹,那么您可能会遇到此问题。

This work with me when I put certificate with in the war file. 当我把证书放在war文件中时,这与我合作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM