How to configure the ActiveMQ 5.10.0 HawtIO interface?

柔情痞子 提交于 2019-12-04 23:10:21

问题


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?


回答1:


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!




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/26674726/how-to-configure-the-activemq-5-10-0-hawtio-interface

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!