Fuse MQ Enterprise
  1. Fuse MQ Enterprise
  2. ENTMQ-51

ActiveMQ Web Console can listen on two ports at the same time

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.3-fuse-xx-xx
    • Component/s: None
    • Labels:
      None
    • Environment:
      FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042 on MacOS
    • Similar Issues:
      Show 9 results 

      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
      • 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

        Activity

        Hide
        Mark Brooks
        added a comment -

        I also see the same issue when doing the following:

        • install and start a new instance of FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042

        FuseMQ:karaf@root> config:edit org.ops4j.pax.web

        FuseMQ:karaf@root> config:propset org.osgi.service.http.port 8182

        FuseMQ:karaf@root> config:update

        After executing those commands, I can connect to the web console on both ports 8181 and 8182, even after a restart of the process

        Show
        Mark Brooks
        added a comment - I also see the same issue when doing the following: install and start a new instance of FuseMQEnterprise-7.0.0/fuse-mq-7.0.0.fuse-beta-042 follow the steps in the admin guide attached to https://fusesource.com/issues/browse/ENTMQ-48 on pg 16 / changing the web console port: FuseMQ:karaf@root> config:edit org.ops4j.pax.web FuseMQ:karaf@root> config:propset org.osgi.service.http.port 8182 FuseMQ:karaf@root> config:update After executing those commands, I can connect to the web console on both ports 8181 and 8182, even after a restart of the process

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Brooks
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: