Resolving Exceptions: ''java.net.BindException: Address Already in Use''
The reason behind the error is that some other application is already running with the same port. You cannot run the current application with the same port.
Join the DZone community and get the full member experience.
Join For FreeWhen you run the Mule application in Anypoint Studio or deploy Mule application in Mule Runtime, it is common to get the following error:
ERROR 2016-09-0522:17:57,070 [main] org.mule.module.launcher.application.DefaultMuleApplication:
********************************************************************************
Message : Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig@7c1503a3
Element : /HTTP_Listener_Configuration @ app:bindingerrortesting.xml:9 (HTTP Listener Configuration)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
The reason behind the error is that some other application is already running with the same port. You cannot run the current application with the same port.
If you are using Windows OS, then go to the command prompt and run the following command:
netstat -a -n -p tcp -b
This will list all services running, protocols used, and other details.
If needed, stop the other application that is running on the same port. If possible, change your application’s port number. If multiple Mule applications need to run on the same host and port, then use Domain Project and create listener and request configurations in the domain project and let your apps support the domain project. This will fix the binding clashes.
Hope this helps!
Published at DZone with permission of Akkiraju Ivaturi. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments