activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Baker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-4546) kahadbstore nullpointerexception after restart
Date Mon, 20 May 2013 19:29:16 GMT

    [ https://issues.apache.org/jira/browse/AMQ-4546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13662303#comment-13662303
] 

Matt Baker commented on AMQ-4546:
---------------------------------

What more logs can I provide?  I have logging set at debug.  Only happens after a couple of
restarts so I can't give a reliable set of steps.  It happens after 2-3 restarts.  Not always,
but it eventually will always fail after a few restarts.  

If I delete the database completely it goes away (obviously).

This is my log4j setting.

log4j.rootLogger=DEBUG, out



These are the lines of code where I setup my broker:

		broker = new BrokerService();
		StatisticsBrokerPlugin statisticsPlugin = new StatisticsBrokerPlugin();
		broker.setPlugins(new BrokerPlugin[] { statisticsPlugin });

		String dataDirectory = getDefaultDataDirectory();
		broker.setDataDirectory(dataDirectory);
		broker.setDeleteAllMessagesOnStartup(true);
		File tmpDirectory = new File(getTempDataDirectory());
		broker.setTmpDataDirectory(tmpDirectory);
		boolean enableJMX = Boolean.getBoolean("enableJMX");
		broker.setUseJmx(enableJMX);

		try {
			// by default activemq would try to start jmx rmi server on port
			// 1099, the below code would help to work around it.
			String str = System.getProperty("activemq.jmx.rmi.port");
			if (str != null) {
				int jmxRMIPort = Integer.parseInt(str);
				ManagementContext managementContext = new ManagementContext();
				managementContext.setConnectorPort(jmxRMIPort);
				broker.setManagementContext(managementContext);
			}
		} catch (Exception e) {
		}
		// this is default...but just make sure since some messages are too
		// big too keep directly in memory
		broker.setPersistent(true);

		// broker name must be setup based on domain and container name...
		// we don't use the value from the activemq.xml file...so we force it
		// here
		String brokerName = getBrokerName();
		broker.setBrokerName(brokerName);

		// advisory support MUST be enabled for stuff to work right
		broker.setAdvisorySupport(true);

// bunch of camel stuff in here that I deleted...not sure if you need that.

		broker.start();
		broker.waitUntilStarted();
  

                
> kahadbstore nullpointerexception after restart
> ----------------------------------------------
>
>                 Key: AMQ-4546
>                 URL: https://issues.apache.org/jira/browse/AMQ-4546
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.8.0
>            Reporter: Matt Baker
>
> Received a null pointer exception after restarting activemq broker (embedded).
> First few messages are ok, then this happens and the broker (using network connector)
starts to fail indicating remote exceptions.
> [//fathom1.win-fiaflosoa0a#43-1] Service                        DEBUG Error occured while
processing sync command: Consu
> merInfo {commandId = 4, responseRequired = true, consumerId = ID:WIN-FIAFLOSOA0A-55945-1369075855975-4:22:1:1,
destinati
> on = queue://fathom1.win-fiaflosoa0a, prefetchSize = 1, maximumPendingMessageLimit =
0, browser = false, dispatchAsync =
>  true, selector = null, subscriptionName = null, noLocal = false, exclusive = false,
retroactive = false, priority = 0,
> brokerPath = null, optimizedAcknowledge = false, noRangeAcks = false, additionalPredicate
= null}, exception: java.lang.
> NullPointerException
> java.lang.NullPointerException
>         at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.getMessageCount(KahaDBStore.java:478)
>         at org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
>         at org.apache.activemq.broker.region.Queue.initialize(Queue.java:376)
>         at org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)
>         at org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:526)
>         at org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:136)
>         at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277)
>         at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
>         at org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:174)
>         at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
>         at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
>         at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>         at org.apache.activemq.broker.region.AbstractRegion.lookup(AbstractRegion.java:452)
>         at org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:265)
>         at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:353)
>         at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
>         at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:91)
>         at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
>         at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
>         at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:95)
>         at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:619)
>         at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:332)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
>         at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>         at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:241)
>         at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:129)
>         at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:722)
> [                     Thread-12] DefaultComponent               DEBUG Creating endpoint
uri=[jms://topic:progress.opened
> ge.management.notification.fathom1.win-fiaflosoa0a], path=[topic:progress.openedge.management.notification.fathom1.win-f
> iaflosoa0a], parameters=[{}]
> [                     Thread-12] DefaultCamelContext            DEBUG jms://topic:progress.openedge.management.notificat
> ion.fathom1.win-fiaflosoa0a converted to endpoint: Endpoint[jms://topic:progress.openedge.management.notification.fathom
> 1.win-fiaflosoa0a] by component: org.apache.activemq.camel.component.ActiveMQComponent@1b880ae
> [l Thread #8 - ProducerTemplate] ProducerCache                  DEBUG >>>>
Endpoint[jms://topic:progress.openedge.manage
> ment.notification.fathom1.win-fiaflosoa0a] Exchange[Message: Remote Event [fathom1.win-fiaflosoa0a:ID=Database
applicati
> on.state.EServerGroupStateChanged {isShuttingDown=false, isStartable=false, affectedObject=defaultServerGroup,
isStartin
> g=true, isStoppable=false, isInitializing=false, stateDescriptor=Starting, isIdle=false,
isRunning=false}]]
> [                     Thread-12] DefaultComponent               DEBUG Creating endpoint
uri=[jms://topic:progress.opened
> ge.management.notification.fathom1.win-fiaflosoa0a], path=[topic:progress.openedge.management.notification.fathom1.win-f
> iaflosoa0a], parameters=[{}]
> Error from remote broker:
> [a0a/192.168.232.128:6835@62013] DemandForwardingBridgeSupport  WARN  Network connection
between vm://fathom1.nbbedmbaker2#62 and tcp://win-fiaflosoa0a/192.168.232.128:6835@62013
shutdown due to a remote error: java.io.IOException: ShutdownInfo {commandId = 615, responseRequired
= false}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message