ActiveMQ console not available
Asked Answered
W

3

5

I installed ActiveMQ 5.5.0 on my Windows machine, and it had a web console (http://localhost:8161/admin) working out of the box.

Then I installed ActiveMQ (same version) on a remote Linux box (IP: AAA.BBB.CCC.DDD), but whenever I point the browser to

http://AAA.BBB.CCC.DDD:8161/admin

I get the "Unable to connect" error in the browser.

The network connection is there, I can connect to AAA.BBB.CCC.DDD via ssh and to another web application running on the same server.

Therefore I think that the cause of the problem is wrong configuration of the embedded Jetty server of ActiveMQ.

How can fix the problem, i. e. enable the access to the web console from a remote browser?

Waugh answered 4/8, 2011 at 19:12 Comment(0)
N
4

In your ActiveMQ config file you should see something like:

<import resource="${activemq.base}/conf/jetty.xml"/>

This starts up an embedded Jetty container with the web console.

If you start the broker on the console, you should see the following if everything works

 INFO | ActiveMQ WebConsole initialized.
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
Newmann answered 5/8, 2011 at 12:53 Comment(2)
All these lines appear in the log file. Nevertheless, the web console is not available ("Problem loading page" in Firefox).Waugh
The reason was completely different - when I connect through the office WLAN, the address does not work. When I connect via my cell phone, it works. I assume that the reason are the firewall settings.Waugh
D
8
  1. into /opt/activemq/apache-activemq-5.16.3/conf
  2. open jetty.xml
  3. change
 <property name="host" value="127.0.0.1"/>

to

<property name="host" value="0.0.0.0"/>
  1. restart activemq
Dentistry answered 18/8, 2021 at 21:31 Comment(2)
This solution worked for me. However, in the web browser, i had to use the ip address associated to the 'eth0' interface such as 192.168.100.124:8161/admin and not 0.0.0.0:8161/adminMontserrat
This needs some more explanation. 127.0.0.1 is the loopback address, and by definition only works within the system. 0.0.0.0 is an unroutable meta address, generally interpreted as 'listen on any I/F on this host'. And I really hope the OP had a different name when you answered this question.Hagar
N
4

In your ActiveMQ config file you should see something like:

<import resource="${activemq.base}/conf/jetty.xml"/>

This starts up an embedded Jetty container with the web console.

If you start the broker on the console, you should see the following if everything works

 INFO | ActiveMQ WebConsole initialized.
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
Newmann answered 5/8, 2011 at 12:53 Comment(2)
All these lines appear in the log file. Nevertheless, the web console is not available ("Problem loading page" in Firefox).Waugh
The reason was completely different - when I connect through the office WLAN, the address does not work. When I connect via my cell phone, it works. I assume that the reason are the firewall settings.Waugh
A
0

I used this approach on a linux server running in VM but can be applied to any instance Check whether 8161 port is opened for external connection. Also check whether another service creating a conflict. If there is a conflict change the jetty port in the {activemqfolder}/conf/jetty.xml. locate the line that contains the 8161 and change it to the desirable port

To enable external connections to the port (in this instance i choose 8169) use

sudo iptables -I INPUT -p tcp --dport 8169 -j ACCEPT

Proceed to start the activemq ie {activemqfolder}/bin/activemq console to see the messages

Apostate answered 5/6, 2020 at 9:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.