ActiveMQ
  1. ActiveMQ
  2. AMQ-2814

When running multiple brokers on the same box, "activemq-admin stop" command on a downed instance will shutdown other instances

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 5.3.0
    • Fix Version/s: None
    • Component/s: Broker
    • Labels:
      None
    • Environment:

      Linux 2.6.31-22-generic-pae #60-Ubuntu SMP Thu May 27 01:40:15 UTC 2010 i686 GNU/Linux

      Description

      In an environment where multiple ActiveMQ broker servers are running on the same host, the "activemq-admin stop" command will shutdown other instances if the requested instance is already down.

      This is very dangerous behavior in the case where a user inadvertently attempts to shutdown a broker instance which is already down - instead of getting an error message, or the command being a no-op, a different instance than requested will be shutdown instead.

      To reproduce:

      • Install ActiveMQ into SOMEDIR/broker_a and configure port and name.
      • Install ActiveMQ into SOMEDIR/broker_b and configure unique port and name.
      • Start broker_a - broker_a/bin/activemq (or alternatively activemq-admin start)
      • Start broker_b - broker_b/bin/activemq (or alternatively activemq-admin start)
      • Stop broker_a - broker_a/bin/activemq-admin stop
      • Try to stop broker_a again - broker_a/bin/activemq-admin stop – THIS WILL RESULT IN broker_b SHUTTING DOWN

      If there are three or more instances, the result is the same - "activemq-admin stop" will shutdown instances other than the one requested.

        Activity

        Scott Emmons created issue -
        Jeff Turner made changes -
        Field Original Value New Value
        Project Import Fri Nov 26 22:32:02 EST 2010 [ 1290828722158 ]
        Hide
        Matt Pavlovich added a comment - - edited

        Hi Scott-

        The activemq-admin script has an option to point to a specific jmx URL. I suggest looking at adding the jmx URL as an argument to the activemq-admin program when you execute it.

        There are many different ways folks run multiple ActiveMQ instances installed on a single system, so it is difficult to have those scripts always line up to the correct instance in those scenarios. The best solution is to align it to the correct JMX URL.

        Check out this JIRA to see the correct syntax:
        https://issues.apache.org/jira/browse/AMQ-3456

        Thanks,
        Matt Pavlovich

        Show
        Matt Pavlovich added a comment - - edited Hi Scott- The activemq-admin script has an option to point to a specific jmx URL. I suggest looking at adding the jmx URL as an argument to the activemq-admin program when you execute it. There are many different ways folks run multiple ActiveMQ instances installed on a single system, so it is difficult to have those scripts always line up to the correct instance in those scenarios. The best solution is to align it to the correct JMX URL. Check out this JIRA to see the correct syntax: https://issues.apache.org/jira/browse/AMQ-3456 Thanks, Matt Pavlovich
        Hide
        Dejan Bosanac added a comment -

        This has been resolved since

        bin/activemq script now support defining jmx url and credentials

        Show
        Dejan Bosanac added a comment - This has been resolved since bin/activemq script now support defining jmx url and credentials
        Dejan Bosanac made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Duplicate [ 3 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Scott Emmons
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development