Uploaded image for project: 'A-MQ Broker'
  1. A-MQ Broker
  2. ENTMQBR-1757

AMQ Broker throws ERROR if we update the address ANYCAST to MULTICAST or vice-versa in broker.xml

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: AMQ 7.2.0.GA
    • Fix Version/s: None
    • Component/s: broker-core
    • Labels:
      None
    • Target Release:
    • Sprint:
      AMQ Broker 1833, AMQ Broker 1836
    • Steps to Reproduce:
      Hide

      1. Create MULTICAST address Test in broker.xml

      <address name="Test">
          <multicast>
               <queue name="testQueue" />
            </multicast>
      </address>
      

      2. Start A-MQ broker
      3. Stop A-MQ broker
      4. Change MULTICAST address Test to ANYCAST

      <address name="Test">
             <anycast>
                  <queue name="testQueue" />
              </anycast>
      </address>
      

      5. Start AMQ broker and the below exception will be thrown during start.

      2018-06-28 08:06:34,705 ERROR [org.apache.activemq.artemis.core.server] AMQ224000: Failure in initialisation: java.lang.IllegalStateException: AMQ119209: Can't remove routing type MULTICAST, queues exists for address: Test. Please delete queues before removing this routing type.
      	at org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager.validateRoutingTypes(SimpleAddressManager.java:334) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      

      Show
      1. Create MULTICAST address Test in broker.xml <address name= "Test" > <multicast> <queue name= "testQueue" /> </multicast> </address> 2. Start A-MQ broker 3. Stop A-MQ broker 4. Change MULTICAST address Test to ANYCAST <address name= "Test" > <anycast> <queue name= "testQueue" /> </anycast> </address> 5. Start AMQ broker and the below exception will be thrown during start. 2018 - 06 - 28 08 : 06 : 34 , 705 ERROR [org.apache.activemq.artemis.core.server] AMQ224000: Failure in initialisation: java.lang.IllegalStateException: AMQ119209: Can't remove routing type MULTICAST, queues exists for address: Test. Please delete queues before removing this routing type. at org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager.validateRoutingTypes(SimpleAddressManager.java: 334 ) [artemis-server- 2.6 . 1 .amq- 720004 -redhat- 1 .jar: 2.6 . 1 .amq- 720004 -redhat- 1 ]
    • Affects:
      Release Notes
    • Release Notes Text:
      Hide
      Previously, if the broker was stopped and the routing type for an existing address with queues was changed via broker.xml, then the broker would fail to restart. The relevant code for updating the configuration has been modified so that such a configuration change is possible, and even if there is an error deploying the address and/or queue the broker will log the error and still start.
      Show
      Previously, if the broker was stopped and the routing type for an existing address with queues was changed via broker.xml, then the broker would fail to restart. The relevant code for updating the configuration has been modified so that such a configuration change is possible, and even if there is an error deploying the address and/or queue the broker will log the error and still start.
    • Release Notes Docs Status:
      Documented as Resolved Issue

      Description

      AMQ Broker throws below ERROR if we update the address ANYCAST to MULTICAST or vice-versa in broker.xml

      2018-06-28 08:06:34,701 INFO  [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue ExpiryQueue on address ExpiryQueue
      2018-06-28 08:06:34,705 ERROR [org.apache.activemq.artemis.core.server] AMQ224000: Failure in initialisation: java.lang.IllegalStateException: AMQ119209: Can't remove routing type MULTICAST, queues exists for address: Test. Please delete queues before removing this routing type.
      	at org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager.validateRoutingTypes(SimpleAddressManager.java:334) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager.updateAddressInfo(SimpleAddressManager.java:288) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.updateAddressInfo(PostOfficeImpl.java:539) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.updateAddressInfo(ActiveMQServerImpl.java:2672) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.addOrUpdateAddressInfo(ActiveMQServerImpl.java:2692) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.deployAddressesFromConfiguration(ActiveMQServerImpl.java:2533) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.deployAddressesFromConfiguration(ActiveMQServerImpl.java:2527) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart2(ActiveMQServerImpl.java:2394) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:72) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:535) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:474) [artemis-server-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:111) [artemis-cli-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:82) [artemis-cli-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:149) [artemis-cli-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:97) [artemis-cli-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:124) [artemis-cli-2.6.1.amq-720004-redhat-1.jar:2.6.1.amq-720004-redhat-1]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_45]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_45]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_45]
      	at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_45]
      	at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129) [artemis-boot.jar:2.6.1.amq-720004-redhat-1]
      	at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:49) [artemis-boot.jar:2.6.1.amq-720004-redhat-1]
       
      2018-06-28 08:06:34,708 INFO  [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.6.1.amq-720004-redhat-1 [0.0.0.0, nodeID=0526eb7b-7a7c-11e8-9e90-9efc016f7025] 
      

      Check steps to reproduce.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jbertram Justin Bertram
                Reporter:
                rhn-support-shsingh shailendra singh
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified