Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-5561

java.lang.NullPointerException while removing the inactive durable subscriber

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.10.0
    • Fix Version/s: None
    • Component/s: Broker, Message Store
    • Labels:
      None
    • Environment:

      Using ActiveMQ 5.10.
      master slave topology with shared kahadb.

      Description

      Hi,

      We faced an issue where broker was unable to remove an inactive durable subscription after certain period of inactivity. It throws NullPointerException.

      I am providing the details below:

      ActiveMQ broker config:
      <amq:broker persistent="true" brokerName="testbroker"
      useJmx="true" <b>offlineDurableSubscriberTimeout="172800000"
      offlineDurableSubscriberTaskSchedule="3600000" advisorySupport="false">

      Error Message:
      Below message comes when a durable subscriber is inactive for configured time and than broker tries to remove it because of inactivity:

      20150121 03:35:33.852 EST (ActiveMQ Durable Subscriber Cleanup Timer) org.apache.activemq.broker.region.TopicRegion#doCleanup 102 ERROR - Failed to remove inactive durable subscriber
      java.lang.NullPointerException
      at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.loadNode(BTreeIndex.java:264)
      at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.getRoot(BTreeIndex.java:174)
      at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.clear(BTreeIndex.java:202)
      at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex.remove(MessageDatabase.java:2834)
      at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex.clear(MessageDatabase.java:2826)
      at org.apache.activemq.store.kahadb.MessageDatabase.updateIndex(MessageDatabase.java:1471)
      at org.apache.activemq.store.kahadb.MessageDatabase$15.execute(MessageDatabase.java:1204)
      at org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:779)
      at org.apache.activemq.store.kahadb.MessageDatabase.process(MessageDatabase.java:1201)
      at org.apache.activemq.store.kahadb.MessageDatabase$10.visit(MessageDatabase.java:1104)
      at org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand.visit(KahaSubscriptionCommand.java:187)
      at org.apache.activemq.store.kahadb.MessageDatabase.process(MessageDatabase.java:1071)
      at org.apache.activemq.store.kahadb.MessageDatabase.store(MessageDatabase.java:978)
      at org.apache.activemq.store.kahadb.MessageDatabase.store(MessageDatabase.java:958)
      at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBTopicMessageStore.deleteSubscription(KahaDBStore.java:788)
      at org.apache.activemq.store.ProxyTopicMessageStore.deleteSubscription(ProxyTopicMessageStore.java:103)
      at org.apache.activemq.store.ProxyTopicMessageStore.deleteSubscription(ProxyTopicMessageStore.java:103)
      at org.apache.activemq.broker.region.Topic.deleteSubscription(Topic.java:201)
      at org.apache.activemq.broker.region.TopicRegion.removeSubscription(TopicRegion.java:199)
      at org.apache.activemq.broker.region.TopicRegion.doCleanup(TopicRegion.java:100)
      at org.apache.activemq.broker.region.TopicRegion$1.run(TopicRegion.java:70)
      at java.util.TimerThread.mainLoop(Timer.java:555)
      at java.util.TimerThread.run(Timer.java:505)

      Thanks,
      Anuj

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              anujkhandelwal Anuj Khandelwal
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: