Independent ActiveMQ handbook · archive of the 2004–2007 project site
Independent guide. Not the Apache ActiveMQ project site and not affiliated with the Apache Software Foundation. ActiveMQ and Apache are trademarks of the ASF. Official documentation: activemq.apache.org.

activemq.org › Handbook › ActiveMQ web console: URL, login and password

Handbook

ActiveMQ web console: URL, login and password

Checked against ActiveMQ Classic 6.4.0, 6.3.3 and 5.19.12 and Apache Artemis 2.57.0 on . Independent guide; sources are listed at the end. Official documentation: activemq.apache.org and artemis.apache.org.

The ActiveMQ web console is at http://localhost:8161/admin and the default login is admin / admin. Out of the box it only answers on the broker machine itself, and the file that holds the password depends on your version: conf/users.properties in ActiveMQ 6.4.0, conf/jetty-realm.properties in 5.19.x.

This page covers ActiveMQ, often called ActiveMQ Classic. The official documentation lives at activemq.apache.org; the details below come from the default configuration files in the 6.4.0 and 5.19.12 release tags of the project's GitHub repository (listed under Sources), because the official pages lag behind those files in places.

How do I open the ActiveMQ web console?

  1. Start the broker from its bin directory: ./activemq console runs it in the foreground, ./activemq start runs it as a background process. Installation is covered in Install ActiveMQ.
  2. On the same machine, open http://localhost:8161/admin in a browser.
  3. Log in with admin / admin. The web apps have required a login by default since ActiveMQ 5.8.

The official getting-started guide suggests a quick smoke test: open the Queues page, type a queue name and click Create, then use Send To on that queue to send a test message. If the page loads and the message count goes up, the broker and the console are both working.

What is the default username and password?

Both current release lines ship with admin / admin, but they check it in different ways.

VersionHow the console checks loginsCredentials fileRole required for /admin
6.4.0JAAS, login module activemq in conf/login.configconf/users.properties plus conf/groups.propertiesadmins group
5.19.xJetty HashLoginService defined in conf/jetty.xmlconf/jetty-realm.propertiesadmin role

jetty-real.properties or jetty-realm.properties?

The official getting-started guide says the login can be configured in conf/jetty-real.properties. That is a typo. The real name is jetty-realm.properties, and it belongs to the 5.x line: the 5.19.12 release has conf/jetty-realm.properties, which its own header describes as the users that can access the web console and demos.

ActiveMQ 6.4.0 has no jetty-realm.properties at all. Its console authenticates through JAAS against conf/users.properties and conf/groups.properties, the same files the broker uses when you turn on broker authentication. If you are following an older guide on a 6.x install and cannot find the realm file, that is why.

Not sure which layout you have? Look in your conf directory. If it contains jetty-spring.xml and a jetty/ folder, follow the 6.4.0 instructions. If it contains a single jetty.xml, open it and check which login service it configures and which file that service reads.

How do I change the web console password?

ActiveMQ 6.4.0

Passwords are in conf/users.properties, one user=password per line. The default file contains a single account, and the comments in the default activemq.xml warn that this well-known admin=admin user must not be used as-is. From the default conf/users.properties in ActiveMQ 6.4.0:

admin=admin

Change the value after the = to a new password. To add another console user, add a line for it in users.properties, then add the name to the admins group in conf/groups.properties: the console's /admin pages are restricted to that group. From the default conf/groups.properties in ActiveMQ 6.4.0:

# Group membership format
# groupname = user1,user2,..
#
# Example:
# users=user1,user2

# Default admins group with full access for user 'admin'
admins=admin

Because these files are shared with the broker, the same accounts apply to client connections once you enable the broker's JAAS plugin (it is commented out in the default activemq.xml).

ActiveMQ 5.19.x

Passwords are in conf/jetty-realm.properties, in the format username: password [,rolename ...]. From the default file in ActiveMQ 5.19.12:

admin: admin, admin
user: user, user

