Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9259309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:37:34+00:00 2026-06-18T12:37:34+00:00

I have started a Node server through the plugin of an IDE. Unfortunately, I

  • 0

I have started a Node server through the plugin of an IDE. Unfortunately, I cannot use the IDE’s terminal. So I tried to run the script from the command line.

This is the problem – I am using the Express module and my app is listening some port (8080). When I start the app from the command line, it throws this error:

events.js:71
    throw arguments[1]; // Unhandled 'error' event
                   ^
Error: listen EADDRINUSE
    at errnoException (net.js:770:11)
    at HTTPServer.Server._listen2 (net.js:910:14)
    at listen (net.js:937:10)
    at HTTPServer.Server.listen (net.js:986:5)
    at Object.<anonymous> (C:\xampp\htdocs\node\chat\app.js:5:5)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)

Even though I am not very sure what this error could be I assumed that it’s because the app is listening on a port which is already in use. So I did:

netstat -an

I can see

TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING

It’s because the Node server is already started when I tried to start it from the IDE.

So I want to know, how can I stop all server instances? Also if you can tell me how to detect what’s running on a port and kill it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:37:35+00:00Added an answer on June 18, 2026 at 12:37 pm

    Windows Machine:

    Need to kill a Node.js server, and you don’t have any other Node processes running, you can tell your machine to kill all processes named node.exe. That would look like this:

    taskkill /im node.exe
    

    And if the processes still persist, you can force the processes to terminate by adding the /f flag:

    taskkill /f /im node.exe
    

    If you need more fine-grained control and need to only kill a server that is running on a specific port, you can use netstat to find the process ID, then send a kill signal to it. So in your case, where the port is 8080, you could run the following:

    C:\>netstat -ano | find "LISTENING" | find "8080"
    

    The fifth column of the output is the process ID:

      TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       14828
      TCP    [::]:8080              [::]:0                 LISTENING       14828
    

    You could then kill the process with taskkill /pid 14828. If the process refuses to exit, then just add the /f (force) parameter to the command.


    MacOS machine:

    The process is almost identical. You could either kill all Node processes running on the machine:

    killall node
    

    Or also as alluded to in @jacob-groundwater’s answer below using lsof, you can find the PID of a process listening on a port (pass the -i flag and the port to significantly speed this up):

    $ lsof -Pi :8080
    COMMAND   PID      USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
    node     1073    urname   22u  IPv6  bunchanumbershere      0t0  TCP *:8080 (LISTEN)
    

    The process ID in this case is the number underneath the PID column, which you could then pass to the kill command:

    $ kill 1073
    

    If the process refuses to exit, then just use the -9 flag, which is a SIGTERM and cannot be ignored:

    $ kill -9 1073
    

    Linux machine:

    Again, the process is almost identical. You could either kill all Node processes running on the machine (use -$SIGNAL if SIGKILL is insufficient):

    killall node
    

    Or also using netstat, you can find the PID of a process listening on a port:

    $ netstat -nlp | grep :8080
    tcp        0      0 0.0.0.0:8080         0.0.0.0:*                   LISTEN      1073/node
    

    The process ID in this case is the number before the process name in the sixth column, which you could then pass to the kill command:

    $ kill 1073
    

    If the process refuses to exit, then just use the -9 flag, which is a SIGTERM and cannot be ignored:

    $ kill -9 1073
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Node server which I would like to debug. Once I've started
Recently I have started working with node.js. While going through a requirement in one
I have installed node.js and necessary packages to run browserquest . I have started
I have just started studying node.js and express, the documentation of express on the
I have started to try out to use the new Search API, the demo
I have started implementing Subscriptions into my app but I cannot get the API
I have started using WSO2 Stratos live and started using WSO2 data services server.
Just started to play around with node.js, have some past experience with JavaScript but
I have a very basic node script that starts up, serving up an html
total node.js noobie, started playing with demo codes from various tutorials and websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.