Search code examples
javaweb-applicationsjbossip-addressstruts

Address already in use: JVM_Bind java


Some times whenever I restart the application, which is built on Java, Struts, Mysql, and Jboss 4.05 Version I get the error as Address already in use: JVM_Bind

Only fix that I know is to restart the machine and try again, it will work. Else Some times I do Ctrl-Alt-Del and Stop all the process related to Java, some times this also works.

But what is the exact reason and how can we prevent this problem?


Solution

  • Address already in use: JVM_Bind means that some other application is already listening on the port your current application is trying to bind.

    What you need to do is, either change the port for your current application or better just find out the already running application and kill it.

    on Linux you can find the application pid by using,

    netstat -tulpn