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 7428315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:43:37+00:00 2026-05-29T08:43:37+00:00

I have simple node js http server. var http = require(http); http.createServer(function(request, response) {

  • 0

I have simple node js http server.

var http = require("http");

http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.write("Hello World");
  response.end();
}).listen(8888);

If I run

node basicserver.js 

I get

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: listen EADDRINUSE
    at errnoException (net.js:642:11)
    at Array.0 (net.js:743:26)
    at EventEmitter._tickCallback (node.js:192:40)

I have seen this post, but that post seems to be specific to TCP server and not http server. Could anyone please help.

  • 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-05-29T08:43:38+00:00Added an answer on May 29, 2026 at 8:43 am

    The port you are listening to is already being listened by another process. In this case I got a feeling that it is your self. You can do a ps aux | grep node and then using kill <pid> kill your node process. Beside that you can also try another port.

    –Update–

    In case if you want to find which process is listening, you can use netstat -lpn ( -l is to find out the listening ports, -p is to include the process name and pid, -n is to not to resolve host names, or else it will be slow), to find the processes that are listening on different ports. If there was too many, you can do netstat -lnp | grep :8888.

    Also can use, fuser 8888/tcp, which will show you the process pid and also adding -k will kill the process, fastest way ever.

    I realized this two commands only work in linux.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following simple http server using Node.js: var http = require('http'); var
Okay, I have a simple test server set up using socket.io in node.js. My
I have a simple TreePanel. I would like to select a particular node upon
I have this very simple C++ class: class Tree { public: Node *head; };
I have simple form. <form target=_blank action=somescript.php method=Post id=simpleForm> <input type=hidden name=url value=http://...> <input
I implemented an http server using javascript and Node.js. for some reason when the
We have an existing SQL database, and I'm writing a node.js server that accesses
I have a simple XML document <abc:MyForm xmlns:abc='http://myform.com'> <abc:Forms> <def:Form1 xmlns:def='http://decform.com'> .... </def:Form1> <ghi:Form2
I have a pretty simple scenario. I have the following HTML: <h1>Hello</h1> <input type="button"
I have the following in my node server using Express (truncated to the important

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.