0

I am getting following error while running socket implementation with nodejs and java events.js:160 throw er; // Unhandled 'error' event ^

     Error: connect ECONNREFUSED 127.0.0.1:8081
     at Object.exports._errnoException (util.js:1020:11)
     at exports._exceptionWithHostPort (util.js:1043:20)
     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)

1 Answers1

1

You're trying to connect to localhost: 8081. Is any service running on your localhost and on this port? If not, the connection is refused which cause this error. I would suggest checking if there is anything running on localhost:8081 first.

Jijo Paulose
  • 1,896
  • 18
  • 20