Windows http://localhost Port Conflict

I was trying to deploy a webpage on my Windows laptop using http://localhost:8888 but kept running into funky errors  – javascript libraries weren’t loading and the user interface wasn’t responding correctly. I stopped the local server (a Google App Engine app) and the following Error Echo Service page was displayed:

Since this wasn’t the Oops! could not connect to localhost page, I deduced that another app is running on port 8888. I didn’t have any clue what it could be or how to stop it so I Googled it and here’s the resolution:

  1. Locate the Command Prompt shortcut on your Windows PC (default is C:\Users\YourName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools)
  2. Right-Click on the shortcut -> Run As Administrator -> Select OK in the prompt
  3. Type netstat -> hit Enter
  4. You should be shown all active connection including port numbers. See if the port is being used
  5. If the port is being used type netstat -bano -> hit Enter
  6. A very detailed list of the active connections will now be shown including that applications using them.
  7. Note that localhost:8888 will be listed as, and then find the application that is using that port.
  8. Now open the Task Manager (ctrl + alt + delete) -> locate the application -> select End Task
  9. Open a web browser -> enter http://localhost:8888 as the web address -> you should see the default Oops! could not connect to localhost page
  10. Try to run your local webpage server again

Note: If you prefer a GUI, which I certainly do, then download the following instead of using the Command Prompt:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s