Code: 141, error: 'getaddrinfo EAI_AGAIN deep-index.moralis.io'

I am getting the error quite frequent in these days. I am connecting to BSCTestnet. The error comes after calling the following. If it is related to the free plan, then it is fine. But I am worried if it it not.

const nftOwners = await Moralis.Web3API.account.getNFTsForContract(options);

Anyone has the similar issue?

1 Like

That error should not be related to free plan. It looks like it can not resolve the domain.

I’m having the same problem… what is the solution?

En error occured when trying to deploy
Error: getaddrinfo ENOTFOUND jdeuoer3pbmg.usemoralis.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'jdeuoer3pbmg.usemoralis.com',
  config: {
    url: 'https://jdeuoer3pbmg.usemoralis.com:2087/deploy',
    method: 'post',
    data: FormData {
      _overheadLength: 280,
      _valueLength: 40,
      _valuesToMeasure: [Array],
      writable: true,
      readable: true,
      dataSize: 0,
      maxDataSize: 2097152,
      pauseStreams: true,
      _released: true,
      _streams: [Array],
      _currentStream: [DelayedStream],
      _insideLoop: false,
      _pendingNext: false,
      _boundary: '--------------------------615220178201580382885543',
      _events: [Object: null prototype],
      _eventsCount: 3
    },
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'multipart/form-data; boundary=--------------------------615220178201580382885543',
      'User-Agent': 'axios/0.21.4'
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    }
  },
  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]
    },
    _eventsCount: 2,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'https:',
      path: '/deploy',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'jdeuoer3pbmg.usemoralis.com',
      port: '2087',
      nativeProtocols: [Object],
      pathname: '/deploy'
    },
    _ended: false,
    _ending: false,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 1638718,
    _requestBodyBuffers: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object]
    ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: true,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'POST /deploy HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: multipart/form-data; boundary=--------------------------615220178201580382885543\r\n' +
        'User-Agent: axios/0.21.4\r\n' +
        'Host: jdeuoer3pbmg.usemoralis.com:2087\r\n' +
        'Connection: close\r\n' +
        'Transfer-Encoding: chunked\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/deploy',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'jdeuoer3pbmg.usemoralis.com',
      protocol: 'https:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: true,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    _currentUrl: 'https://jdeuoer3pbmg.usemoralis.com:2087/deploy',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

Even when I try to work locally:

You have to check that server. It looks like it doesn’t resolve.

Why? Is it something I did on my end or Moralis? The server is active and no error messages or notifications are coming up on the UI you provide to check the server. We need more guidance… for now all I can do is start a new server and pray for the best… :disappointed_relieved:

What is the url that gives the error? You can try it directly in browser. You can check the network tab to see if there is more info.

I’m on a dev mode, so url is localhost. same problem was on the deployed app. deleting the server and creating a new solved. this is not a reassuring solution long term though.

It may have just been that server that was problematic. You can also self-host your server now so you can have finer control/debugging.