我正在使用 Aerogear 统一推送服务器将消息传递到推送网络。在我的设置中,消息已正确传递到 Android 网络,但无法在 Apple 中传递。从后端到推送网络的处理似乎仍然会发生错误。
我做了一些谷歌搜索,它可能与netty上的某些东西有关,但我不确定。我已经包含了最相关的日志:
[0m15:36:05,122 DEBUG [org.jboss.aerogear.unifiedpush.message.sender.apns.PushyApnsSender] (Thread-1 (ActiveMQ-client-global-threads-1186871307)) establishing the connection for ab358c33-ca7c-4b26-82d9-528f00a2f4c8
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator$FailureWrapper.wrapSslEngine(JdkAlpnApplicationProtocolNegotiator.java:113)
at io.netty.handler.ssl.SslContext.newHandler(SslContext.java:903)
at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:113)
at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:105)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:597)
at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1387)
at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:419)
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:506)
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:478)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at com.turo.pushy.apns.ApnsClient$3.operationComplete(ApnsClient.java:395)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:507)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:420)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:686)
at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1276)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:624)
at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:117)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:465)
at io.netty.channel.DefaultChannelPipeline.access$000(DefaultChannelPipeline.java:44)
at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1387)
at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1122)
at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:647)
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:506)
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:478)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
我了解到苹果使用 https/2 到它的端点。我们用作部署基础的来自 Alpine Linux 的映像默认情况下没有支持 https/2 的必要库。
以下 Dockerfile 安装必要的基础设施以在 Alpine 中拥有 https/2:
Curl -v 应该报告 https/2 启用为:
我发现这里记录了这个程序