【问题标题】:IBM Worklight 6.0 - Apple Push Notification Service ExceptionIBM Worklight 6.0 - Apple 推送通知服务异常
【发布时间】:2013-10-15 07:57:35
【问题描述】:

全部,

我正在尝试让 Apple 推送通知在 Mac 上运行。但我遇到了以下问题,需要一些帮助来弄清楚发生了什么。

我已经实现了 Worklight 的入门页面中的推送通知示例。我能够在我的 iPhone 4S 上安装该应用程序并能够订阅推送通知。我可以在我的 Worklight Console 中看到一个用户和订阅。当我执行适配器程序将通知推送到我的设备时,我看到消息说消息已发送给用户:XXX。但是,然后我看到以下错误消息:

[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   

在搜索上述问题的解决方案时,建议可能存在一些网络问题。我关闭了防火墙,并且能够 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 '^]'.

我也尝试允许 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 版本(工作室):V6.0 MacPro 配置:防火墙已关闭 Wi-fi 路由器:防火墙已关闭 iPhone 4S:在设置中启用通知

【问题讨论】:

    标签: ios networking apple-push-notifications ibm-mobilefirst


    【解决方案1】:

    这不是禁用防火墙的问题...您可以将其打开,但请确保允许属于 Apple 的特定端口和 IP 地址as Apple suggests in this support document

    【讨论】:

    • Idan,感谢您为清晰起见和您的回答编辑问题。
    • 您能否指导我如何确保这些 TCP 端口在 Mac 上打开?
    • 您能详细说明一下这个 DNS 问题吗?以及如何解决?
    • 您的 ISP 的 DNS 服务器与 Apple 的服务器不同步。但我对此表示怀疑......
    • 在家而不是在工作中尝试一下,看看网络的变化是否会产生影响。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-18
    相关资源
    最近更新 更多