You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Javier Leyba <xl...@gmail.com> on 2006/05/04 14:23:09 UTC
Re: Journal is already opened by this application error
On 4/18/06, James Strachan <ja...@gmail.com> wrote:
> Without seeing all of your client code and configuration its a bit
> hard to know for sure but I suspect its what Hiram just said - some
> code in your JVM starting a JMS connection using the "vm://*" syntax
> which causes a local in JVM broker to be started; then you are
> explicitly creating another broker yourself.
>
Well, after a lot of tests I discovered a clue about the error.
I've been testing my master/slave scenario without a network
connection and without receive the error with this config.
--------------
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="MASTER_NOVA1" persistent="true" useJmx="true">
<!-- Use the following to configure how ActiveMQ is exposed in JMX -->
<managementContext>
<managementContext connectorPort="2199"
jmxDomainName="org.apache.activemq"/>
</managementContext>
<persistenceAdapter>
<journaledJDBC journalLogFiles="5"
dataDirectory="/home/arqweb/jl/activemq-data" dataSource="#mysql-ds"
/>
</persistenceAdapter>
<transportConnectors>
<transportConnector name="default" uri="tcp://172.30.27.1:62004" />
</transportConnectors>
</broker>
<bean id="mysql-ds"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://172.31.112.16/activeMQ1?relaxAutoCommit=true"/>
<property name="username" value="activeMQ1"/>
<property name="password" value="activeMQ1"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
</beans>
------------------
After my success with those tests I decided to start to test to
network my master/slave nodes then I did a little change in my config
like this:
-----------------
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="MASTER_NOVA1" persistent="true" useJmx="true">
<!-- Use the following to configure how ActiveMQ is exposed in JMX -->
<managementContext>
<managementContext connectorPort="2199"
jmxDomainName="org.apache.activemq"/>
</managementContext>
<persistenceAdapter>
<journaledJDBC journalLogFiles="5"
dataDirectory="/home/arqweb/jl/activemq-data" dataSource="#mysql-ds"
/>
</persistenceAdapter>
<transportConnectors>
<transportConnector name="default" uri="tcp://172.30.27.1:62004" />
</transportConnectors>
<networkConnectors>
<networkConnector name="default"
uri="static://(tcp://172.30.27.1:62005,tcp://172.31.112.9:62002,tcp://
172.31.112.9:62004)" failover="true"/>
</networkConnectors>
</broker>
<bean id="mysql-ds"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://172.31.112.16/activeMQ1?relaxAutoCommit=true"/>
<property name="username" value="activeMQ1"/>
<property name="password" value="activeMQ1"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
</beans>
-------------------
And then I receive the error.
My question is how could a network connector originate this error and
how could I solve it ? (and I must assume this is the origin because
without network connect everything is working well !)
Thanks in advance
--
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar
Re: Journal is already opened by this application error
Posted by hbruch <ho...@isb-ag.de>.
I just encountered the same problem. Avoiding underscores in the broker name
fixed it...
(see e.g. http://www.nabble.com/NPE-when-closing-tf1526855.html#a4284233)
Holger
--
View this message in context: http://www.nabble.com/Journal-is-already-opened-by-this-application-error-tf1329757.html#a5648310
Sent from the ActiveMQ - User forum at Nabble.com.