Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Occassional ECONNREFUSED errors

I just got started with nodejs and using it to create a server. Clients connect to it using socket.io, receive jobs to proceess, and send the results back to the nodejs server.

However the server will crash occassionally with the following error:

node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick
          ^
Error: connect ECONNREFUSED
    at errnoException (net.js:614:11)
    at Object.afterConnect [as oncomplete] (net.js:605:18)

I have no idea what is causing this.

like image 599
Nyxynyx Avatar asked Mar 07 '26 19:03

Nyxynyx


1 Answers

ECONNREFUSED means you tried to make a connection to another machine but your connection was refused - either no one was listening or a firewall blocked you.

I have seen this using http, but I think it could also happen using straight sockets.

like image 164
ControlAltDel Avatar answered Mar 09 '26 07:03

ControlAltDel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!