Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-1137

Address configured without routing type causes exception on broker restart

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0
    • Component/s: Broker
    • Labels:
      None
    • Environment:

      CentOS 6.8 / Java 1.8.0_121

      Description

      My brokers run on two different nodes, and were created with:

      master:

      $ artemis create --cluster-password=clusterpass --cluster-user=clusteruser --clustered --password=test --user=user --role=user --host=192.168.1.1 --require-login --replicated \
      --default-port=61616 --no-web --addresses=192.168.1.1 --no-amqp-acceptor --no-hornetq-acceptor --no-mqtt-acceptor --no-stomp-acceptor master

      slave

      $ artemis create --cluster-password=clusterpass --cluster-user=clusteruser --clustered --password=test --user=user --role=user --host=192.168.1.2 --require-login --replicated \
      --default-port=61616 --no-web --addresses=192.168.1.2 --slave --no-amqp-acceptor --no-hornetq-acceptor --no-mqtt-acceptor --no-stomp-acceptor slave

      Both master and slave have the default broker.xml as created by "artemis create", with the exception of replication settings:

      <ha-policy>
      <replication>
      <master>
      <check-for-live-server>true</check-for-live-server>
      </master>
      </replication>
      </ha-policy>

      <ha-policy>
      <replication>
      <slave>
      <allow-failback>true</allow-failback>
      </slave>
      </replication>
      </ha-policy>

      My two nodes:
      $ cat /etc/centos-release
      CentOS release 6.8 (Final)
      $ java -version
      java version "1.8.0_121"
      Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

      Here is artemis (from GIT) after a restart. The error from 2.0.0 is identical:

      $ master21test/bin/artemis run
      _ _ _
      / \ ___| | ___ __ _() _____
      / _ | _ \ __|/ _ \ \/ | |/ __/
      / ___ \ | \/ |/ __/ |\/| | |__ \
      // _| ____|| |||/___ /
      Apache ActiveMQ Artemis 2.1.0-SNAPSHOT

      15:13:17,012 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
      15:13:17,031 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=true,journalDirectory=./data/journal,bindingsDirectory=./data/bindings,largeMessagesDirectory=./data/large-messages,pagingDirectory=./data/paging)
      15:13:17,068 INFO [org.apache.activemq.artemis.core.server] AMQ221013: Using NIO Journal
      15:13:17,131 INFO [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 1,073,741,824
      15:13:17,218 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
      15:13:17,219 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
      15:13:17,219 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
      15:13:17,219 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
      15:13:17,220 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
      15:13:17,221 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
      15:13:17,739 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue DLQ
      15:13:17,740 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue ExpiryQueue
      15:13:17,740 ERROR [org.apache.activemq.artemis.core.server] AMQ224000: Failure in initialisation: java.lang.IllegalArgumentException: Collection is empty
      at java.util.EnumSet.copyOf(EnumSet.java:174) [rt.jar:1.8.0_121]
      at org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager.lambda$updateAddressInfo$0(SimpleAddressManager.java:240) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at java.util.concurrent.ConcurrentHashMap.computeIfPresent(ConcurrentHashMap.java:1769) [rt.jar:1.8.0_121]
      at org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager.updateAddressInfo(SimpleAddressManager.java:238) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.updateAddressInfo(PostOfficeImpl.java:485) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.updateAddressInfo(ActiveMQServerImpl.java:2389) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.addOrUpdateAddressInfo(ActiveMQServerImpl.java:2420) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.deployAddressesFromConfiguration(ActiveMQServerImpl.java:2270) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.deployAddressesFromConfiguration(ActiveMQServerImpl.java:2264) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart2(ActiveMQServerImpl.java:2183) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation.run(SharedNothingLiveActivation.java:109) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:514) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:463) [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:111) [artemis-cli-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:73) [artemis-cli-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:148) [artemis-cli-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:95) [artemis-cli-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:122) [artemis-cli-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_121]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_121]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
      at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
      at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129) [artemis-boot.jar:2.1.0-SNAPSHOT]
      at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:49) [artemis-boot.jar:2.1.0-SNAPSHOT]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbertram Justin Bertram
                Reporter:
                rummymobile Dan Irwin
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: