>PROBLEM
WildFly fails to start a service throwing the following message:
Caused by: java.net.BindException: Address already in use: bind
>SOLUTION
Edit the following file:
$WILDFLY_ROOTDIR\standalone\configuration\standalone.xml
$WILDFLY_ROOTDIR\standalone\configuration\standalone-full.xml
and switch the ports:
- original value:
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
- new configuration using an available port:
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9991}"/>
To check if a port is currently unavailable, use netstat command.
Example:
netstat -nao | grep 9991
If the command returns empty, the port is available (not used).
NOTE:
If using windows, you may use cygwin to make available the grep command.
No comments:
Post a Comment