APIConnectionError:Connect timeout. Please retry later.

error
标签: #<Tag:0x00007fb83f16d948>

(都市烟火) #1

项目按照tag进行推送以前是好的,现在突然报错:Connect timeout. Please retry later。看了下社区中同样的问题还是没解决。可以排除一下问题:

  • 网络,端口等问题
  • timeout也已经设置
  • 除了生成client的时候指定了:retryTimes,在程序中我们也做了retry操作

业务代码就是node.js sdk中提供的例子代码,由于需要全员推送的数据量大,这里我们只是间隔推送部分tag,但没有达到同时推送tag的限制。但是最终还是出现了APIConnectionError:Connect timeout. Please retry later.问题。
log如下:

    [broadcastByTag]: reject error:  { Error
    at new APIConnectionError (/app/yanxuan/tc-node-backend/node_modules/jpush-sdk/lib/JPush/JPushError.js:13:17)
    at Request._callback (/app/yanxuan/tc-node-backend/node_modules/jpush-sdk/lib/JPush/JPush.js:281:25)
    at self.callback (/app/yanxuan/tc-node-backend/node_modules/jpush-sdk/node_modules/request/request.js:186:22)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at ClientRequest.<anonymous> (/app/yanxuan/tc-node-backend/node_modules/jpush-sdk/node_modules/request/request.js:781:16)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at ClientRequest.emit (events.js:208:7)
    at TLSSocket.emitTimeout (_http_client.js:711:34)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at TLSSocket.emit (events.js:208:7)
    at TLSSocket.Socket._onTimeout (net.js:420:8)
    at ontimeout (timers.js:482:11)
    at tryOnTimeout (timers.js:317:5)
    at Timer.listOnTimeout (timers.js:277:5)
  name: 'APIConnectionError',
  message: 'Connect timeout. Please retry later.',
  isResponseTimeout: false,
  stack: 'Error\n    at new APIConnectionError (/app/yanxuan/tc-node-backend/node_modules/jpush-sdk/lib/JPush/JPushError.js:13:17)\n    at Request._callback (/app/yanxuan/tc-node-backend/node_modules/jpush-sdk/lib/JPush/JPush.js:281:25)\n    at self.callback (/app/yanxuan/tc-node-backend/node_modules/jpush-sdk/node_modules/request/request.js:186:22)\n    at emitOne (events.js:116:13)\n    at Request.emit (events.js:211:7)\n    at ClientRequest.<anonymous> (/app/yanxuan/tc-node-backend/node_modules/jpush-sdk/node_modules/request/request.js:781:16)\n    at Object.onceWrapper (events.js:313:30)\n    at emitNone (events.js:106:13)\n    at ClientRequest.emit (events.js:208:7)\n    at TLSSocket.emitTimeout (_http_client.js:711:34)\n    at Object.onceWrapper (events.js:313:30)\n    at emitNone (events.js:106:13)\n    at TLSSocket.emit (events.js:208:7)\n    at TLSSocket.Socket._onTimeout (net.js:420:8)\n    at ontimeout (timers.js:482:11)\n    at tryOnTimeout (timers.js:317:5)\n    at Timer.listOnTimeout (timers.js:277:5)' }

希望官网能给出其他的解决方式。谢谢


#2

超时问题与网络有关系,根据本帖的排查步骤排查并给出排查结果


(都市烟火) #3

你说的那些,我上面说了,网络问题,以及端口相关问题已经排除。不可能有的可以有的不行吧?


#4

超时问题最主要的原因就是网络相关的。如果网络、端口等帖子中提到的都真的没问题,那就不会有报错产生

如果是 偶现,则更有可能与网络的波动有关。失败了重试即可

极小的可能是推送时你们解析我们域名得到的 IP 是已经被弃用的


(都市烟火) #5

我们具体在查一下,谢谢啊