EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.28k stars 3.6k forks source link

getaddrinfo error #4310

Closed jeaimetu closed 6 years ago

jeaimetu commented 6 years ago

I tried to use get block info on eosjs. But sometime it showed following errors. To resolve this, I think eosjs need to implement DNS cache or other workaround. Even I can handle getBlock error, it continuously shows same error. So it does not have critical meaning.

As I contact the admin of EOS calgary server, he also said "there was no request log on the server". It makes sense because error reason is DNS look up error.

Error Message

{ FetchError: request to http://mainnet.eoscalgary.io/v1/chain/get_info failed, reason: getaddrinfo ENOTFOUND mainnet.eoscalgary.io mainnet.eoscalgary.io:80 2018-06-25T02:03:31.991090+00:00 app[web.1]: at ClientRequest. (/app/node_modules/node-fetch/index.js:133:11) 2018-06-25T02:03:31.991092+00:00 app[web.1]: at emitOne (events.js:116:13) 2018-06-25T02:03:31.991093+00:00 app[web.1]: at ClientRequest.emit (events.js:211:7) 2018-06-25T02:03:31.991095+00:00 app[web.1]: at Socket.socketErrorListener (_http_client.js:387:9) 2018-06-25T02:03:31.991097+00:00 app[web.1]: at emitOne (events.js:116:13) 2018-06-25T02:03:31.991099+00:00 app[web.1]: at Socket.emit (events.js:211:7) 2018-06-25T02:03:31.991101+00:00 app[web.1]: at emitErrorNT (internal/streams/destroy.js:64:8) 2018-06-25T02:03:31.991102+00:00 app[web.1]: at _combinedTickCallback (internal/process/next_tick.js:138:11) 2018-06-25T02:03:31.991104+00:00 app[web.1]: at process._tickCallback (internal/process/next_tick.js:180:9) 2018-06-25T02:03:31.991106+00:00 app[web.1]: name: 'FetchError', 2018-06-25T02:03:31.991108+00:00 app[web.1]: message: 'request to http://mainnet.eoscalgary.io/v1/chain/get_info failed, reason: getaddrinfo ENOTFOUND mainnet.eoscalgary.io mainnet.eoscalgary.io:80', 2018-06-25T02:03:31.991109+00:00 app[web.1]: type: 'system', 2018-06-25T02:03:31.991111+00:00 app[web.1]: errno: 'ENOTFOUND', 2018-06-25T02:03:31.991113+00:00 app[web.1]: code: 'ENOTFOUND' } 2018-06-25T02:03:31.991392+00:00 app[web.1]: (node:20) UnhandledPromise

jeaimetu commented 6 years ago

I choose wrong board. So I moved this to eosjs and close this.