8

I'm using ActiveMQ 5.9.0 that has a amazing HawtIO interface. So when 5.10.0 has come, I migrated my system too. Now I see that the HawtIO interface doesn't exist inside it... It just disappeared from webapps folder from 5.9.0 to 5.10.0, so I tried the tutorial ActiveMQ and HawtIO but it doesn't work... How to configure the interface?

R. Karlus
  • 2,094
  • 3
  • 24
  • 48
  • What version of hawtio are you using? Try with latest release 1.4.29 as there was a bug in a number of releases causing the connect button to not work correctly, which is maybe the issue you had – Claus Ibsen Oct 31 '14 at 15:14
  • Thanks for the comment, but actually I'm using 1.4.27 – R. Karlus Oct 31 '14 at 16:59
  • 1
    Can you tell a bit more what "does not work". Also can you connect remotely to ActiveMQ, eg boot up hawtio in another JVM, eg either standalone or from Tomcat etc. – Claus Ibsen Nov 01 '14 at 07:50
  • I can't connect by tomcat but using the standalone jar I had connected without problems... Now I want to connect from ActiveMQ context itself. – R. Karlus Nov 03 '14 at 11:17

3 Answers3

9

Alternatively, you can use HawtIO as a standalone web-app, that connects to ActiveMQ through Jolokia (pre 5.9 way of doing it).

  1. Download the HawtIO standalone jar here: http://hawt.io/getstarted/index.html
  2. Run the jar on the ActiveMQ-server: java -jar hawtio-app-1.4.37.jar (put the command in a .bat-script and add a scheduled task if you want it to run on startup..)
  3. Navigate to http://your server:8080/hawtio
  4. Create a new connection, give it a name, use localhost as host, 8161 as port and api/jolokia as path.

Connect, and enjoy!

Tobb
  • 11,850
  • 6
  • 52
  • 77
  • I was facing an authentication issue for a long time, when I tried to run Hawtio by placing it as a war inside ActiveMQ folder. Your answer resolved this issue. Thanks you so much!! – Ann Sep 17 '21 at 15:31
7

As stated in Erik Williams answer:

  • Unzip the hawt-io war into the ActiveMQ\webapps folder (ex. hawtio).
  • change jetty.xml to include this webapp as a folder

    <bean class="org.eclipse.jetty.webapp.WebAppContext">
        <property name="contextPath" value="/hawtio" />
        <property name="resourceBase" value="${activemq.home}/webapps/hawtio" />
        <property name="logUrlOnStart" value="true" />
    </bean>
    
  • On the default 5.10.0 standalone setup we also had to add three security paramaters to enable the brokers security. This can be done in the activmemq or activemq.bat file. Add these settings to the ACTIVEMQ_OPTS variable:

    • -Dhawtio.realm=activemq
    • -Dhawtio.role=admins
    • -Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal
  • We did not have to remove the slf4j jar, it was not present.

keerekeerweere
  • 131
  • 2
  • 4
  • I have configured ActiveMQ in Tomcat referring the link - http://ggl-consulting.blogspot.in/2015/01/monitoring-activemq-using-tomcat-web.html and now ActiveMQ web console is working fine but now I want to configure and use hawt.io . Please could you advise on this. – Santosh Nov 01 '16 at 18:59
  • You may configure this in multiple ways. A quick and easy way is to launch hawt.io in standalone mode in a separate java process. You then connect to it. The default the interface is http://localhost:8080/hawtio or http://__ipofyourinstance__:8080/hawtio. Inside that webpage you then configure a jolokia connection to the activemq instance. Usually this is hostname: scheme: http, host: localhost, port: 8161, path: api/jolokia @Santosh – keerekeerweere Nov 09 '16 at 13:40
4

Yeah I'm not entirely sure why they choose to do this, as it was a pretty big feature they'd been touting.

In any case, its pretty simple to set up yourself by downloading hawt-io itself and installing it as it was in 5.9 if you cannot get the stand alone method to work.

You'll need to decompress (or at least this is how I did it) the WAR and set up the jetty.xml as it was set up in 5.9 to include hawt.io as an application.

If I recall, I think I also ran into some class-loading conflicts due to some classes that come included with hawt.io that were newer than what was installed with the broker.

Erik Williams
  • 933
  • 6
  • 5
  • Background on why: http://activemq.2283324.n4.nabble.com/DISCUSS-Remove-the-old-ActiveMQ-Console-td4675925.html – Petter Nordlander Jan 09 '15 at 06:43
  • How to integrate hawt-io in example explained in this link - http://ggl-consulting.blogspot.in/2015/01/monitoring-activemq-using-tomcat-web.html . – Santosh Nov 01 '16 at 19:02