[ 
https://issues.apache.org/jira/browse/ACTIVEMQ6-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jim Gomes updated ACTIVEMQ6-106:
--------------------------------
    Attachment: TestConsumer.zip

Here is a test application that will show the problem (source code is included 
as well as compiled binary). Running it without parameters will have it connect 
a single consumer to the broker. The broker will default to the machine 
{{activemqhost}} on port {{61616}}. The command-line options are as follows:

{noformat}
TestConsumer <hostname> <port> <producer>
{noformat}

Each parameter is optional, but they must be specified in order. The third 
parameter is a boolean value tol start a producer that will send messages to 
the consumer. When a producer is used, the connection will still be kicked off, 
even though it is actively sending/receiving messages.

> OpenWire Protocol Failure with NMS Clients
> ------------------------------------------
>
>                 Key: ACTIVEMQ6-106
>                 URL: https://issues.apache.org/jira/browse/ACTIVEMQ6-106
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 6.0.0
>         Environment: Debian Linux, Java 1.8.0.20 (Server)
> Windows 7 32-bit, .NET 4.0 (Client)
>            Reporter: Jim Gomes
>            Priority: Blocker
>              Labels: NMS, OpenWire
>             Fix For: 6.0.0
>
>         Attachments: TestConsumer.zip
>
>
> When attempting to connect an NMS client via OpenWire, a client cannot 
> maintain a stable consumer connection. After connecting a client for a short 
> while, the client will send the KeepAlive messages. However, it gets kicked 
> out by the server as having been idle for too long. The client goes in to its 
> failover reconnect code, and continually gets kicked off by the server.
> Following are the exceptions thrown on the server:
> {noformat}
> ERROR [org.apache.activemq.artemis.core.server] error decoding: 
> java.lang.IllegalStateException: Cannot handle command: ConnectionControl 
> {commandId = 0, responseRequired = false, suspend = false, resume = false, 
> close = false, exit = false, faultTolerant = true, connectedBrokers = null, 
> reconnectTo = null, token = null, rebalanceConnection = false}
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireProtocolManager.handleCommand(OpenWireProtocolManager.java:236)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.bufferReceived(OpenWireConnection.java:315)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:694)
>  [artemis-server-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
>  [artemis-core-client-1.0.0.jar:1.0.0]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
> ERROR [org.apache.activemq.artemis.core.server] error decoding: 
> java.lang.NullPointerException
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.fail(OpenWireConnection.java:450)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.disconnect(OpenWireConnection.java:515)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.processAddConnection(OpenWireConnection.java:640)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139) 
> [activemq-client-5.10.0.jar:5.10.0]
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.bufferReceived(OpenWireConnection.java:271)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:694)
>  [artemis-server-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
>  [artemis-core-client-1.0.0.jar:1.0.0]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
> ERROR [org.apache.activemq.artemis.core.server] error decoding: 
> java.lang.IllegalStateException: Cannot handle command: ConsumerControl 
> {commandId = 0, responseRequired = false, consumerId = 
> ID:testmachine-64956-635672033431382293-1:0:-1:1, close = false, stop = 
> false, start = false, flush = false, prefetch = 1000, destination = 
> ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic}
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireProtocolManager.handleCommand(OpenWireProtocolManager.java:236)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.bufferReceived(OpenWireConnection.java:315)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:694)
>  [artemis-server-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
>  [artemis-core-client-1.0.0.jar:1.0.0]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
> ERROR [org.apache.activemq.artemis.core.server] error decoding: 
> java.lang.IllegalStateException: Cannot handle command: ConsumerControl 
> {commandId = 0, responseRequired = false, consumerId = 
> ID:testmachine-64956-635672033431382293-1:0:1:1, close = false, stop = false, 
> start = false, flush = false, prefetch = 32766, destination = 
> topic://BasicTest}
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireProtocolManager.handleCommand(OpenWireProtocolManager.java:236)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.bufferReceived(OpenWireConnection.java:315)
>  [artemis-openwire-protocol-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:694)
>  [artemis-server-1.0.0.jar:1.0.0]
>       at 
> org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
>  [artemis-core-client-1.0.0.jar:1.0.0]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350) 
> [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at 
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
>  [netty-all-4.0.20.Final.jar:4.0.20.Final]
>       at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to