Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-349

Can not remove default JMX port 1099 if the <managementContext connectorPort="2001"> section is located after <networkConnectors> section in activemq.xml file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • JBoss A-MQ 6.1
    • JBoss A-MQ 6.0
    • None
    • None

    Description

      By default, activemq.xml configuration has following <managementContext> section:| <managementContext>|

      <managementContext createConnector="false"/>
      </managementContext>

      It will use JMX port created by JVM and it defaults to 1099 port. The JMX port can be changed by modifying the <managementContext> section:| <managementContext>|

      <managementContext connectorPort="2001" />
      </managementContext>

      so it will create it's own JMX port on 2001 and it should not create default JMX port 1099 any more.However, if I configure a network connector with <networkConnectors> section and followed by <managementContext> section like above:| ...|

      <networkConnectors>
      <networkConnector name="NC_1"
      uri="static:(tcp://192.168.0.192:61616)"
      networkTTL="3"
      conduitSubscriptions="false"
      decreaseNetworkConsumerPriority="true"
      dynamicOnly="true"/>
      </networkConnectors>
       
      <managementContext>
      <managementContext connectorPort="2001" />
      </managementContext>
      ...

      Then activemq will not only create a JMX port on 2001 but also create the default port 1099 too:2013-06-11 08:45:25,380 | DEBUG | Creating RMIRegistry on port 1099 | org.apache.activemq.broker.jmx.ManagementContext | main
      2013-06-11 08:45:25,385 | DEBUG | Probably not using JRE 1.4: mx4j.tools.naming.NamingService | org.apache.activemq.broker.jmx.ManagementContext | main
      2013-06-11 08:45:25,388 | DEBUG | Created JMXConnectorServer javax.management.remote.rmi.RMIConnectorServer@1315415 | org.apache.activemq.broker.jmx.ManagementContext | main
      2013-06-11 08:45:25,416 | INFO | PListStore:[/opt/airserv/web/activemq/5.8.0/apache-activemq-5.8.0.redhat-60024/data/AirServCtovm2088Broker/tmp_storage]started | org.apache.activemq.store.kahadb.plist.PListStoreImpl | main
      2013-06-11 08:45:25,425 | DEBUG | Creating RMIRegistry on port 2001 | org.apache.activemq.broker.jmx.ManagementContext | mainAnd "netstat -an|grep 1099" shows:$ netstat -an |grep 1099
      tcp46 0 0 .1099 *. LISTEN
      $ netstat -an |grep 2001
      tcp46 0 0 .2001 *. LISTEN
      tcp4 0 0 127.0.0.1.56629 127.0.0.1.2001 TIME_WAITThe only workaround for this problem is to keep <managementContext> section and <networkConnectors> section in an alphabetic order.

      Attachments

        Activity

          People

            dejanbosanac Dejan Bosanac
            rhn-support-qluo Joe Luo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: