Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Error processing your request: AxiosError: connect ETIMEDOUT 151.101.86.217:443 #33

Open
astef-trilogy opened this issue Jul 15, 2022 · 0 comments

Comments

@astef-trilogy
Copy link

Brief bug description

I was exporting the backup using CLI on Windows 10, node v16.13.2: npx kbm --config=backup-config.json

Suddenly, in the middle of that, process crashed with error:

<...>
Exported: ***** | languageVariant
Exported: ***** | languageVariant
There was an error processing your request:  AxiosError: connect ETIMEDOUT 151.101.86.217:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
  port: 443,
  address: '151.101.86.217',
  syscall: 'connect',
  code: 'ETIMEDOUT',
  errno: -4039,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function] },
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, */*',
      'X-KC-SDKID': 'npmjs.com;@kontent-ai/management-sdk;3.0.0',
      authorization: 'bearer *****',
      'User-Agent': 'axios/0.27.2'
    },
    method: 'get',
    url: 'https://manage.kontent.ai/v2/projects/*****/items/*****/variants',
    data: undefined
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'https:',
      path: '/v2/projects/*****/items/*****/variants',
      method: 'GET',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'manage.kontent.ai',
      port: null,
      nativeProtocols: [Object],
      pathname: '/v2/projects/*****/items/*****/variants'
    },
    _ended: true,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 0,
    _requestBodyBuffers: [],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'GET /v2/projects/*****/items/*****/variants HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'X-KC-SDKID: npmjs.com;@kontent-ai/management-sdk;3.0.0\r\n' +
        'authorization: bearer *****' +
        'User-Agent: axios/0.27.2\r\n' +
        'Host: manage.kontent.ai\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/v2/projects/*****/items/*****/variants',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'manage.kontent.ai',
      protocol: 'https:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    _currentUrl: 'https://manage.kontent.ai/v2/projects/*****/items/*****/variants',
    [Symbol(kCapture)]: false
  }
}

I repeated same operation multiple times, and each time it failed, but for a different object. There was no long waiting before throwing (compared to usual frequencies of successful logs). After some time, repeating the same operation succeeded without any changes from my side.

This SO answer suggests adding keep-alive and timeout for axios, but I had no chance to check it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant