JBoss Fuse Jetty port conflict can cause the container to hang

Solution Verified - Updated -

Issue

  • JBoss Fuse Jetty port conflict can cause the container to hang:

The following may occur when the container is attempted to be started:

jboss-fuse-6.0.0.redhat-024 jsherman$ ./bin/fuse
Please wait while JBoss Fuse is loading...
 59% [==========================================> 

The startup never completes and the console is never presented.

In the logs of the ESB you might see the following error repeated through the log set:

19:35:31,062 | WARN  | tor@0.0.0.0:8181 | AbstractConnector                | 90 - org.eclipse.jetty.util - 7.6.7.v20120910 | 
java.nio.channels.NotYetBoundException
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:137)[:1.6.0_35]
    at org.eclipse.jetty.server.nio.SelectChannelConnector.accept(SelectChannelConnector.java:109)[84:org.eclipse.jetty.server:7.6.7.v20120910]
    at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:938)[84:org.eclipse.jetty.server:7.6.7.v20120910]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[90:org.eclipse.jetty.util:7.6.7.v20120910]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[90:org.eclipse.jetty.util:7.6.7.v20120910]
    at java.lang.Thread.run(Thread.java:662)[:1.6.0_35]

This is actually caused by the following error which might have been overwritten if the logs have rolled:

17:20:00,169 | WARN  | b Runtime worker | AbstractLifeCycle                | 90 - org.eclipse.jetty.util - 7.6.7.v20120910 | FAILED SelectChannelConnector@0.0.0.0:8181: java.net.BindException: Address already in use
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind(Native Method)[:1.6.0_45]
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124)[:1.6.0_45]
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)[:1.6.0_45]
    at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)[84:org.eclipse.jetty.server:7.6.7.v20120910]
    at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)[84:org.eclipse.jetty.server:7.6.7.v20120910]
    at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)[84:org.eclipse.jetty.server:7.6.7.v20120910]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[90:org.eclipse.jetty.util:7.6.7.v20120910]
    at org.eclipse.jetty.server.Server.doStart(Server.java:286)[84:org.eclipse.jetty.server:7.6.7.v20120910]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[90:org.eclipse.jetty.util:7.6.7.v20120910]
    at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.start(JettyServerImpl.java:113)[98:org.ops4j.pax.web.pax-web-jetty:1.1.11]
    at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Stopped.start(ServerControllerImpl.java:378)[98:org.ops4j.pax.web.pax-web-jetty:1.1.11]
    at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.start(ServerControllerImpl.java:70)[98:org.ops4j.pax.web.pax-web-jetty:1.1.11]
    at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Unconfigured.configure(ServerControllerImpl.java:635)[98:org.ops4j.pax.web.pax-web-jetty:1.1.11]
    at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.configure(ServerControllerImpl.java:87)[98:org.ops4j.pax.web.pax-web-jetty:1.1.11]
    at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:244)[100:org.ops4j.pax.web.pax-web-runtime:1.1.11]
    at org.ops4j.pax.web.service.internal.Activator$DynamicsServiceTrackerCustomizer$1.run(Activator.java:372)[100:org.ops4j.pax.web.pax-web-runtime:1.1.11]
    at org.ops4j.pax.web.service.internal.Executor$Future.run(Executor.java:45)[100:org.ops4j.pax.web.pax-web-runtime:1.1.11]
    at org.ops4j.pax.web.service.internal.Executor$Worker.run(Executor.java:122)[100:org.ops4j.pax.web.pax-web-runtime:1.1.11]

Other symptoms of this issue included bundles not starting, specifically the Fabric bundles which prevent a Fabric environment from being created:

JBossFuse:karaf@root> osgi:list | grep -i fabric
[  53] [Active     ] [            ] [       ] [   35] Fuse Fabric :: LinkedIn ZooKeeper Bundle (7.2.0.redhat-024)
[  55] [Active     ] [GracePeriod ] [       ] [   35] Fuse Fabric :: ZooKeeper Service (7.2.0.redhat-024)
[  57] [Active     ] [GracePeriod ] [       ] [   40] Fuse Fabric :: Core (7.2.0.redhat-024)
[  59] [Installed  ] [            ] [       ] [   45] Fuse Fabric :: Boot Commands (7.2.0.redhat-024)
[  70] [Installed  ] [            ] [       ] [   60] Fuse Fabric :: Core Agent SSH (7.2.0.redhat-024)
[ 101] [Installed  ] [            ] [       ] [   60] Fuse Fabric :: Maven Proxy (7.2.0.redhat-024)
[ 127] [Installed  ] [            ] [       ] [   60] Fuse Fabric :: Cluster Groups API (7.2.0.redhat-024)
[ 128] [Installed  ] [            ] [       ] [   60] JBoss A-MQ Fabric (6.0.0.redhat-024)
JBossFuse:karaf@root>
JBossFuse:karaf@root> fabric:create
Command not found: fabric:create

Environment

  • JBoss Fuse
    • 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content