2013-07-03 62 views
0

全部,IBM Worklight 6.0 - Apple推送通知服務例外

我正試圖在Mac上使用Apple推送通知。但我有以下問題,需要一些幫助來弄清楚發生了什麼。

我已經從Worklight的入門頁面實施了推送通知示例。我可以在我的iPhone 4S上安裝應用程序,並且可以訂閱推送通知。我可以在Worklight Console中看到一個用戶和訂閱。當我執行適配器過程以將通知推送到我的設備時,我看到消息說消息已發送給用戶:XXX。不過,我後來看到以下錯誤消息:

[WARNING ] Failed to send message [email protected] 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 

工作燈版(工作室):V6.0 的MacPro配置:防火牆是關閉 Wi-Fi路由器:防火牆是關閉 iPhone 4S的:通知是啓用的設置

回答

0

這不是一個禁用防火牆的問題...您可以打開它,但請確保允許屬於Apple的特定端口和IP地址,as Apple suggests in this support document

+0

Idan,感謝您編輯問題以獲得清晰和您的答案。 –

+0

你能指導我如何確保在Mac上打開這些TCP端口? –

+0

似乎你已經這樣做了。 –