Change the password field of the admin line and keep the admin role at the end, since /admin/* is restricted to that role in conf/jetty.xml. Restart the broker after editing either file.

Is the console bound to localhost only?

Yes, in both current lines. Two separate settings keep it local: the HTTP connector listens on 127.0.0.1, and an IP allow-list admits only the loopback addresses 127.0.0.1 and ::1.

In ActiveMQ 6.4.0 the address and port live in conf/jetty-spring.properties. From that file:

jetty.http.host=127.0.0.1
jetty.ssl.host=127.0.0.1
jetty.http.port=8161
jetty.ssl.port=8443

The comments in that file explain how to open the console to other machines: set an interface address (or 0.0.0.0) as the host, widen the client allow-list in conf/jetty/jetty-security.xml, and add the address you will browse from to the <allow-origin> list in conf/jolokia-access.xml. A -Djetty.host=<address> JVM option overrides both host settings. HTTPS on 8443 is off by default (httpsEnabled=false), and the bundled jetty-keystore.ks is a self-signed sample that the file says to replace before production use.

In ActiveMQ 5.19.x the address and port sit on the jettyPort bean in conf/jetty.xml. From the default conf/jetty.xml in 5.19.12:

<bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
         <!-- the default port number for the web console -->
    <property name="host" value="127.0.0.1"/>
    <property name="port" value="8161"/>
</bean>

The same file defines the allow-list (beans named inetAccessIncludeLoopbackV4 and inetAccessIncludeLoopbackV6) and includes commented-out examples for the private ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. If you change the bind address, add an include entry for the networks that should reach the console.

Leaving the console on loopback and reaching it through an SSH tunnel or a reverse proxy that does its own authentication keeps the admin login off the network.

How do I change the web console port?

  • 6.4.0: change jetty.http.port in conf/jetty-spring.properties.
  • 5.19.x: change the port property of the jettyPort bean in conf/jetty.xml.

The same Jetty server also hosts the Jolokia REST API under /api/jolokia, which in 6.4.0 is restricted to the admins group like the console. If you change the host as well, remember the <allow-origin> list in conf/jolokia-access.xml mentioned above; Jolokia is covered in ActiveMQ monitoring. All default ports are listed in ActiveMQ ports.

Common problems

  • The login prompt keeps coming back. On 6.4.0 a user that exists in users.properties but is not in the admins group cannot open /admin. On 5.19.x the jetty-realm.properties line needs the admin role.
  • The console works on the server but not from your laptop. That is the loopback binding and allow-list described above. If the broker runs in a container, check which address the console listens on inside the container before you suspect the port mapping; see ActiveMQ in Docker.
  • Nothing answers on 8161 at all. The console is started by an import at the end of conf/activemq.xml; in 6.4.0 that line is <import resource="jetty-spring.xml"/>. If it was removed or commented out, the broker runs without a console.
  • You expected the console at /console. That is the address of a different product. Apache Artemis (formerly ActiveMQ Artemis) ships its own hawtio-based management console at http://localhost:8161/console; the /admin console described here belongs to ActiveMQ Classic only. See ActiveMQ Classic vs Artemis.

For how the console looked when it was first added, see the 2006 archive page on the web console; its instructions predate the current configuration files.

Frequently asked questions

What is the default ActiveMQ web console URL?

http://localhost:8161/admin on the machine running the broker. In ActiveMQ 6.4.0 and 5.19.x the console listens on 127.0.0.1 only, so it is not reachable from other machines until you change the bind address and the IP allow-list.

What is the ActiveMQ web console default username and password?

admin / admin. In ActiveMQ 6.4.0 the account is in conf/users.properties and must be in the admins group in conf/groups.properties; in 5.19.x it is in conf/jetty-realm.properties with the admin role.

Where is jetty-realm.properties in ActiveMQ 6?

ActiveMQ 6.4.0 does not ship one. Its console authenticates through JAAS against conf/users.properties and conf/groups.properties. The getting-started guide's conf/jetty-real.properties is a misspelling of jetty-realm.properties, the 5.x file.

How do I change the ActiveMQ admin password?

Edit the admin line in conf/users.properties (6.4.0, format user=password) or conf/jetty-realm.properties (5.19.x, format username: password, role), then restart the broker.

Why can't I access the ActiveMQ console from another computer?

The default configuration binds the console to 127.0.0.1 and only allows loopback clients. Change the host in conf/jetty-spring.properties (6.4.0) or the jettyPort bean in conf/jetty.xml (5.19.x) and widen the allow-list, or reach it through an SSH tunnel.

Related guides

From the 2006 archive

The original ActiveMQ documentation on these topics, kept as it was published here in 2004–2007. It describes ActiveMQ 4.x and older.

Sources

  1. ActiveMQ Classic: Getting Started activemq.apache.org
  2. ActiveMQ 6.4.0 default conf/activemq.xml (GitHub) raw.githubusercontent.com
  3. ActiveMQ 6.4.0 conf/jetty-spring.properties (GitHub) raw.githubusercontent.com
  4. ActiveMQ 6.4.0 conf/jetty/jetty-security.xml (GitHub) raw.githubusercontent.com
  5. ActiveMQ 6.4.0 conf/groups.properties (GitHub) raw.githubusercontent.com
  6. ActiveMQ 5.19.12 conf/jetty-realm.properties (GitHub) raw.githubusercontent.com
  7. ActiveMQ 5.19.12 conf/jetty.xml (GitHub) raw.githubusercontent.com
  8. Apache Artemis: Management Console artemis.apache.org