Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-5892

Unnecessary stack trace in case of authorization failure

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.11.1
    • Fix Version/s: 5.12.0
    • Component/s: Broker, stomp
    • Labels:
      None

      Description

      The following stack trace is printed when the authorization exception occurs:

      2015-06-25 08:37:12,697 [ActiveMQ NIO Worker 42] WARN Service - Async error occurred: 
      java.lang.SecurityException: User bla is not authorized to read from: topic://xxx
      	at org.apache.activemq.security.AuthorizationBroker.addConsumer(AuthorizationBroker.java:155)
      	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:102)
      	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:102)
      	at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:107)
      	at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:107)
      	at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:667)
      	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:348)
      	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:334)
      	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188)
      	at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
      	at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:300)
      	at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:97)
      	at org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:200)
      	at org.apache.activemq.transport.stomp.ProtocolConverter.onStompSubscribe(ProtocolConverter.java:664)
      	at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:258)
      	at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:85)
      	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
      	at org.apache.activemq.transport.stomp.StompCodec.processCommand(StompCodec.java:129)
      	at org.apache.activemq.transport.stomp.StompCodec.parse(StompCodec.java:100)
      	at org.apache.activemq.transport.stomp.StompNIOTransport.serviceRead(StompNIOTransport.java:112)
      	at org.apache.activemq.transport.stomp.StompNIOTransport.access$000(StompNIOTransport.java:44)
      	at org.apache.activemq.transport.stomp.StompNIOTransport$1.onSelect(StompNIOTransport.java:69)
      	at org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelection.java:97)
      	at org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:119)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      
      

      In keeping with logging transport exceptions, it makes sense to only log the stack trace at debug level.

        Attachments

          Activity

            People

            • Assignee:
              gtully Gary Tully
              Reporter:
              gtully Gary Tully
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: