火山引擎云服务器故障处理教程-如何排查 Centos 7.6 向 Apple APN发送通知请求失败的问题?

axin 2025-04-17 9人围观 ,发现0个评论 火山引擎云服务器云服务器云服务器教程

👉点击这里申请火山引擎VIP帐号,立即体验火山引擎产品>>>

当您有通知要发送给用户时,您的提供商必须构造一个 POST 请求并将其发送到 Apple 推送通知服务 (APN)。

请求返回: "Unexpected HTTP/1.x request: xxxx xxxxxxx"

问题原因

与 Apple 服务器之间建立连接,需要使用 HTTP/2 和 TLS 1.2 或更高版本,Centos 7.6 系统如果没有安装 HTTP/2 模块会导致建立连接失败。

参考Apple官网要求:

Use HTTP/2 and TLS 1.2 or later to establish a connection between your provider server and one of the following servers:

  • Development server: api.sandbox.push.apple.com:443

  • Production server: api.push.apple.com:443

解决方案
  1. 当前Centos 7.6系统 升级 curl 到 HTTP/2

  2. 使用veLinux 操作系统,因为在 VeLinux 中是满足先决条件的。


请关注微信公众号
微信二维码
不容错过
Powered By TOPYUN 云产品资讯