No available port to bind to in range JBoss EAP 7

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7

Issue

  • No available port to bind to in range and application not starting on slave of domain in JBoss EAP 7.
    • Application not starting on slave of domain. Infinispan error.
Caused by: java.net.BindException: No available port to bind to in range [57705 .. 57755]
    at org.jgroups.util.Util.createServerSocket(Util.java:3472) [jgroups-3.2.18.Final-redhat-1.jar:3.2.18.Final-redhat-1]
    at org.jgroups.protocols.FD_SOCK.startServerSocket(FD_SOCK.java:568) [jgroups-3.2.18.Final-redhat-1.jar:3.2.18.Final-redhat-1]
  • The JBoss EAP shutdown did not kill.
ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 84) MSC000001: Failed to start service jboss.infinispan.web.global-component-registry: org.jboss.msc.service.StartException in service jboss.infinispan.web.global-component-registry: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport
...
Caused by: java.lang.IllegalArgumentException: failed to start server socket
    at org.jgroups.protocols.FD_SOCK.down(FD_SOCK.java:308) [jgroups-3.2.18.Final-redhat-1.jar:3.2.18.Final-redhat-1]
...
Caused by: java.net.BindException: No available port to bind to in range [57705 .. 57755]
    at org.jgroups.util.Util.createServerSocket(Util.java:3472) [jgroups-3.2.18.Final-redhat-1.jar:3.2.18.Final-redhat-1]

Resolution

Search for orphan processes in the slave since the last JBoss EAP reboot that the JBoss EAP shutdown has not eliminated. They could be occupying the range ports. Kill these processes and restart JBoss EAP solved the problem.

Diagnostic Steps

  • Look for a failed connection to the network layer.
  • Check if something else is blocking at the OS layer.
  • Execute ' netstat -natupd' to identify which ports are in use by which process.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments