shardeum / bug-reporting

59 stars 35 forks source link

fetch-network-data.js 109 #444

Open osamaalawnah opened 1 year ago

osamaalawnah commented 1 year ago

on GUI, all tabs return the same error: "Sorry, something went wrong. Please report this issue to our support team so we can investigate and resolve the problem."

and then try to pull node status "operator-cli status": /home/node/app/cli/build/src/utils/fetch-network-data.js 109 throw new error (unable to fetch data from network (out of retries: #${reason})

rafalbujak commented 1 year ago

I have this same issue ` operator-cli status AxiosError: connect ECONNREFUSED 45.33.44.51:4000 at AxiosError.from (/home/node/app/cli/node_modules/axios/dist/node/axios.cjs:789:14) at RedirectableRequest.handleRequestError (/home/node/app/cli/node_modules/axios/dist/node/axios.cjs:2744:25) at RedirectableRequest.emit (node:events:525:35) at eventHandlers. (/home/node/app/cli/node_modules/follow-redirects/index.js:14:24) at ClientRequest.emit (node:events:513:28) at Socket.socketErrorListener (node:_http_client:502:9) at Socket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { port: 4000, address: '45.33.44.51', syscall: 'connect', code: 'ECONNREFUSED', errno: -111, config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 2000, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: AxiosHeaders { Accept: 'application/json, text/plain, /', 'User-Agent': 'axios/1.2.2', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'get', url: 'http://45.33.44.51:4000/nodelist', 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,

},
_events: [Object: null prototype] {
  response: [Function: handleResponse],
  error: [Function: handleRequestError],
  socket: [Array]
},
_eventsCount: 3,
_maxListeners: undefined,
_options: {
  maxRedirects: 21,
  maxBodyLength: Infinity,
  protocol: 'http:',
  path: '/nodelist',
  method: 'GET',
  headers: [Object: null prototype],
  agents: [Object],
  auth: undefined,
  beforeRedirect: [Function: dispatchBeforeRedirect],
  beforeRedirects: [Object],
  hostname: '45.33.44.51',
  port: '4000',
  agent: undefined,
  nativeProtocols: [Object],
  pathname: '/nodelist'
},
_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,
  strictContentLength: false,
  _contentLength: 0,
  _hasBody: true,
  _trailer: '',
  finished: true,
  _headerSent: true,
  _closed: false,
  socket: [Socket],
  _header: 'GET /nodelist HTTP/1.1\r\n' +
    'Accept: application/json, text/plain, */*\r\n' +
    'User-Agent: axios/1.2.2\r\n' +
    'Accept-Encoding: gzip, compress, deflate, br\r\n' +
    'Host: 45.33.44.51:4000\r\n' +
    'Connection: close\r\n' +
    '\r\n',
  _keepAliveTimeout: 0,
  _onPendingData: [Function: nop],
  agent: [Agent],
  socketPath: undefined,
  method: 'GET',
  maxHeaderSize: undefined,
  insecureHTTPParser: undefined,
  joinDuplicateHeaders: undefined,
  path: '/nodelist',
  _ended: false,
  res: null,
  aborted: false,
  timeoutCb: null,
  upgradeOrConnect: false,
  parser: null,
  maxHeadersCount: null,
  reusedSocket: false,
  host: '45.33.44.51',
  protocol: 'http:',
  _redirectable: [Circular *1],
  [Symbol(kCapture)]: false,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(kNeedDrain)]: false,
  [Symbol(corked)]: 0,
  [Symbol(kOutHeaders)]: [Object: null prototype],
  [Symbol(errored)]: null,
  [Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://45.33.44.51:4000/nodelist',
_timeout: null,
[Symbol(kCapture)]: false

}, cause: Error: connect ECONNREFUSED 45.33.44.51:4000 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '45.33.44.51', port: 4000 } } /home/node/app/cli/build/src/utils/fetch-network-data.js:132 throw new Error('Unable to fetch list of nodes in the network'); ^

Error: Unable to fetch list of nodes in the network at getNewActiveNode (/home/node/app/cli/build/src/utils/fetch-network-data.js:132:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fetchDataFromNetwork (/home/node/app/cli/build/src/utils/fetch-network-data.js:67:9) at async fetchStakeParameters (/home/node/app/cli/build/src/utils/fetch-network-data.js:302:25) at async Promise.all (index 0) at async /home/node/app/cli/build/src/node-commands.js:178:153

Node.js v18.16.1 `

HayattiQ commented 1 year ago

I have same issue. Does anyone fix?

jhermann9 commented 9 months ago

Same issue here did anyone manage to fix ?

chewkaibin commented 9 months ago

same issue

bluntman001 commented 9 months ago

Same issue here

node@06a7fce88dc8:~/app$ operator-cli status /home/node/app/cli/build/src/utils/fetch-network-data.js:109 throw new Error(Unable to fetch data from network (out of retries: ${reason}).); ^

Error: Unable to fetch data from network (out of retries: status 500). at fetchDataFromNetwork (/home/node/app/cli/build/src/utils/fetch-network-data.js:109:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fetchStakeParameters (/home/node/app/cli/build/src/utils/fetch-network-data.js:296:25) at async Promise.all (index 0) at async /home/node/app/cli/build/src/node-commands.js:221:153

Node.js v18.16.1