Node. js connect ECONNREFUSED error solution, connecteconnrefused

Source: Internet
Author: User
Tags node server

Node. js connect ECONNREFUSED error solution, connecteconnrefused

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.

Thanks for your support for this site!

Related Article

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.