Amazon EC2 上的 Apple 推送通知服务器已连接但未收到通知 [英] Apple push notification server on Amazon EC2 connected but not receive notification

查看:29
本文介绍了Amazon EC2 上的 Apple 推送通知服务器已连接但未收到通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了苹果推送通知 API 并使其在我本地的 mac(环境)上运行.我在我的本地 tomcat 中对其进行了测试,一切正常,iOS 设备会收到异常通知.

I tried the apple push notification API and made it work on my local mac(environment). I tested it in my local tomcat, everything works fine and iOS devices receive notifications as excepted.

但是当我将我的战争部署到远程服务器(Amazon EC2 实例)上的 tomcat 时,注意到我使用相同的 .p12 文件进行验证.应用程序返回成功消息,但 iOS 设备无法接收任何消息.

But when I deploy my war into the tomcat at remote server( Amazon EC2 instance), noted that I use the same .p12 file for verification. The application returns a successful message but the iOS devices could not receive any messages.

我检查了与 Apple 推送服务器的连接,一切正常.

I checked the connection with Apple push server, everything seems fine.

我想知道我是否错过了为此 Amazon EC2 设置的任何其他系统.同样的代码也适用于 windows 机器上的 tomcat.

I am wondering if I missed any other system set up for this Amazon EC2. The same code works on a tomcat on windows machine as well.

谢谢!

推荐答案

我已经验证通过 Apns 从 ec2 发送推送通知效果很好.我遇到了麻烦,但结果是使用了错误的应用程序的证书,并且无声无息地失败了.如果您在连接时遇到问题,请检查防火墙.如果它说它发送成功但没有交付,则消除证书中的变量.

I have verified that sending a push notification from ec2 through Apns works great. I was having trouble, but it turned out to be using a cert for the wrong app and it failed silently. If you have trouble connecting then check firewall. If it is saying that it sends successfully but there is no delivery then eliminate variables in your certs.

这篇关于Amazon EC2 上的 Apple 推送通知服务器已连接但未收到通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