3 Replies Latest reply on Mar 16, 2011 4:48 PM by satyab7

    Async error occurred Can not remove a consumer from a session not regd

    satyab7

      Client is Spring application running on JBoss server.

      Broker is either new fuse broker or apache activemq 5.4.2.

       

      All I am doing is using a failover url in connection factory and just using one fuse broker running. I just want Spring application reconnect to fuse broker if broker is restarted.

      It does.

       

      But if I restart my spring application, I get to see the following complaint on broker.

       

      Please suggest , should I further tune broker ? Has this been seen before?

       

       

      ***********************************************

       

      2011-03-11 00:00:02,403 | WARN  | Async error occurred: java.lang.IllegalStateException: Cannot remove a consumer from a session that had not been registered: ID:cmlinxapp02.company.com-40623-1299802438786-0:11:1 | org.apache.activemq.broker.TransportConnection.Service | ActiveMQ Transport: tcp:///IPADDRESS:43993

      java.lang.IllegalStateException: Cannot remove a consumer from a session that had not been registered: ID:cmlinxapp02.company.com-40623-1299802438786-0:11:1

           at org.apache.activemq.broker.TransportConnection.processRemoveConsumer(TransportConnection.java:569)

           at org.apache.activemq.command.RemoveInfo.visit(RemoveInfo.java:76)

           at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:310)

           at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)

           at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)

           at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)

           at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:227)

           at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)

           at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)

           at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)

           at java.lang.Thread.run(Thread.java:595)

       

       

       

        • 1. Re: Async error occurred Can not remove a consumer from a session not regd
          garytully

          A full log of the broker and of the client(With trace level loggin) would help here. It will be possible to correlate requests with the shutdown process.

          It looks very much like an ordering issue with a remove command. The failover transport replays what ever command was in progress when the connection to the broker is recreated. If the broker is also in the process of tearing down the connection, the it can get there first and remove the session etc such that the replayed remove command is ignored (as in this case)

          • 2. Re: Async error occurred Can not remove a consumer from a session not regd
            satyab7

            Attached is activemqlog at trace level as requested.

             

            This warning msg can be seen even if I just shut down the client (jbosserver) or restart.

             

            Also can you please elaborate on your below comments.

            Can I do some configuration settings in failover URL of client that help with this problem

             

            COMMENTS : "It looks very much like an ordering issue with a remove command. The failover transport replays what ever command was in progress when the connection to the broker is recreated. If the broker is also in the process of tearing down the connection, the it can get there first and remove the session etc such that the replayed remove command is ignored (as in this case)"

             

            the following is failover URL. One thing I have struggled is how to pass multiple transport options to failover URL say I want to pass maxReconnectivityInterval and timeout , I could not. I was hoping by doing that I could probably control these warning msgs.

             

             

             

             

            Truly appreciate your help.

            • 3. Re: Async error occurred Can not remove a consumer from a session not regd
              satyab7

              Thanks.

               

              From your other reply I could make multi parameters work in failover URI. But passing

               

              maxReconnectDelay=30000

              initialReconnectDelay=10000

               

              did not help solve this problem.

               

              I am assuming it is Jencks connection factory that is closing connections or 5.4.2 broker that tries to remove consumers from closed connections , could not figure out. But in my testing I noticed this message is also there even in 4.1.1 but just a debug message.

              Where as in 5.4.2 it is elevated to WARN message.

              As long as this is just a warning and does not interfere with functionality I do not care.

               

              Spring and Jencks , abstraction did help but cant figure out whats going on in those factory classes.