无法连接到“SSL://gateway.sandbox.push.apple.com:2195” [英] Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195'

查看:1145
本文介绍了无法连接到“SSL://gateway.sandbox.push.apple.com:2195”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功地在我的MacBook Air运行APNS code,但事实证明,我不能在我的其他电脑中运行:

我查了一下,这些都是一样的:
1. .pem文件(具体)
2.程序

该计算机无法正常工作是:

Windows 7中,XAMPP,OpenSSL的支持,没有防火墙

EC2的Linux与2195和2196服务器打开

什么可能导致我在我的PHP code得到这个错误等问题?

 无法连接到SSL://gateway.sandbox.push.apple.com:2195

我知道有可能是由不开放SSL原因,但我查了phpinfo()函数,它应该是正确的。

 的OpenSSLOpenSSL的支持启用
OpenSSL库版本的OpenSSL 1.0.1c 10 2012年5月
OpenSSL的头版本的OpenSSL 0.9.8x

我EC2服务器尝试远程登录,它提供了:

 的telnet gateway.push.apple.com 2195
尝试17.149.36.239 ...
连接到gateway.push-apple.com.akadns.net。
转义字符是'^]'。


解决方案

感谢您的帮助,到目前为止,我解决了这个解决方案。

问题是,我用同样的PEM文件为我的证书和根证书。

有一个根证书是从我自己的证书不同,连接过程中,无论证书是用来所以我得到的苹果推送通知的根证书。

谢谢!

I sucessfully run the APNS code in my macbook air, but it turns out that I can not run it in my other computer:

I checked that these are the same: 1. .pem file ( to be specific ) 2. Program

The computers can not work are:

Windows 7,XAMPP,OpenSSL supported,No firewall

And

EC2 Linux server with 2195 and 2196 opened

What might be other issues causing that I got this error in my php code?

Unable to connect to 'ssl://gateway.sandbox.push.apple.com:2195'

I know there might be cause by not opening SSL, but I checked the phpInfo(), it should be correct.

openssl 

OpenSSL support enabled 
OpenSSL Library Version OpenSSL 1.0.1c 10 May 2012 
OpenSSL Header Version  OpenSSL 0.9.8x

I tried telnet in EC2 server, it gives:

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

解决方案

Thanks for help, so far I solved the solution.

The problem is that I used the same pem file for both my cert and the root cert.

There is a root cert that is different from my own cert, during connection, both cert is used so I have to get the root cert of apple push notification.

Thanks!

这篇关于无法连接到“SSL://gateway.sandbox.push.apple.com:2195”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