activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Tanksley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-5252) Purge through webconsole fails if authorizationPlugin is used
Date Tue, 28 Oct 2014 00:52:35 GMT

    [ https://issues.apache.org/jira/browse/AMQ-5252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14186151#comment-14186151
] 

Matthew Tanksley commented on AMQ-5252:
---------------------------------------

I believe that I am having the same issue.  This was working fine for us in 5.6, but failed
when we upgraded to 5.10.  We also tried to update to 5.7, and it fails there too.  The other
symptom that we see is that attempts to use the sendMessage function of the webconsole returns
the following error in the browser:
{noformat}
Exception occurred while processing this request, check the log for more information!
{noformat}

And the following in the activemq.log:
{noformat}
2014-10-27 17:49:03,771 [//localhost#105] WARN  TransportConnection            - Failed to
add Connection ID:dev-jms1-44015-1412438005557-56116:5
java.lang.SecurityException: User name [admin] or password is invalid.
        at org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:97)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:764)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:148)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:246)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:112)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
2014-10-27 17:49:03,774 [tp331361732-182] WARN  ServletHandler                 -
org.springframework.web.util.NestedServletException: Request processing failed; nested exception
is javax.jms.JMSSecurityException: User name [admin] or password is invalid.
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:965)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1320)
        at org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
        at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:367)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
        at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:744)
Caused by: javax.jms.JMSSecurityException: User name [admin] or password is invalid.
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:52)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1417)
        at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1522)
        at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:527)
        at org.apache.activemq.web.WebClient.getConnection(WebClient.java:260)
        at org.apache.activemq.web.WebClient.createSession(WebClient.java:347)
        at org.apache.activemq.web.WebClient.getSession(WebClient.java:248)
        at org.apache.activemq.web.controller.SendMessage.createMessage(SendMessage.java:172)
        at org.apache.activemq.web.controller.SendMessage.sendMessages(SendMessage.java:71)
        at org.apache.activemq.web.controller.SendMessage.handleRequest(SendMessage.java:56)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
        ... 38 more
Caused by: java.lang.SecurityException: User name [admin] or password is invalid.
        at org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:97)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:764)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:148)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:246)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:112)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
2014-10-27 17:49:03,775 [tp331361732-182] WARN  ServletHandler                 - /admin/sendMessage.action
javax.jms.JMSSecurityException: User name [admin] or password is invalid.
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:52)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1417)
        at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1522)
        at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:527)
        at org.apache.activemq.web.WebClient.getConnection(WebClient.java:260)
        at org.apache.activemq.web.WebClient.createSession(WebClient.java:347)
        at org.apache.activemq.web.WebClient.getSession(WebClient.java:248)
        at org.apache.activemq.web.controller.SendMessage.createMessage(SendMessage.java:172)
        at org.apache.activemq.web.controller.SendMessage.sendMessages(SendMessage.java:71)
        at org.apache.activemq.web.controller.SendMessage.handleRequest(SendMessage.java:56)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1320)
        at org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
        at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:367)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
        at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.SecurityException: User name [admin] or password is invalid.
        at org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:97)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:764)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:148)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:246)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:112)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
2014-10-27 17:49:05,776 [s1] Task-205991] INFO  TransportConnection            - Stopping
vm://localhost#104 because Failed with SecurityException: User name [admin] or password is
invalid.
{noformat}

These actions work fine if authorizationPlugin is commented out of the activemq.xml config.

> Purge through webconsole fails if authorizationPlugin is used
> -------------------------------------------------------------
>
>                 Key: AMQ-5252
>                 URL: https://issues.apache.org/jira/browse/AMQ-5252
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: webconsole
>    Affects Versions: 5.10.0
>            Reporter: Richard Wagg
>            Priority: Minor
>         Attachments: activemq.xml
>
>
> Upgrading from a 5.5.1 broker to 5.10. 
> I've managed to work around the issue by making some changes to org.apache.activemq.web.LocalBrokerFacade,
but unsure if this is the root issue or a band-aid fix. 
> {code}
> Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);

> {code}
> returns a AuthorizationDestinationFilter when the code is expecting a org.apache.activemq.broker.region.Queue
- calling getNext() on the AuthorizationDestinationFilter returns the expected Queue. 
>             
> Old code:
> {code}
>  public void purgeQueue(ActiveMQDestination destination) throws Exception {	
>         Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
>         for (Iterator i = destinations.iterator(); i.hasNext();) 
>         {        	
>             Destination dest = (Destination) i.next();
>             if (dest instanceof Queue) {
>                 Queue regionQueue = (Queue) dest;
>                 regionQueue.purge();
>            }
>         }
>     }
> {code}
> new:
> {code}
>  public void purgeQueue(ActiveMQDestination destination) throws Exception {	
>         Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
>         for (Iterator i = destinations.iterator(); i.hasNext();) 
>         {        	
>             Destination dest = (Destination) i.next();
>             if (dest instanceof Queue) {
>                 Queue regionQueue = (Queue) dest;
>                 regionQueue.purge();
>             }
>             else if(dest instanceof  AuthorizationDestinationFilter)
>             {
>             	AuthorizationDestinationFilter adf = (AuthorizationDestinationFilter)dest;
>             	if (adf.getNext() instanceof Queue) 
>             	{
>             		Queue regionQueue = (Queue)adf.getNext();
>                     regionQueue.purge();  
>             	}
>             }
>         }
>     }
> {code}
> Attached is the activemq.xml file we're using to test this - creating a message on the
webconsole and then attempting to purge it will fail unless either the code change above is
made, or the <plugins> section of activemq.xml is commented out. 



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

Mime
View raw message