简体   繁体   English

IBM Worklight 6.0-Apple推送通知服务异常

[英]IBM Worklight 6.0 - Apple Push Notification Service Exception

All, 所有,

I am trying to get Apple Push Notification working on Mac. 我正在尝试在Mac上运行Apple Push Notification。 But I am having below issue and need some help to figure out what is going on. 但是我遇到了以下问题,需要一些帮助来弄清楚发生了什么。

I have implemented the Push Notification sample from Worklight's Getting Started page. 我已经从Worklight的“入门”页面实现了“推送通知”示例。 I am able to install the app on My iPhone 4S and able to subscribe to the Push notification. 我可以在我的iPhone 4S上安装该应用程序,并可以订阅推送通知。 I can see one user and subscription in my Worklight Console. 我可以在Worklight控制台中看到一个用户和订阅。 When I executed the adapter procedure to push the notification to my device, I see message saying message has been sent to user: XXX. 当我执行适配器过程以将通知推送到我的设备时,我看到一条消息,指出消息已发送给用户:XXX。 However, I then see the following error message: 但是,然后我看到以下错误消息:

[WARNING ] Failed to send message com.notnoop.apns.EnhancedApnsNotification@30f6ea2a... trying again
[WARNING ] Failed to retreive invalid devices
[WARNING ] Failed to retreive invalid devices
[WARNING ] Failed to retreive invalid devices
[ERROR   ] Couldn't get feedback connection
[ERROR   ] Unknown exception: java.net.UnknownHostException: feedback.sandbox.push.apple.com
[WARNING ] Failed to retreive invalid devices
[WARNING ] Failed to retreive invalid devices
[WARNING ] Failed to retreive invalid devices
[ERROR   ] Couldn't get feedback connection
[ERROR   ] Unknown exception: java.net.UnknownHostException: feedback.sandbox.push.apple.com   

While googling to find out the solution for above issue, suggestions were that there could be some network issue. 在搜寻以找出上述问题的解决方案时,建议可能存在一些网络问题。 I turned off the firewall and was able to ping the APNS servers. 我关闭了防火墙,并能够ping通APNS服务器。

$ telnet 1-courier.push.apple.com 5223
Trying 17.149.32.15...
Connected to 1.courier-push-apple.com.akadns.net.
Escape character is '^]'.

$ telnet gateway.sandbox.push.apple.com 2195
Trying 17.149.34.65...
Connected to gateway.sandbox.push-apple.com.akadns.net.
Escape character is '^]'.

$ telnet gateway.push.apple.com 2195
Trying 17.172.233.147...
Connected to gateway.push-apple.com.akadns.net.
Escape character is '^]'.

I also tried to allow the below ports for APNS but no luck. 我还尝试允许以下端口用于APNS,但没有运气。

$ sudo ipfw add 0 allow tcp from any to any 2195
00100 allow ip from any to any proto tcp dst-port 2195
$ sudo ipfw add 0 allow tcp from any to any 5223
00200 allow tcp from any to any dst-port 5223
$ sudo ipfw add 0 allow tcp from any to any 2196
00300 allow tcp from any to any dst-port 2196
$ sudo ipfw add 0 allow tcp from any to any 443
00400 allow tcp from any to any dst-port 443

Worklight Version(Studio): V6.0 MacPro Configuration: Firewall is turned off Wi-fi Router: Firewall is turned off iPhone 4S: Notification is enabled in Settings Worklight版本(Studio):V6.0 MacPro配置:防火墙已关闭Wi-fi路由器:防火墙已关闭iPhone 4S:在“设置”中启用了通知

禁用防火墙不是问题……可以将其打开,但是请确保如Apple在本支持文档中建议的那样,允许属于Apple的特定端口和IP地址。

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

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