Analyze node. js connect econnrefused errors

Source: Internet
Author: User
Tags node server

Recently I encountered this error in my Mac development when preparing angularjs + node. js demo, as shown below:

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, find a solution in stackoverflow. This is mainly because the last node. js server process is still running and not closed, so we need to kill the process and run it on Mac:

PS aux | grep Node

Twer 7668 4.3 1.0 42060 10708 pts/1 SL + node Server

Twer 7749 0.0 0.0 4384 832 pts/8 S + grep -- color = auto Node

From the output, we can see that the pid7668 process is in use. Therefore, we must kill this stubborn molecule and run kill-9 7668. OK. You can restart the server with one click.

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.