我有一个MobileFirst应用程序试图发送带有生产APNS证书的推送。
提交push时出现此异常:
INFO: Failed to send message Message(Id=2; Token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; Payload={"aps":{"alert":{"body":"Blah blah blah","action-loc-key":null},"sound":"","badge":1},"payload":"{\"alias\":\"News_fr\",\"custom\":\"data\"}"})... trying again after delay
java.net.SocketException: Connection closed by remote host
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1510)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
at java.io.OutputStream.write(OutputStream.java:75)
at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:240)
at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:230)
at com.notnoop.apns.internal.ApnsPooledConnection$2.run(ApnsPooledConnection.java:47)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
该服务器在Debian GNU / Linux 7(轻巧)上运行Oracle JRE 1.7和Tomcat 7。
MobileFirst版本是6.3.0。
与开发证书一起使用效果很好。
我开发了一个独立的Java应用程序(使用JavAPNS代替Notnoop),以使用相同的证书在本地环境中重现该问题,并且该程序可与Java 1.6一起使用,但不适用于更高版本。
最佳答案
针对此问题打开了PMR(支持票证),并且客户决定将已安装的Java降级为Oracle Java 1.6,然后成功恢复发送推送通知。