APNS 连接失败 [英] APNS connection failure

查看:25
本文介绍了APNS 连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在客户端面临 APNS 推送服务的问题.服务器端没问题,当特定设备在某个时刻卡住时,它会正确地向 APNS 发送推送.这是服务器日志.

VOIP Push:APNs 网关等待的推送通知.

VOIP Push:APNs 网关接受的推送通知.

这里是受影响设备的控制台日志

<前>默认 09:16:30.203262 +0400 apsd 连接 1507:启用 TLS默认 09:16:30.203409 +0400 apsd 连接 1507:开始,TC(0x0)默认 09:16:30.203504 +0400 apsd [C1507 DBE7C1B4-DC94-4B2A-BD21-63661595E267 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] start默认 09:16:30.204664 +0400 apsd nw_connection_report_state_with_handler_on_nw_queue [C1507] 报告状态准备默认 09:16:30.205294 +0400 mDNSResponder [R80990] DNSServiceCreateConnection START PID[99](apsd)默认 09:16:30.205592 +0400 mDNSResponder [R80991] DNSServiceGetAddrInfo(C000D000, 0, 0, ) START PID[99](apsd)默认 09:16:30.206815 +0400 apsd 任务.设置连接 1507默认 09:16:30.208190 +0400 apsd nw_connection_report_state_with_handler_on_nw_queue [C1507] 报告状态失败错误 DNS 错误:NoSuchRecord错误 09:16:30.208282 +0400 apsd 连接 1507:收到失败通知错误 09:16:30.208361 +0400 apsd 连接 1507:无法连接 12:8,原因 -1错误 09:16:30.208448 +0400 apsd 连接 1507:遇到错误 (12:8)默认 09:16:30.208522 +0400 apsd 连接 1507:正在取消默认 09:16:30.208600 +0400 mDNSResponder [R80990] DNSServiceCreateConnection STOP PID[99](apsd)默认 09:16:30.208678 +0400 mDNSResponder [R80991] DNSServiceGetAddrInfo() STOP PID[99](apsd)默认 09:16:30.208848 +0400 apsd 连接 1507:未使用连接的摘要 {protocol="(null)", domain_lookup_duration_ms=0, connect_duration_ms=0, secure_connection_duration_ms=0, idle_duration_ms=0}默认 09:16:30.208932 +0400 apsd [C1507 DBE7C1B4-DC94-4B2A-BD21-63661595E267 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls]默认 09:16:30.209009 +0400 apsd [C1507 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] 取消默认 09:16:30.209091 +0400 apsd 0.000s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 解析器路径=satisfied,接口:satisfied:默认 09:16:30.209174 +0400 apsd 0.000s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 解析器路径=satisfied, 满足,0sfied 接口:默认 09:16:30.209260 +0400 apsd 0.001s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 解析器路径=satisfied,解析器路径=satisfied,0.001s,0.001s,0默认 09:16:30.209341 +0400 apsd 0.003s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 解析器路径=satisfied,0stvip:默认 09:16:30.209427 +0400 apsd 0.004s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 主机名#45fde594:443 解析器路径=satisfied,错误解析器路径=satisfied:DNSdnsvre49-F0FB-40A5-A092-F15E19D8B4B0: NoSuchRecord默认 09:16:30.209509 +0400 apsd 0.005s [C1507] 路径:取消默认 09:16:30.209821 +0400 apsd nw_connection_report_state_with_handler_on_nw_queue [C1507] 报告状态取消错误 DNS 错误:NoSuchRecord默认 09:16:30.209998 +0400 apsd 任务.可以重试(N),原因(2)错误[12:8]默认 09:16:30.211029 +0400 apsd _CFNetworkIsConnectedToInternet 返回 1,flagsValid:1,flags:0x2错误 09:16:30.211367 +0400 apsd 任务.HTTP 加载失败,0/0 字节(错误代码:-1003 [12:8])默认 09:16:30.211510 +0400 apsd 任务.任务失败摘要 {transaction_duration_ms=9, response_status=0, cache_hit=0}默认 09:16:30.211758 +0400 apsd 删除所有条目配置 0x100f3bfc0默认 09:16:30.212028 +0400 apsd 删除所有条目配置 0x100f3bfc0默认 09:16:30.212151 +0400 apsd 调用配置完成块,到期日期 2019 年 12 月 12 日星期四 09:31:30 错误:错误域=NSURLErrorDomain 代码=-1003找不到具有指定主机名的服务器."UserInfo={NSUnderlyingError=0x102121bc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, _kCF2ErrorDomainCodeA, the server找不到.}默认 09:16:30.212393 +0400 apsd APSTCPStream 得到了配置 -- 打开了吗?是的默认 09:16:30.212593 +0400 apsd 无法加载配置包:错误域=NSURLErrorDomain 代码=-1003无法找到具有指定主机名的服务器."UserInfo={NSUnderlyingError=0x102121bc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, _kCF2ErrorDomainCodeA, the server找不到.}默认 09:16:30.212700 +0400 apsd 使用 DNS TXT 记录查找来确定开发负载平衡计数默认 09:16:30.212786 +0400 apsd 执行 DNS 查找默认 09:16:30.213329 +0400 mDNSResponder [R80992] DNSServiceQueryRecord(0, 0, , TXT) START PID[99](apsd)默认 09:16:30.214890 +0400 apsd 关闭环境 [development]默认 09:16:30.215049 +0400 mDNSResponder [R80992] DNSServiceQueryRecord(0, 0, , TXT) STOP PID[99](apsd)默认 09:16:30.215730 +0400 apsd:onInterface NonCellular 发生流错误:Error Domain=APSErrorDomain Code=1 UserInfo={NSLocalizedDescription=}默认 09:16:30.215855 +0400 apsd:为 ConnectionDisconnected 调用 AWD(带错误)默认 09:16:30.217664 +0400 apsd:ConnectionDisconnected (withError) 的 AWD 完成默认 09:16:30.217741 +0400 apsd _disconnectStream 接口:NonCellular默认 09:16:30.217821 +0400 apsd 要求将 isSuspended=NO 更改为 NO默认 09:16:30.217896 +0400 apsd 关闭环境 [development]默认 09:16:30.217972 +0400 apsd : enableNonCellularConnections 改为 NO默认 09:16:30.218458 +0400 apsd Connection closed development NonCellular默认 09:16:30.218633 +0400 apsd canUseProxy?NO deviceConfiguration NO isNearby NO默认 09:16:30.218706 +0400 apsd 从 .默认 09:16:30.218877 +0400 apsd canUseProxy?NO deviceConfiguration NO isNearby NO默认 09:16:30.219036 +0400 apsd canUseProxy?NO deviceConfiguration NO isNearby NOdefault 09:16:30.219115 +0400 apsd 更新网络引导是否已连接?是的默认 09:16:30.219271 +0400 apsd canUseProxy?NO deviceConfiguration NO isNearby NO默认 09:16:30.219404 +0400 apsd canUseProxy?NO deviceConfiguration NO isNearby NO默认 09:16:30.219532 +0400 apsd :响应非蜂窝接口上的连接失败而断开连接.(连续失败:24) isConnected NO onInterface None shouldUseDualChannel YES.在 0 个接口上连接.默认 09:16:30.219596 +0400 apsd 创建的度量容器:0x130002 成功了吗?是的默认 09:16:30.220000 +0400 apsd 连接方法替代更改为 1default 09:16:30.220094 +0400 apsd 建议客户端进入重新连接模式以响应连接失败,因为当前处于重新连接模式默认 09:16:30.220166 +0400 apsd 在正常模式下通过操作 PCActionShrinkPushKeepAliveInterval 恢复推送保持活动计时器默认 09:16:30.220230 +0400 apsd 上次定时器中断很早:[].预计开火时间为 [].默认 09:16:30.220300 +0400 apsd WiFi 增长算法-IPv4:在退避阶段收到动作 PCActionShrinkPushKeepAliveInterval默认 09:16:30.220366 +0400 apsd {保持活动间隔 = 600,状态 = 退避,下一次重新校准日期 =(空)}:adjustGrowthAlgorithmMode.{lastMode:默认值,currentMode:默认值}默认 09:16:30.220431 +0400 apsd 创建默认 09:16:30.220506 +0400 apsd 启动带有触发日期的简单计时器 [2019-12-12 09:27:05 +0400]默认 09:16:30.220713 +0400 apsd 在队列中创建了 preventSleepTimer 和 fireTimer默认 09:16:30.221159 +0400 apsd 启用电源监控 - 6 个定时器默认 09:16:30.221275 +0400 apsd 现有唤醒(空)重新安排到 2019-12-12 09:26:50 +0400,余量为 0默认 09:16:30.221551 +0400 apsd 请求安排唤醒 1 日期 2019-12-12 09:26:50 +0400 leeway 0 服务标识符 com.apple.apsd(sandbox.push.apple.com)-NonCellular 唯一标识符默认 09:16:30.221693 +0400 apsd 计算 _earlyFireDate.powerStateDetectionSupported = NO = (detectionSupported(YES) && (wwanIsUp(NO) || ! internetReachable(YES)))默认 09:16:30.221779 +0400 apsd 上次系统唤醒日期 ​​(2019-12-12 09:11:10 +0400) 长于计时器持续时间的一半,因此将最小触发日期设置为触发日期.默认 09:16:30.221867 +0400 apsd 设备已插入,覆盖 earlyFireProportion 为 1.0默认 09:16:30.222061 +0400 apsd 计算的最小火灾日期 [2019-12-12 09:27:05 +0400] (100%) 与火灾日期 [2019-12-12 09:27:05 +0400],开始日期[2019-12-12 09:16:30 +0400],最小早火比例0,支持功率状态检测:否,高功率状态:否,早火恒定间隔0.000000默认 09:16:30.222194 +0400 apsd PCConnectionManager 被客户端停止默认 09:16:30.222261 +0400 apsd 定时器失效默认 09:16:30.222322 +0400 apsd 使简单计时器无效默认 09:16:30.222699 +0400 apsd 为日期余地 0 唤醒标识符安排唤醒默认 09:16:30.224084 +0400 apsd ''() 的唤醒计划已完成 [](耗时 0.002 秒;结果代码 0)默认 09:16:30.225070 +0400 apsd 取消 simpletimer 的系统唤醒 [2019-12-12 09:26:50 +0400]默认 09:16:30.225159 +0400 apsd 请求安排唤醒 0 日期 2019-12-12 09:26:50 +0400 leeway 0 服务标识符 com.apple.apsd(sandbox.push.apple.com)-NonCellular 唯一标识符默认 09:16:30.225385 +0400 apsd APSCourier 调整连接.在 0 个接口上连接.当前链接质量:默认 09:16:30.225498 +0400 apsd 禁用电源监控 - 5 个定时器默认 09:16:30.225646 +0400 apsd canUseProxy?NO deviceConfiguration NO isNearby NO默认 09:16:30.225720 +0400 apsd 使用接口首选项 NonCellular 调用 _connectStream默认 09:16:30.225800 +0400 apsd 尝试 _connectStream.当前 onInterface 无连续失败 24 首选项 NonCellular shouldUseDualChannel 是.在 0 个接口上连接.默认 09:16:30.225869 +0400 apsd _getClientIdentity:已经有身份:默认 09:16:30.225929 +0400 apsd _connectStream - 在我们的尝试中停止 connectionManagerInterface NonCellular默认 09:16:30.225990 +0400 apsd PCConnectionManager 被客户端停止默认 09:16:30.226047 +0400 apsd : isWWANUsable NO isWiFiUsable YES onInterface NonCellular默认 09:16:30.226112 +0400 apsd : enableNonCellularConnections 改为 YES默认 09:16:30.226165 +0400 apsd 在 NonCellular 接口上打开流默认 09:16:30.226214 +0400 apsd 取消唤醒标识符的预定唤醒默认 09:16:30.226560 +0400 apsd 用环境打开 [开发]默认 09:16:30.226659 +0400 apsd loadConfigurationForEnvironment: 开发接口: NonCellular默认 09:16:30.227135 +0400 apsd 任务.正在恢复,QOS(0x15) 凭证(空)默认 09:16:30.227218 +0400 apsd 唤醒取消为 ''() 完成 [](花费 0.002 秒;结果代码 0)默认 09:16:30.227330 +0400 apsd 在接口上打开流:非蜂窝,开发默认 09:16:30.227496 +0400 apsd:使用配置包在 TCP 443 端口连接快递流默认 09:16:30.227752 +0400 apsd 关闭环境 [development]默认 09:16:30.227837 +0400 apsd 任务.{strength 0, tls 4, ct 0, sub 0, sig 1, ciphers 0, bundle 1, builtin 0}默认 09:16:30.228815 +0400 apsd 连接 1508:启用 TLS默认 09:16:30.228964 +0400 apsd 连接 1508:开始,TC(0x0)默认 09:16:30.229353 +0400 apsd [C1508 F67A490F-3214-41AE-AC96-0CD52FC88397 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls]默认 09:16:30.230101 +0400 症状 NBSM:收到 apsd 在 WiFi 上失败的症状:空闲默认 09:16:30.231119 +0400 apsd nw_connection_report_state_with_handler_on_nw_queue [C1508] 报告状态准备默认 09:16:30.231365 +0400 mDNSResponder [R80993] DNSServiceCreateConnection START PID[99](apsd)默认 09:16:30.231620 +0400 mDNSResponder [R80994] DNSServiceGetAddrInfo(C000D000, 0, 0, ) START PID[99](apsd)默认 09:16:30.232216 +0400 apsd 任务.设置连接 1508默认 09:16:30.233279 +0400 mDNSResponder [R80993] DNSServiceCreateConnection STOP PID[99](apsd)默认 09:16:30.233462 +0400 mDNSResponder [R80994] DNSServiceGetAddrInfo() STOP PID[99](apsd)默认 09:16:30.233983 +0400 apsd nw_connection_report_state_with_handler_on_nw_queue [C1508] 报告状态失败错误 DNS 错误:NoSuchRecord错误 09:16:30.234066 +0400 apsd 连接 1508:收到失败通知错误 09:16:30.234124 +0400 apsd 连接 1508:无法连接 12:8,原因 -1错误 09:16:30.234179 +0400 apsd 连接 1508:遇到错误 (12:8)默认 09:16:30.234443 +0400 apsd 连接 1508:正在取消默认 09:16:30.234525 +0400 apsd 连接 1508:未使用连接的摘要 {protocol="(null)", domain_lookup_duration_ms=0, connect_duration_ms=0, secure_connection_duration_ms=0, idle_duration_ms=0}默认 09:16:30.234584 +0400 apsd [C1508 F67A490F-3214-41AE-AC96-0CD52FC88397 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls]默认 09:16:30.234681 +0400 apsd [C1508 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] 取消

