Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 443
gmhk Avatar asked May 05 '10 11:05

gmhk


People also ask

What is JVM_Bind?

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.

Can't start Jetty server on port address already in use BIND?

Causes. This indicates that the Jetty web server was unable to start because one of the configured ports was already in use by the operating system. The default ports used by Jetty are ports 80, 443 and 8443. If any of these ports are already in use Jetty will not start.

What is bind exception in Java?

Class BindException Signals that an error occurred while attempting to bind a socket to a local address and port. Typically, the port is in use, or the requested local address could not be assigned.


1 Answers

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 
like image 109
phoenix24 Avatar answered Sep 19 '22 22:09

phoenix24