Configure ActiveMQ Web console for password secured broker / Queues

In my last post about ActiveMQ I showed how to configure ActiveMQ in order to secure the Queues by Username and Password.

In the last days I noticed, that the web console throws an exception when I try to click on one of the queues. I realized, that the webconsole couldn’t open the queue because it is password protected.

In the logfile there was an exception like this (see the bold words):

2013-08-15 17:09:23,486 | WARN  | Failed to add Connection ID:PBOSS-56722-1376579349017-3:1, reason: java.lang.SecurityException: User name [system] or password is invalid. | | ActiveMQ VMTransport: vm://localhost#1-1
2013-08-15 17:09:23,489 | INFO  | Connector vm://localhost Stopped | | qtp2024674927-37
2013-08-15 17:09:23,490 | WARN  | /admin/browse.jsp | org.eclipse.jetty.servlet.ServletHandler | qtp2024674927-37
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‚queueBrowser‘ defined in ServletContext resource [/WEB-INF/webconsole-query.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.activemq.web.QueueBrowseQuery]: Constructor threw exception; nested exception is javax.jms.JMSException: User name [system] or password is invalid.

Ok, now we see, that the web console seems to use the username „system“ by default. But in my configuration the queues are secured by „superman“ and „boss“. So I have to „tell“ the web console this information. You can define that in the file: <activemq-home>/conf/

#this is the queue User
#this is the queue password

Now you have to restart MQ and the web console will work fine 🙂