Over a million developers have joined DZone.

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.

Today’s data climate is fast-paced and it’s not slowing down. Here’s why your current integration solution is not enough. Brought to you in partnership with Liaison Technologies.

When 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!

Is iPaaS solving the right problems? Not knowing the fundamental difference between iPaaS and iPaaS+ could cost you down the road. Brought to you in partnership with Liaison Technologies.

Topics:
exceptions ,mule esb ,integration

Published at DZone with permission of Akkiraju Ivaturi. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}