连接苹果推送通知网关失败

发布于 2024-11-04 02:50:14 字数 1497 浏览 1 评论 0原文

我用 telnet 测试了我的服务器,看起来工作正常:

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

但我尝试在 PHP-APNS 中运行sample_push.php 文件,但它显示以下错误:

Sat, 30 Apr 2011 18:21:13 +0800 ApnsPHP[14447]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Sat, 30 Apr 2011 18:21:13 +0800 ApnsPHP[14447]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195':  (0)
Sat, 30 Apr 2011 18:21:13 +0800 ApnsPHP[14447]: INFO: Retry to connect (1/3)...
Sat, 30 Apr 2011 18:21:14 +0800 ApnsPHP[14447]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Sat, 30 Apr 2011 18:21:14 +0800 ApnsPHP[14447]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195':  (0)
Sat, 30 Apr 2011 18:21:14 +0800 ApnsPHP[14447]: INFO: Retry to connect (2/3)...
Sat, 30 Apr 2011 18:21:15 +0800 ApnsPHP[14447]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Sat, 30 Apr 2011 18:21:15 +0800 ApnsPHP[14447]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195':  (0)
Sat, 30 Apr 2011 18:21:15 +0800 ApnsPHP[14447]: INFO: Retry to connect (3/3)...
Sat, 30 Apr 2011 18:21:16 +0800 ApnsPHP[14447]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...

Fatal error: Uncaught exception 'ApnsPHP_Exception' with message 'Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195'.................

有什么想法吗?

i tested my server with telnet, it seems like working fine:

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

but i try to run sample_push.php file in PHP-APNS , but it show error below:

Sat, 30 Apr 2011 18:21:13 +0800 ApnsPHP[14447]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Sat, 30 Apr 2011 18:21:13 +0800 ApnsPHP[14447]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195':  (0)
Sat, 30 Apr 2011 18:21:13 +0800 ApnsPHP[14447]: INFO: Retry to connect (1/3)...
Sat, 30 Apr 2011 18:21:14 +0800 ApnsPHP[14447]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Sat, 30 Apr 2011 18:21:14 +0800 ApnsPHP[14447]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195':  (0)
Sat, 30 Apr 2011 18:21:14 +0800 ApnsPHP[14447]: INFO: Retry to connect (2/3)...
Sat, 30 Apr 2011 18:21:15 +0800 ApnsPHP[14447]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...
Sat, 30 Apr 2011 18:21:15 +0800 ApnsPHP[14447]: ERROR: Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195':  (0)
Sat, 30 Apr 2011 18:21:15 +0800 ApnsPHP[14447]: INFO: Retry to connect (3/3)...
Sat, 30 Apr 2011 18:21:16 +0800 ApnsPHP[14447]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195...

Fatal error: Uncaught exception 'ApnsPHP_Exception' with message 'Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195'.................

any ideas ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冰雪之触 2024-11-11 02:50:14

据我所知,如果您提供了错误的证书,Apple 将断开您的 TLS 连接。

所以你可以telnet APNS端口,但无法连接。

As far as I know, if you provide a wrong certificate, Apple will disconnect your TLS connection.

So you can telnet the APNS port, but fail to connect.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文