0

我创建了一个微服务应用程序,并添加了类型为“com.notnoop.apns”和版本“1.0.0.Beta6”的 APNS 库。我已经在 kubernetes 集群上的 GCP 上部署了这个应用程序。推送通知工作正常。但有时我会收到以下异常

javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:994)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:750)
    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:328)
    at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:312)
    at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46)
    at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:89)
    at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36)
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(InputRecord.java:505)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
    ... 22 common frames omitted 

这个问题现在一天被多次重现,如果我在谷歌云中重新启动服务,那么推送通知工作正常,但一段时间后我又面临同样的问题。我什至检查了证书的有效性,它还没有过期。

4

0 回答 0