Friday, February 21, 2014

Fixing java.net.BindException: Cannot assign requested address: JVM_Bind in Tomcat, Jetty

Some of the most dreaded error in Java based client server based application is networking related error, e.g. java.net.BindException: Cannot assign requested address: JVM_Bind. I have faced this issue, while working with web servers like Tomcat, Jetty, and Weblogic before, but yesterday it came again, when one of my colleague faced this issue in Windows. As soon as Java programmers sees java.net.BindException, they come to conclusion that it's issue with two process listening on same port, and often mistook it for Java.net.BindException: Address already in use: JVM_Bind:8080, which is slightly different than this. If you look Java documentation for java.net.BindExcpetion, you will find this "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." It's the second part, which is more interesting in case of java.net.BindException: Cannot assign requested address: JVM_Bind.
Read more �

No comments:

Post a Comment