Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Resolving Exceptions: ''java.net.BindException: Address Already in Use''

DZone's Guide to

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.

· Integration Zone ·
Free Resource

The Future of Enterprise Integration: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

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!

Make your mark on the industry’s leading annual report. Fill out the State of API Integration 2019 Survey and receive $25 to the Cloud Elements store.

Topics:
exceptions ,mule esb ,integration

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}