Home > Web Front-end > JS Tutorial > Analyzing Node.js connect ECONNREFUSED error_Basic knowledge

Analyzing Node.js connect ECONNREFUSED error_Basic knowledge

WBOY
Release: 2016-05-16 17:37:49
Original
1308 people have browsed it

Recently when I was preparing the Angularjs node.js demo, I encountered this error in my mac development, as follows:

events.js:71

throw arguments[1]; // Unhandled 'error' event

^

Error: connect ECONNREFUSED

at errnoException (net.js:770:11)

at Object.afterConnect [as oncomplete] (net.js:761:19)

Finally found the solution on stackoverflow. This is mainly because the node.js server process was still running and not shut down last time, so we need to kill this process. The operation on mac is:

ps aux | grep node

twer 7668 4.3 1.0 42060 10708 pts/1 Sl 20:36 0:00 node server

twer 7749 0.0 0.0 4384 832 pts/8 S 20:37 0:00 grep --color=auto node

You can see from the output that process PID7668 is in use, so we must kill this die-hard and run kill -9 7668. Ok, it’s done with one click and you can restart the server.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template