Analysis Node.js Connect econnrefused Error _ Basic knowledge

Source: Internet
Author: User

I recently encountered this error in my Mac development when preparing Angularjs +node.js demo, 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, the solution was found in StackOverflow, which was mainly due to the fact that the last Node.js server process was still running and did not shut down, so we need to kill this process, on the Mac to:

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

From the output you can see the process PID7668 in use, so we have to kill this stubborn molecule and run kill-9 7668. Ok, one key to fix, you can restart the server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.