解决方案

遇到类似情况,没有推送到达,查询sandox.push.apple.com时记录dns错误

修复方法是将手机更改为在 wifi 设置中使用替代 DNS,例如 Google (8.8.8.8) 或 Cloudflare (1.1.1.1).

Facing problem with APNS push services at client end. Server side is ok and it sends push to APNS properly as particular devices get stuck at some moment. Here are the server logs.

VOIP Push: Push notification waiting by APNs gateway.

VOIP Push: Push notification accepted by APNs gateway.

Here are the console logs of effected device


    default 09:16:30.203262 +0400   apsd    Connection 1507: enabling TLS
    default 09:16:30.203409 +0400   apsd    Connection 1507: starting, TC(0x0)
    default 09:16:30.203504 +0400   apsd    [C1507 DBE7C1B4-DC94-4B2A-BD21-63661595E267 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] start
    default 09:16:30.204664 +0400   apsd    nw_connection_report_state_with_handler_on_nw_queue [C1507] reporting state preparing
    default 09:16:30.205294 +0400   mDNSResponder   [R80990] DNSServiceCreateConnection START PID[99](apsd)
    default 09:16:30.205592 +0400   mDNSResponder   [R80991] DNSServiceGetAddrInfo(C000D000, 0, 0, ) START PID[99](apsd)
    default 09:16:30.206815 +0400   apsd    Task . setting up Connection 1507
    default 09:16:30.208190 +0400   apsd    nw_connection_report_state_with_handler_on_nw_queue [C1507] reporting state failed error DNS Error: NoSuchRecord
    error   09:16:30.208282 +0400   apsd    Connection 1507: received failure notification
    error   09:16:30.208361 +0400   apsd    Connection 1507: failed to connect 12:8, reason -1
    error   09:16:30.208448 +0400   apsd    Connection 1507: encountered error(12:8)
    default 09:16:30.208522 +0400   apsd    Connection 1507: is being canceled
    default 09:16:30.208600 +0400   mDNSResponder   [R80990] DNSServiceCreateConnection STOP PID[99](apsd)
    default 09:16:30.208678 +0400   mDNSResponder   [R80991] DNSServiceGetAddrInfo() STOP PID[99](apsd)
    default 09:16:30.208848 +0400   apsd    Connection 1507: summary for unused connection {protocol="(null)", domain_lookup_duration_ms=0, connect_duration_ms=0, secure_connection_duration_ms=0, idle_duration_ms=0}
    default 09:16:30.208932 +0400   apsd    [C1507 DBE7C1B4-DC94-4B2A-BD21-63661595E267 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] cancel
    default 09:16:30.209009 +0400   apsd    [C1507 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] cancelled
    default 09:16:30.209091 +0400   apsd    0.000s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 resolver path=satisfied (Path is satisfied), interface: en0, ipv4, dns] path:start
    default 09:16:30.209174 +0400   apsd    0.000s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 resolver path=satisfied (Path is satisfied), interface: en0, ipv4, dns] path:satisfied
    default 09:16:30.209260 +0400   apsd    0.001s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 resolver path=satisfied (Path is satisfied), interface: en0, ipv4, dns] resolver:start_dns
    default 09:16:30.209341 +0400   apsd    0.003s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 resolver path=satisfied (Path is satisfied), interface: en0, ipv4, dns] path:trigger
    default 09:16:30.209427 +0400   apsd    0.004s [C1507 29735B49-F0FB-40A5-A092-F15E19D8B4B0 Hostname#45fde594:443 resolver path=satisfied (Path is satisfied), interface: en0, ipv4, dns] resolver:receive_dns DNS Error: NoSuchRecord
    default 09:16:30.209509 +0400   apsd    0.005s [C1507] path:cancel
    default 09:16:30.209821 +0400   apsd    nw_connection_report_state_with_handler_on_nw_queue [C1507] reporting state cancelled error DNS Error: NoSuchRecord
    default 09:16:30.209998 +0400   apsd    Task . can retry(N) with reason(2) for error [12:8]
    default 09:16:30.211029 +0400   apsd    _CFNetworkIsConnectedToInternet returning 1, flagsValid: 1, flags: 0x2
    error   09:16:30.211367 +0400   apsd    Task . HTTP load failed, 0/0 bytes (error code: -1003 [12:8])
    default 09:16:30.211510 +0400   apsd    Task . summary for task failure {transaction_duration_ms=9, response_status=0, cache_hit=0}
    default 09:16:30.211758 +0400   apsd    removing all entries config 0x100f3bfc0
    default 09:16:30.212028 +0400   apsd    removing all entries config 0x100f3bfc0
    default 09:16:30.212151 +0400   apsd     Calling configuration completion blocks, expiration date Thu Dec 12 09:31:30 2019 error: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x102121bc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}
    default 09:16:30.212393 +0400   apsd    APSTCPStream  got config   -- opened? YES
    default 09:16:30.212593 +0400   apsd    Failed to load config bag: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x102121bc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}
    default 09:16:30.212700 +0400   apsd    Using DNS TXT record lookup to determine load balance count for development
    default 09:16:30.212786 +0400   apsd     performing DNS lookup for 
    default 09:16:30.213329 +0400   mDNSResponder   [R80992] DNSServiceQueryRecord(0, 0, , TXT) START PID[99](apsd)
    default 09:16:30.214890 +0400   apsd    Closing  with environment [development]
    default 09:16:30.215049 +0400   mDNSResponder   [R80992] DNSServiceQueryRecord(0, 0, , TXT) STOP PID[99](apsd)
    default 09:16:30.215730 +0400   apsd    : Stream error occurred for  onInterface NonCellular: Error Domain=APSErrorDomain Code=1 UserInfo={NSLocalizedDescription=}
    default 09:16:30.215855 +0400   apsd    : Calling into AWD for ConnectionDisconnected (withError)
    default 09:16:30.217664 +0400   apsd    : AWD for ConnectionDisconnected (withError) finished
    default 09:16:30.217741 +0400   apsd     _disconnectStream for interface: NonCellular
    default 09:16:30.217821 +0400   apsd     asked to change isSuspended=NO to NO
    default 09:16:30.217896 +0400   apsd    Closing  with environment [development]
    default 09:16:30.217972 +0400   apsd    : enableNonCellularConnections changed to NO
    default 09:16:30.218458 +0400   apsd    Connection closed development NonCellular
    default 09:16:30.218633 +0400   apsd     canUseProxy? NO deviceConfiguration NO  isNearby NO
    default 09:16:30.218706 +0400   apsd     received courierConnectionStatusDidChange from .
    default 09:16:30.218877 +0400   apsd     canUseProxy? NO deviceConfiguration NO  isNearby NO
    default 09:16:30.219036 +0400   apsd     canUseProxy? NO deviceConfiguration NO  isNearby NO
    default 09:16:30.219115 +0400   apsd     updating network guidance isConnected? YES
    default 09:16:30.219271 +0400   apsd     canUseProxy? NO deviceConfiguration NO  isNearby NO
    default 09:16:30.219404 +0400   apsd     canUseProxy? NO deviceConfiguration NO  isNearby NO
    default 09:16:30.219532 +0400   apsd    : Disconnected in response to connection failure on interface NonCellular. (Consecutive failures: 24) isConnected NO onInterface None  shouldUseDualChannel YES. Connected on 0 interfaces.
    default 09:16:30.219596 +0400   apsd    Created metric container: 0x130002 succeeded? YES
    default 09:16:30.220000 +0400   apsd     Connection method alternative changed to 1
    default 09:16:30.220094 +0400   apsd    Advising client to enter reconnect mode in response to a connection failure since currently in reconnect mode
    default 09:16:30.220166 +0400   apsd    Resuming push keep alive timer in normal mode with action PCActionShrinkPushKeepAliveInterval
    default 09:16:30.220230 +0400   apsd    Last timer interruption was early: []. Expected fire time was [].
    default 09:16:30.220300 +0400   apsd    WiFi growth algorithm-IPv4: received action PCActionShrinkPushKeepAliveInterval while in stage Backoff
    default 09:16:30.220366 +0400   apsd    {keep alive interval = 600, state = Backoff, next recalibration date = (null)}: adjustGrowthAlgorithmMode. {lastMode: Defaults, currentMode: Defaults}
    default 09:16:30.220431 +0400   apsd     created 
    default 09:16:30.220506 +0400   apsd    Started simple timer  with fire date [2019-12-12 09:27:05 +0400]
    default 09:16:30.220713 +0400   apsd     created preventSleepTimer  and fireTimer  on queue 
    default 09:16:30.221159 +0400   apsd    Enabling power monitoring for  - 6 timers
    default 09:16:30.221275 +0400   apsd     Existing wake at (null) re-scheduling to 2019-12-12 09:26:50 +0400 with leeway of 0
    default 09:16:30.221551 +0400   apsd    Request to schedule wake 1 date 2019-12-12 09:26:50 +0400 leeway 0 service identifier com.apple.apsd(sandbox.push.apple.com)-NonCellular unique identifier 
    default 09:16:30.221693 +0400   apsd     calculating _earlyFireDate. powerStateDetectionSupported = NO = (detectionSupported(YES) && (wwanIsUp(NO) || ! internetReachable(YES)))
    default 09:16:30.221779 +0400   apsd    Last system wake date (2019-12-12 09:11:10 +0400) was longer than half of the timer duration, so setting minimum fire date to fire date.
    default 09:16:30.221867 +0400   apsd     Device is plugged in, overriding earlyFireProportion to be 1.0
    default 09:16:30.222061 +0400   apsd     Calculated minimum fire date [2019-12-12 09:27:05 +0400] (100%) with fire date [2019-12-12 09:27:05 +0400], start date [2019-12-12 09:16:30 +0400], minimum early fire proportion 0, power state detection supported: no, in high power state: no, early fire constant interval 0.000000
    default 09:16:30.222194 +0400   apsd    PCConnectionManager was stopped by client
    default 09:16:30.222261 +0400   apsd    Invalidating timer 
    default 09:16:30.222322 +0400   apsd    Invalidating simple timer 
    default 09:16:30.222699 +0400   apsd    Scheduling a wake for date  leeway 0 wake identifier 
    default 09:16:30.224084 +0400   apsd    Wake schedule for ''() completed for [] (took 0.002 seconds; result code 0)
    default 09:16:30.225070 +0400   apsd    Canceling system wake for simpletimer [2019-12-12 09:26:50 +0400]
    default 09:16:30.225159 +0400   apsd    Request to schedule wake 0 date 2019-12-12 09:26:50 +0400 leeway 0 service identifier com.apple.apsd(sandbox.push.apple.com)-NonCellular unique identifier 
    default 09:16:30.225385 +0400   apsd    APSCourier  adjusting connection. Connected on 0 interfaces. Current link quality: 
    default 09:16:30.225498 +0400   apsd    Disabling power monitoring for  - 5 timers
    default 09:16:30.225646 +0400   apsd     canUseProxy? NO deviceConfiguration NO  isNearby NO
    default 09:16:30.225720 +0400   apsd     calling _connectStream with interface preference NonCellular
    default 09:16:30.225800 +0400   apsd     attempting to _connectStream. currently onInterface None consecutiveFailures 24 preference NonCellular shouldUseDualChannel YES. Connected on 0 interfaces.
    default 09:16:30.225869 +0400   apsd    _getClientIdentity: already had identity: 
    default 09:16:30.225929 +0400   apsd     _connectStream - Stopping the connectionManager on our attemptInterface NonCellular
    default 09:16:30.225990 +0400   apsd    PCConnectionManager was stopped by client
    default 09:16:30.226047 +0400   apsd    : isWWANUsable NO  isWiFiUsable YES onInterface NonCellular
    default 09:16:30.226112 +0400   apsd    : enableNonCellularConnections changed to YES
    default 09:16:30.226165 +0400   apsd     Opening stream on interface NonCellular
    default 09:16:30.226214 +0400   apsd    Cancelling scheduled wake for  wake identifier 
    default 09:16:30.226560 +0400   apsd    Opening  with environment [development]
    default 09:16:30.226659 +0400   apsd    loadConfigurationForEnvironment:  development interface: NonCellular
    default 09:16:30.227135 +0400   apsd    Task . resuming, QOS(0x15) Voucher (null)
    default 09:16:30.227218 +0400   apsd    Wake cancel for ''() completed for [] (took 0.002 seconds; result code 0)
    default 09:16:30.227330 +0400   apsd    Opening stream onInterface: NonCellular, development
    default 09:16:30.227496 +0400   apsd    : Connecting courier stream using configuration bag at  and port TCP 443
    default 09:16:30.227752 +0400   apsd    Closing  with environment [development]
    default 09:16:30.227837 +0400   apsd    Task . {strength 0, tls 4, ct 0, sub 0, sig 1, ciphers 0, bundle 1, builtin 0}
    default 09:16:30.228815 +0400   apsd    Connection 1508: enabling TLS
    default 09:16:30.228964 +0400   apsd    Connection 1508: starting, TC(0x0)
    default 09:16:30.229353 +0400   apsd    [C1508 F67A490F-3214-41AE-AC96-0CD52FC88397 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] start
    default 09:16:30.230101 +0400   symptomsd   NBSM: received symptom that apsd is failing on WiFi in state: idle
    default 09:16:30.231119 +0400   apsd    nw_connection_report_state_with_handler_on_nw_queue [C1508] reporting state preparing
    default 09:16:30.231365 +0400   mDNSResponder   [R80993] DNSServiceCreateConnection START PID[99](apsd)
    default 09:16:30.231620 +0400   mDNSResponder   [R80994] DNSServiceGetAddrInfo(C000D000, 0, 0, ) START PID[99](apsd)
    default 09:16:30.232216 +0400   apsd    Task . setting up Connection 1508
    default 09:16:30.233279 +0400   mDNSResponder   [R80993] DNSServiceCreateConnection STOP PID[99](apsd)
    default 09:16:30.233462 +0400   mDNSResponder   [R80994] DNSServiceGetAddrInfo() STOP PID[99](apsd)
    default 09:16:30.233983 +0400   apsd    nw_connection_report_state_with_handler_on_nw_queue [C1508] reporting state failed error DNS Error: NoSuchRecord
    error   09:16:30.234066 +0400   apsd    Connection 1508: received failure notification
    error   09:16:30.234124 +0400   apsd    Connection 1508: failed to connect 12:8, reason -1
    error   09:16:30.234179 +0400   apsd    Connection 1508: encountered error(12:8)
    default 09:16:30.234443 +0400   apsd    Connection 1508: is being canceled
    default 09:16:30.234525 +0400   apsd    Connection 1508: summary for unused connection {protocol="(null)", domain_lookup_duration_ms=0, connect_duration_ms=0, secure_connection_duration_ms=0, idle_duration_ms=0}
    default 09:16:30.234584 +0400   apsd    [C1508 F67A490F-3214-41AE-AC96-0CD52FC88397 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] cancel
    default 09:16:30.234681 +0400   apsd    [C1508 Hostname#45fde594:443 tcp, url hash: f51ce5f3, tls] cancelled

解决方案

Encountered a similar situation where no push was arriving, and dns errors were logged when querying sandox.push.apple.com

A fix was to change the phones to use an alternative DNS like Google (8.8.8.8) or Cloudflare (1.1.1.1) in the wifi settings.

这篇关于APNS 连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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