我正在使用Apns-PHP库发送苹果推送通知。它运行正常,证书罚款,最近发出了大量的推送。
不过,有一段时间,它无法连接到苹果服务。这很奇怪,因为我们这边什么都没变。事实上,很长一段时间内没有人碰过服务器。
你知道苹果是否有任何改变可以阻止这种连接吗?
下面是来自我的服务器的日志示例:
Tue, 04 Feb 2014 03:54:42 +0000 NmPns[7799]: INFO: Starting Job (job ID: 581 ; env: 2)
Tue, 04 Feb 2014 03:54:42 +0000 NmPns[7799]: INFO: Preparing job - building queue.
Tue, 04 Feb 2014 04:10:38 +0000 NmPns[7799]: INFO: Built queue (device count: 421335)
Tue, 04 Feb 2014 04:10:39 +0000 NmPns[7799]: INFO: Connecting to Apple server...
Tue, 04 Feb 2014 04:10:39 +0000 ApnsPHP[7799]: INFO: Trying ssl://gateway.push.apple.com:2195...
Tue, 04 Feb 2014 04:10:40 +0000 ApnsPHP[7799]: ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
Tue, 04 Feb 2014 04:10:40 +0000 ApnsPHP[7799]: INFO: Retry to connect (1/3)...
Tue, 04 Feb 2014 04:10:41 +0000 ApnsPHP[7799]: INFO: Trying ssl://gateway.push.apple.com:2195...
Tue, 04 Feb 2014 04:10:41 +0000 ApnsPHP[7799]: ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
Tue, 04 Feb 2014 04:10:41 +0000 ApnsPHP[7799]: INFO: Retry to connect (2/3)...
Tue, 04 Feb 2014 04:10:42 +0000 ApnsPHP[7799]: INFO: Trying ssl://gateway.push.apple.com:2195...
Tue, 04 Feb 2014 04:10:43 +0000 ApnsPHP[7799]: ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
Tue, 04 Feb 2014 04:10:43 +0000 ApnsPHP[7799]: INFO: Retry to connect (3/3)...
Tue, 04 Feb 2014 04:10:44 +0000 ApnsPHP[7799]: INFO: Trying ssl://gateway.push.apple.com:2195...
Tue, 04 Feb 2014 04:10:44 +0000 ApnsPHP[7799]: ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
Tue, 04 Feb 2014 04:10:44 +0000 NmPns[7799]: ERROR: Aborting job! Cannot connect to server. Message: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)发布于 2014-02-06 15:04:12
也许你的证书过期了?进入您的开发人员控制台,在证书部分。如果推送通知是“启用”还是“可配置”,请查看应用程序的应用id。
https://stackoverflow.com/questions/21606013
复制相似问题