简体   繁体   中英

node js server ECONNREFUSED error

I am running a server with node js on 127.0.0.1:3000. As I run the server I come up with the following error. When I enter the ip address in the browser, the first page of my website is shown and then this error happens and the server seems to stop working. here is the error I get:

SSR error occured, falling back to bundled application instead { FetchError: request to https://api.steemit.com failed, reason: connect ECONNREFUSED 10.10.34.35:443
    at ClientRequest.<anonymous> (C:\Users\sara\Desktop\New folder\busy\node_modules\node-fetch\index.js:133:11)
    at ClientRequest.emit (events.js:160:13)
    at TLSSocket.socketErrorListener (_http_client.js:389:9)
    at TLSSocket.emit (events.js:160:13)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at process._tickCallback (internal/process/next_tick.js:152:19)
  name: 'FetchError',
  message: 'request to https://api.steemit.com failed, reason: connect ECONNREFUSED 10.10.34.35:443',
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED' }
events.js:137
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 10.10.34.35:443
    at Object._errnoException (util.js:1003:13)
    at _exceptionWithHostPort (util.js:1024:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1195:14)

By the paths in your log I can guess that you're using windows. You should probably try to deactivate any firewall you might be running in your PC at the moment.

Another good practice I recommend is to use a virtual machine with any linux distro or a docker container to run your local projects. This way its highly likely you will avoid weird errors like this one.

Eventually it seems you're doing an external request to an external API, so its likely you will need an API key in order to be allowed to fetch the response you're requesting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM