-
Story
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Acceptor display started = true on the management API (or in HawtIO) even if it fails to start.
Steps to reproduce
1. Set the port for an acceptor to a port that is already in use. The objective is to cause the acceptor to throw a BindException. For example, set the mqtt acceptor port to 22.
<acceptor name="mqtt">tcp://0.0.0.0:1883?protocols=MQTT</acceptor>
2. Start the broker.
3. Check that there is a BindException on the logs (this is expected).
16:44:54,015 ERROR [org.apache.activemq.artemis.core.server] AMQ224000: Failure in initialisation: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method) [rt.jar:1.8.0_121]
at sun.nio.ch.Net.bind(Net.java:433) [rt.jar:1.8.0_121]
at sun.nio.ch.Net.bind(Net.java:425) [rt.jar:1.8.0_121]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) [rt.jar:1.8.0_121]
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:127) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:554) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1258) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:511) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:496) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:980) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:250) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:363) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:440) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873) [netty-all-4.1.5.Final-redhat-1.jar:4.1.5.Final-redhat-1]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
4. Check the status of the acceptor using the HawtIO UI or the management interface.
curl -u admin:admin http://host:8161/jolokia/read/org.apache.activemq.artemis:broker=\"0.0.0.0\",component=acceptors,name=\"mqtt\"/Started
The return will be similar to this:
{
"request":Unknown macro: { "mbean"},
"value": true,
"timestamp": 1490283442,
"status": 200
}
The value display true for the acceptor status even if it failed to start.