【问题标题】:Unable to receive Push Notifications on android/ios devices无法在 android/ios 设备上接收推送通知
【发布时间】:2025-12-19 08:30:11
【问题描述】:

在为 MobileFirst Platform 6.3 运行 event source-based notifications sample project 时出现以下错误。

我的 android 或 ios 设备没有收到任何推送通知。

MobileFirst 开发服务器控制台显示:

[ERROR   ] submitNotification >> userId :: Raj, text :: Welcome, Eager
to Have Engagement with you [project PushNotifications]  
[ERROR   ] B4 notifying============{"APNS":{"badge":1,"alert":"Welcome, Eager to Have Engagement with you","payload":{"custom":"data"},"sound":"","actionKey":null},"GCM":{"alert":"Welcome,
Eager to Have Engagement with you","badge":1,"payload":{"custom":"data"}},"SMS":{"text":"Welcome, Eager to Have Engagement with
you"},"MPNS":{"raw":{"payload":{"custom":"data"}},"toast":null,"tile":{"title":"Welcome,
Eager to Have Engagement with you","count":1}}} [project
PushNotifications]  
[ERROR   ] Notified to device======================={"userId":"Raj","state":{}} [project
PushNotifications]  
[ERROR   ] Couldn't connect to APNS server Connection timed out: connect

【问题讨论】:

    标签: push-notification apple-push-notifications ibm-mobilefirst


    【解决方案1】:

    您的网络配置很可能会阻止 APNS 服务器(Apple 的推送通知服务)所需的地址或端口。

    验证以下内容是否可访问:

    • 沙盒服务器:
      gateway.sandbox.push.apple.com:2195
      feedback.sandbox.push.apple.com:2196

    • 生产服务器:
      gateway.push.apple.com:2195
      反馈.push.apple.com:2196

    • 1-courier.push.apple.com 5223

    • 整个 17.0.0.0/8 地址块分配给 Apple,因此您可以在防火墙规则中指定该范围

    【讨论】: