activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Journal is already opened by this application error
Date Thu, 30 Mar 2006 09:29:35 GMT
I've seem some folks create 2 brokers in the same JVM before - by
using vm:// tranport to create a connection to a broker - which then
auto-creates a broker - then they try to create a broker explciitly
using an activemq.xml.

So double check that if you are creating an embedded broker, you make
sure you set up the dependencies correctly in the spring.xml so that
you create the broker first before any JMS connections.


On 3/29/06, Adrian Co <aco@exist.com> wrote:
> Hi,
>
> Just a couple of guesses. :-)
>
> The exception says that journal is already open by this application,
> this could mean that in the current vm you are trying to use the same
> journal data directory twice. Some reasons I could think of, is that
> you're starting two brokers in the same vm using the same persistence
> adapter, or starting two persistence adapter referring to the same data
> directory.
>
> AFAIK, if it is another application, the exception *should* read
> "Journal is already opened by another application".
>
> Could you also try checking out the latest snapshot and building from
> there using maven -o -Dmaven.test.skip=true? I seem to notice that the
> stack trace shows org.activeio..., while the latest build uses
> org.apache.activeio. I don't know if this is significant though.
>
> Hope any of it helps. :-)
>
> Regards,
> Adrian Co
>
> Javier Leyba wrote:
>
> >On 3/29/06, Joseph Dennis Gapuz <jgapuz@exist.com> wrote:
> >
> >
> >>Hi! JavierL ,
> >>
> >>When it happens could you check your process keys (ps - aux). There
> >>could be a process locking it.
> >>Then try to kill it.
> >>
> >>
> >>
> >
> >
> >Joseph
> >
> >Thanks for your reply.
> >
> >With all brokers stopped I did:
> >
> >---------
> >jcm@Linux01:~/jl/activemq-4.0-SNAPSHOT/bin$ ps -ef | grep actimq
> >jcm      19177 19151  0 14:56 pts/2    00:00:00 grep actimq
> >jcm@Linux01:~/jl/activemq-4.0-SNAPSHOT/bin$
> >---------
> >
> >Then I did:
> >
> >jcm@Linux01:~/jl/activemq-4.0-SNAPSHOT/bin$ ./activemq
> >xbean:file:/home/jcm/jl/activemq-4.0-SNAPSHOT/conf/activemq.xml
> >
> >
> >and in console I see:
> >
> >------------------------
> >-----------------
> >ACTIVEMQ_HOME: /home/jcm/jl/activemq-4.0-SNAPSHOT
> >Loading message broker from:
> >xbean:file:/home/jcm/jl/activemq-4.0-SNAPSHOT/conf/activemq.xml
> >Created MBeanServer with ID: 105bd58:10a4616fb2b:-8000:Linux01:1
> >INFO  BrokerService                  - ActiveMQ 4.0-SNAPSHOT JMS
> >Message Broker (BROKER_1) is starting
> >INFO  BrokerService                  - For help or more information
> >please see: http://www.logicblaze.com
> >RMIConnectorServer started at:
> >service:jmx:rmi://linux01/jndi/rmi://localhost:2011/jmxrmi
> >INFO  ManagementContext              - JMX consoles can connect to
> >service:jmx:rmi://linux01/jndi/rmi://localhost:2011/jmxrmi
> >INFO  JDBCPersistenceAdapter         - Database driver recognized:
> >[mysql-ab_jdbc_driver]
> >INFO  JournalPersistenceAdapter      - Journal Recovery Started from:
> >Active Journal: using 5 x 20.0 Megs at:
> >/home/jcm/jl/activemq-4.0-SNAPSHOT/activemq-data1/journal
> >INFO  JournalPersistenceAdapter      - Journal Recovered: 0 message(s)
> >in transactions recovered.
> >INFO  TransportServerThreadSupport   - Listening for connections at:
> >tcp://172.31.112.9:62002
> >INFO  TransportConnector             - Connector default Started
> >INFO  NetworkConnector               - Establishing network connection
> >between from vm:?network=true to tcp://172.31.112.9:62001
> >INFO  BrokerService                  - ActiveMQ 4.0-SNAPSHOT JMS
> >Message Broker (null) is starting
> >INFO  BrokerService                  - For help or more information
> >please see: http://www.logicblaze.com
> >INFO  JDBCPersistenceAdapter         - Database driver recognized:
> >[apache_derby_embedded_jdbc_driver]
> >INFO  JournalPersistenceAdapter      - Journal Recovery Started from:
> >Active Journal: using 2 x 20.0 Megs at:
> >/home/jcm/jl/activemq-4.0-SNAPSHOT/bin/activemq-data/null/journal
> >INFO  JournalPersistenceAdapter      - Journal Recovered: 0 message(s)
> >in transactions recovered.
> >INFO  BrokerService                  - ActiveMQ JMS Message Broker
> >(null) started
> >INFO  VMTransportFactory             - binding to broker: null
> >INFO  TransportConnector             - Connector vm://null Started
> >INFO  DemandForwardingBridge         - Starting a network connection
> >between vm://null#0 and tcp://null:0 has been established.
> >INFO  VMTransportFactory             - Shutting down VM connectors for
> >broker: null
> >WARN  NetworkConnector               - Could not start network bridge
> >between: vm:?network=true and: tcp://172.31.112.9:62001 due to:
> >java.net.ConnectException: Connection refused
> >java.net.ConnectException: Connection refused
> >        at java.net.PlainSocketImpl.socketConnect(Native Method)
> >        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
> >        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
> >        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
> >        at java.net.Socket.connect(Socket.java:452)
> >        at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:291)
> >        at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:48)
> >        at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:59)
> >        at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:59)
> >        at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:57)
> >        at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:59)
> >        at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:59)
> >        at org.apache.activemq.network.DemandForwardingBridgeSupport.start(DemandForwardingBridgeSupport.java:140)
> >        at org.apache.activemq.network.DiscoveryNetworkConnector.onServiceAdd(DiscoveryNetworkConnector.java:115)
> >        at org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent.start(SimpleDiscoveryAgent.java:46)
> >        at org.apache.activemq.network.DiscoveryNetworkConnector.doStart(DiscoveryNetworkConnector.java:170)
> >        at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:48)
> >        at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1053)
> >        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:359)
> >        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:43)
> >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058)
> >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
> >        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
> >        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
> >        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
> >        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
> >        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
> >        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
> >        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:40)
> >        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:56)
> >        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:81)
> >        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:62)
> >        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
> >        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:78)
> >        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
> >        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:45)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:324)
> >        at org.apache.activemq.console.Main.runTaskClass(Main.java:135)
> >        at org.apache.activemq.console.Main.main(Main.java:67)
> >INFO  NetworkConnector               - Establishing network connection
> >between from vm:?network=true to tcp://172.30.27.1:62010
> >INFO  VMTransportFactory             - Shutting down VM connectors for
> >broker: null
> >INFO  TransportConnector             - Connector vm://null Stopped
> >INFO  BrokerService                  - ActiveMQ 4.0-SNAPSHOT JMS
> >Message Broker (null) is starting
> >INFO  BrokerService                  - For help or more information
> >please see: http://www.logicblaze.com
> >ERROR BrokerService                  - Failed to start ActiveMQ JMS
> >Message Broker. Reason: java.io.IOException: Journal is already opened
> >by this application.
> >java.io.IOException: Journal is already opened by this application.
> >        at org.activeio.journal.active.ControlFile.lock(ControlFile.java:73)
> >        at org.activeio.journal.active.LogFileManager.initialize(LogFileManager.java:119)
> >        at org.activeio.journal.active.LogFileManager.<init>(LogFileManager.java:100)
> >        at org.activeio.journal.active.JournalImpl.<init>(JournalImpl.java:101)
> >        at org.apache.activemq.store.DefaultPersistenceAdapterFactory.createJournal(DefaultPersistenceAdapterFactory.java:211)
> >        at org.apache.activemq.store.DefaultPersistenceAdapterFactory.getJournal(DefaultPersistenceAdapterFactory.java:147)
> >        at org.apache.activemq.store.DefaultPersistenceAdapterFactory.createPersistenceAdapter(DefaultPersistenceAdapterFactory.java:65)
> >        at org.apache.activemq.broker.BrokerService.createPersistenceAdapter(BrokerService.java:938)
> >        at org.apache.activemq.broker.BrokerService.getPersistenceAdapter(BrokerService.java:525)
> >        at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:901)
> >        at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:862)
> >        at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:442)
> >        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:351)
> >        at org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:102)
> >        at org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:48)
> >        at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:63)
> >        at org.apache.activemq.network.NetworkConnector.createLocalTransport(NetworkConnector.java:278)
> >        at org.apache.activemq.network.DiscoveryNetworkConnector.onServiceAdd(DiscoveryNetworkConnector.java:95)
> >        at org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent.start(SimpleDiscoveryAgent.java:46)
> >        at org.apache.activemq.network.DiscoveryNetworkConnector.doStart(DiscoveryNetworkConnector.java:170)
> >        at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:48)
> >        at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1053)
> >        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:359)
> >        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:43)
> >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058)
> >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
> >        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
> >        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
> >        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
> >        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
> >        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
> >        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
> >        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:40)
> >        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:56)
> >        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:81)
> >        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:62)
> >        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
> >        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:78)
> >        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
> >        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:45)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:324)
> >        at org.apache.activemq.console.Main.runTaskClass(Main.java:135)
> >        at org.apache.activemq.console.Main.main(Main.java:67)
> >WARN  NetworkConnector               - Could not connect to local URI:
> >vm:?network=true: java.io.IOException: Journal is already opened by
> >this application.
> >java.io.IOException: Journal is already opened by this application.
> >        at org.activeio.journal.active.ControlFile.lock(ControlFile.java:73)
> >        at org.activeio.journal.active.LogFileManager.initialize(LogFileManager.java:119)
> >        at org.activeio.journal.active.LogFileManager.<init>(LogFileManager.java:100)
> >        at org.activeio.journal.active.JournalImpl.<init>(JournalImpl.java:101)
> >        at org.apache.activemq.store.DefaultPersistenceAdapterFactory.createJournal(DefaultPersistenceAdapterFactory.java:211)
> >        at org.apache.activemq.store.DefaultPersistenceAdapterFactory.getJournal(DefaultPersistenceAdapterFactory.java:147)
> >        at org.apache.activemq.store.DefaultPersistenceAdapterFactory.createPersistenceAdapter(DefaultPersistenceAdapterFactory.java:65)
> >        at org.apache.activemq.broker.BrokerService.createPersistenceAdapter(BrokerService.java:938)
> >        at org.apache.activemq.broker.BrokerService.getPersistenceAdapter(BrokerService.java:525)
> >        at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:901)
> >        at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:862)
> >        at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:442)
> >        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:351)
> >        at org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:102)
> >        at org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:48)
> >        at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:63)
> >        at org.apache.activemq.network.NetworkConnector.createLocalTransport(NetworkConnector.java:278)
> >        at org.apache.activemq.network.DiscoveryNetworkConnector.onServiceAdd(DiscoveryNetworkConnector.java:95)
> >        at org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent.start(SimpleDiscoveryAgent.java:46)
> >        at org.apache.activemq.network.DiscoveryNetworkConnector.doStart(DiscoveryNetworkConnector.java:170)
> >        at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:48)
> >        at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1053)
> >        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:359)
> >        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:43)
> >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058)
> >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
> >        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
> >        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
> >        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
> >        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
> >        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
> >        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
> >        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:40)
> >        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:56)
> >        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:81)
> >        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:62)
> >        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
> >        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:78)
> >        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
> >        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:45)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:324)
> >        at org.apache.activemq.console.Main.runTaskClass(Main.java:135)
> >        at org.apache.activemq.console.Main.main(Main.java:67)
> >INFO  NetworkConnector               - Network Connector to node 2 Started
> >INFO  BrokerService                  - ActiveMQ JMS Message Broker
> >(BROKER_1) started
> >------------------------------
> >
> >
> >And if I do again
> >
> >jcm@Linux01:~/jakarta-tomcat-5.0.28/webapps$ ps -ef | grep -i active
> >
> >
> >I see:
> >
> >---------------
> >jcm      19245 19151  2 15:00 pts/2    00:00:04
> >/usr/local/java/j2sdk1.4.2_03/bin/java -Xmx512M
> >-Dderby.system.home=../data
> >-Dderby.storage.fileSyncTransactionLog=true -classpath
> >-Dactivemq.home=/home/jcm/jl/activemq-4.0-SNAPSHOT -jar
> >/home/jcm/jl/activemq-4.0-SNAPSHOT/bin/run.jar
> >xbean:file:/home/jcm/jl/activemq-4.0-SNAPSHOT/conf/activemq.xml
> >---------------
> >
> >
> >I really don't believe there are more process locking DB, but I don't
> >know which is the error.
> >
> >Any idea ?
> >
> >
> >Thanks in advance
> >
> >J
> >
> >
> >
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message