的推送通知服务时出现连接拒绝错误

的推送通知服务时出现连接拒绝错误

本文介绍了iPhone:连接 Apple 的推送通知服务时出现连接拒绝错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了摆脱以下错误消息,我很久以来一直在挠头.

I have been scratching my head since long now to get rid of following error message.

警告:stream_socket_client() [function.stream-socket-client]:无法连接到 ssl://gateway.push.apple.com:2195(连接被拒绝)

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection refused)

我多次尝试生成正确的证书,并确保使用正确的包标识符对项目进行签名.

I have tried multiple times generating the correct certificate and made sure that project is signed with the correct bundle identifier.

我也尝试过使用测试脚本 PHP(https://devforums.apple.com/message/50461)和 Python(http://stackoverflow.com/questions/1052645/apple-pns-push-notification-services-sample-code) 但两者都给出了相同的错误信息.

I have also tried using testing script PHP(https://devforums.apple.com/message/50461) and Python (http://stackoverflow.com/questions/1052645/apple-pns-push-notification-services-sample-code) but both are giving same error message.

谁能帮我知道如何摆脱这个错误信息?

Could anyone please help me to know how to get rid of this error message?

谢谢.

推荐答案

问题...我们的防火墙设置不允许设置中未列出的任何其他端口.要求管理员添加它,它现在不显示此错误消息....!!我已经发送并发送消息,但自过去 5 分钟以来没有收到.我知道不能保证 APNS 消息.会再等一段时间.希望它到达.. :)

Gotcha...Our firewall setup to not allow any other ports not listed in settings. Asked admin people to add it and it doesn't show this error message now....!! I have sent and message but didn't receive since last 5 minutes. I know that APNS messages are not guaranteed. Will wait for some more time. Hopefully it arrives.. :)

这篇关于iPhone:连接 Apple 的推送通知服务时出现连接拒绝错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 12:53