Press "Enter" to skip to content

How to Solve – Error while browsing the queue/topic in activemq web console

Is your ActiveMQ Web console throws an exception while you are trying to view/browse the messages? Is it similar to what you see below, then this article could help you solve it. Good Luck
The Problem:
When the Active MQ broker is Secured and when you are trying to browse the  Contents of Queue (or) Topic through the web console. You may encounter the following error/ exception.

Exception occurred while processing this request, check the log for more information! 

When you go and check the activemq.log in the data directory, you may see the following exception:

2018-05-07 12:13:41,028 | INFO  | Connector vm://localhost started | | qtp61137731-42
2018-05-07 12:13:41,041 | WARN  | Failed to add Connection id=ID:Saravanans-Air-53261-1525674467606-4:6, clientId=ID:Saravanans-Air-53261-1525674467606-3:6 due to {} | | ActiveMQ VMTransport: vm://localhost#11-1

java.lang.SecurityException: User name [system] or password is invalid.
 at org.apache.activemq.command.ConnectionInfo.visit([activemq-all-5.15.3.jar:5.15.3]
 at org.apache.activemq.transport.ResponseCorrelator.onCommand([activemq-all-5.15.3.jar:5.15.3]
 at org.apache.activemq.transport.MutexTransport.onCommand([activemq-all-5.15.3.jar:5.15.3]
 at org.apache.activemq.transport.vm.VMTransport.iterate([activemq-all-5.15.3.jar:5.15.3]
 at org.apache.activemq.thread.PooledTaskRunner.runTask([activemq-all-5.15.3.jar:5.15.3]
 at org.apache.activemq.thread.PooledTaskRunner$[activemq-all-5.15.3.jar:5.15.3]
 at java.util.concurrent.ThreadPoolExecutor.runWorker([:1.8.0_152]
 at java.util.concurrent.ThreadPoolExecutor$[:1.8.0_152]
2018-05-07 12:13:41,065 | WARN  | Security Error occurred on connection to: vm://localhost#10, User name [system] or password is invalid. | | ActiveMQ VMTransport: vm://localhost#11-1

The Solution:

We presume that you are using inbuilt JAAS authentication to secure the broker If you are using the AD or external authentication you can directly go to Step 4 and Step 5.
Note*: All the configurations files mentioned here supposed to be available at activemq/conf/ directory


Get the configuration name from the activemq.xml file

   <jaasAuthenticationPlugin configuration="activemq"/>

Here my configuration name is activemq ( highlighted one in the preceding snippet


In the login.config file of yours, find the directive/grouping named activemq. It will be something like this

activemq {
    org.apache.activemq.jaas.PropertiesLoginModule required"""";


Get the password for your desired user ( in my case its admin ) from the file ( as it was given as a value for in the login.config file)


Left to the equal sign is your name and to the right is your password, in my case, my password is c0mp!ex@01 and admin is my username


Open the This file is used to let the Activemq web console know the username and password it should use while trying to access the broker resources like Queue and Topic

by default, the file might contain values like given below


Replace the activemq.username and activemq.password values with the correct values. in my case, I am going to use the admin account, discussed in the previous step



Restart your ActiveMQ server$ ./activemq restart
INFO: Loading '/apps/activemq/apache-activemq-5.15.3//bin/env'
INFO: Using java '/usr/bin/java'
INFO: Loading '/apps/activemq/apache-activemq-5.15.3//bin/env'
INFO: Starting - inspect logfiles specified in and to get details
INFO: pidfile created : '/apps/activemq/apache-activemq-5.15.3//data/' (pid '5080')
INFO: Loading '/apps/activemq/apache-activemq-5.15.3//bin/env'
INFO: Using java '/usr/bin/java'
ActiveMQ is running (pid '5080')
Tada!. Now go back to your web console and try to browse the Queue/Topic and you should be OK!

Be First to Comment


您的电子邮箱地址不会被公开。 必填项已用*标注