Details
-
Bug
-
Resolution: Obsolete
-
Minor
-
7.0.0
-
None
-
None
Description
My intention was to change the port the ActiveMQ Web Console listens on in order to confirm which config file was used to set the port (as there appears to be more than one place port 8181 is referenced). A real use case might be changing the port to move access to the web console off of a well-known port.
I changed the port in etc/jetty.xml and found, to my surprise, that the new port was used, but the original port (8181) continued to work . I repeated my test on a fresh install and got the same result. (I do not believe this is simply a case of browser cache refresh – see the details below)
Here are the steps that reproduce the issue in my tests:
- Start a new clean instance of FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042
- Wait for the web console to start, and connect using a browser to http://localhost:8181/activemqweb/index.jsp to the ActiveMQ Web Console
- Look at netstat to see the process listening on port 8181
mbrooks1:~ mbrooks$ netstat -a | grep LISTEN
tcp46 0 0 .61616 *. LISTEN
--> tcp46 0 0 .8181 *. LISTEN
tcp46 0 0 .8040 *. LISTEN
tcp46 0 0 .8101 *. LISTEN
tcp46 0 0 .44444 *. LISTEN
tcp46 0 0 .rmiregistry *. LISTEN
tcp4 0 0 localhost.60761 . LISTEN
tcp46 0 0 .60760 *. LISTEN
tcp4 0 0 .22417 *. LISTEN
tcp4 0 0 localhost.49154 . LISTEN
tcp4 0 0 localhost.49153 . LISTEN
tcp4 0 0 .ssh *. LISTEN
tcp6 0 0 .ssh *. LISTEN
tcp4 0 0 localhost.ipp . LISTEN
tcp6 0 0 localhost.ipp . LISTEN
- Stop FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042
- Look at netstat again to see that no process is listening on port 8181:
mbrooks1:~ mbrooks$ netstat -a | grep LISTEN
tcp4 0 0 .22417 *. LISTEN
tcp4 0 0 localhost.49154 . LISTEN
tcp4 0 0 localhost.49153 . LISTEN
tcp4 0 0 .ssh *. LISTEN
tcp6 0 0 .ssh *. LISTEN
tcp4 0 0 localhost.ipp . LISTEN
tcp6 0 0 localhost.ipp . LISTEN
- Edit etc/jetty.xml and set jetty to listen on port 8282:
<Set name="port"><Property name="jetty.port" default="8282"/></Set>
- Start FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042
- Have another look at netstat and see that there are now listeners on both ports 8181 and 8282
mbrooks1:~ mbrooks$ netstat -a | grep LISTEN
tcp46 0 0 .61616 *. LISTEN
tcp46 0 0 .8040 *. LISTEN
--> tcp46 0 0 .8181 *. LISTEN
--> tcp46 0 0 .8282 *. LISTEN
tcp46 0 0 .8101 *. LISTEN
tcp46 0 0 .44444 *. LISTEN
tcp46 0 0 .rmiregistry *. LISTEN
tcp4 0 0 localhost.60815 . LISTEN
tcp46 0 0 .60814 *. LISTEN
tcp4 0 0 .22417 *. LISTEN
tcp4 0 0 localhost.49154 . LISTEN
tcp4 0 0 localhost.49153 . LISTEN
tcp4 0 0 .ssh *. LISTEN
tcp6 0 0 .ssh *. LISTEN
tcp4 0 0 localhost.ipp . LISTEN
tcp6 0 0 localhost.ipp . LISTEN
--> I can open browses on both URLs:
http://localhost:8181/activemqweb
http://localhost:8282/activemqweb
and both consoles are operational. I can even send a message from one console and receive it in another (screenshot attached).
It looks to me that both ports are being listened to by the same java process:
mbrooks1:~ mbrooks$ lsof -i -P | grep 8181
java 9138 mbrooks 221u IPv6 0xffffff800c2f1600 0t0 TCP *:8181 (LISTEN)
mbrooks1:~ mbrooks$ lsof -i -P | grep 8282
java 9138 mbrooks 214u IPv6 0xffffff800c1f7600 0t0 TCP *:8282 (LISTEN)
mbrooks1:~ mbrooks$ ps -ef | grep 9138
501 9138 8896 0 10:52PM ttys000 0:36.01 /System/Library/Frameworks/JavaVM.framework/Home/bin/java -server -Xms128M -Xmx512M -Dcom.sun.management.jmxremote -Djava.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Home/jre/lib/endorsed:/System/Library/Frameworks/JavaVM.framework/Home/lib/endorsed:/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042/lib/endorsed -Djava.ext.dirs=/System/Library/Frameworks/JavaVM.framework/Home/jre/lib/ext:/System/Library/Frameworks/JavaVM.framework/Home/lib/ext:/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042/lib/ext -Dkaraf.instances=/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042/instances -Dkaraf.home=/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042 -Dkaraf.base=/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042 -Dkaraf.data=/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042/data -Djava.io.tmpdir=/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042/data/tmp -Djava.util.logging.config.file=/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042/etc/java.util.logging.properties -Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true -classpath /Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042/lib/karaf-jaas-boot.jar:/Users/mbrooks/FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042/lib/karaf.jar org.apache.karaf.main.Main start