Search This Blog

Monday, August 31, 2015

Fix BindException

We generally get this exception while working with tomcat,jboss or any other program when we try to run these programs on already occupied port.

To fix it, either we can change the port or we can force fully kill the running application to free the required port.

In this article , i will discuss how we can fix it by killing the already running process.

To fix it, we first need to find out the original process which has occupied the port.Once we get our process, its just a single command task to kill it.

To do so:


  • Run the command prompt in elevator mode (Administrator mode)
  1. Search cmd in the start panel and right click on it.
  2. Click on :Run as administrator to start the command prompt with administrative privileges.

Type netstat -anob | findstr "8080" and press Enter 


    • Here "8080" is the port number . Similarly to find process running on 14870, you can use netstat -anob | findstr "14870"
    • Here process id is 7884 ,displayed at last.
    • If you want to check the process name and other details about this,
      • Type tasklist /fi "pid eq 7884"
  • To forcefully kill this process, type taskkill /pid  7884 /f and press Enter.
Its done :)