You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "HiSkill (JIRA)" <ji...@apache.org> on 2009/11/16 19:21:52 UTC

[jira] Created: (AMQ-2497) Message broker won't come back when the databse goes offline and comes back online

Message broker won't come back when the databse goes offline and comes back online
----------------------------------------------------------------------------------

                 Key: AMQ-2497
                 URL: https://issues.apache.org/activemq/browse/AMQ-2497
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.3.0
         Environment: MS SQL 2000,2005,2008
            Reporter: HiSkill
            Priority: Blocker


- deployed ActiveMQ 5.3.0 as RAR on JBoss
- broker comes up fine
- at some point database goes offline
- broker can't communicate with database and shuts down
- now database comes back online
- borker will never come back again and will have to restart the JBoss manually again to start the broker

This will be a blocker for us to go to production as there is no availability of broker when database goes offline and comes back.

Here is my broker-config.xml, let me know if any configuration is missing :

<beans xmlns="http://activemq.apache.org/schema/core">

<bean xmlns="" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

<bean xmlns="" id="my-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="url" value="jdbc:sqlserver://mydb:1433;databaseName=myds"/>
<property name="username" value="sql"/>
<property name="password" value="sql"/>
<property name="initialSize" value="10"/>
<property name="poolPreparedStatements" value="true"/>
</bean>

<!-- shutdown hook is disabled as RAR classloader may be gone at shutdown -->
<broker useJmx="true" brokerName="sample.broker1" useShutdownHook="false">

<destinations>
<topic physicalName="pocket" />
</destinations>

<managementContext>
<!-- use appserver provided context instead of creating one,
for jboss use: -Djboss.platform.mbeanserver -->
<managementContext createConnector="false"/>
</managementContext>

<persistenceAdapter>
<!-- <amqPersistenceAdapter syncOnWrite="false" directory="${jboss.server.data.dir}/activemq" maxFileLength="20 mb"/> -->
<!-- <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq"/> -->
<!-- To use a different datasource, use th following syntax : -->

<!-- <kahaPersistenceAdapter directory="${jboss.server.data.dir}/activemq" maxDataFileLength="33554432"/> -->

<journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq" dataSource="#my-ds" useDatabaseLock="false" />

</persistenceAdapter>

<transportConnectors>
<transportConnector name="sample.broker1" uri="tcp://localhost:3030" discoveryUri="multicast://default"/>
</transportConnectors>

</broker>
</beans>



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2497) Message broker won't come back when the databse goes offline and comes back online

Posted by "HiSkill (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55513#action_55513 ] 

HiSkill commented on AMQ-2497:
------------------------------

Do we have do anything specific to make the broker available in these scenarios. Restarting JBoss is not an acceptable option.
Any help is highly appreciated.

> Message broker won't come back when the databse goes offline and comes back online
> ----------------------------------------------------------------------------------
>
>                 Key: AMQ-2497
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2497
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: MS SQL 2000,2005,2008
>            Reporter: HiSkill
>            Priority: Blocker
>
> - deployed ActiveMQ 5.3.0 as RAR on JBoss
> - broker comes up fine
> - at some point database goes offline
> - broker can't communicate with database and shuts down
> - now database comes back online
> - borker will never come back again and will have to restart the JBoss manually again to start the broker
> This will be a blocker for us to go to production as there is no availability of broker when database goes offline and comes back.
> Here is my broker-config.xml, let me know if any configuration is missing :
> <beans xmlns="http://activemq.apache.org/schema/core">
> <bean xmlns="" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> <bean xmlns="" id="my-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
> <property name="url" value="jdbc:sqlserver://mydb:1433;databaseName=myds"/>
> <property name="username" value="sql"/>
> <property name="password" value="sql"/>
> <property name="initialSize" value="10"/>
> <property name="poolPreparedStatements" value="true"/>
> </bean>
> <!-- shutdown hook is disabled as RAR classloader may be gone at shutdown -->
> <broker useJmx="true" brokerName="sample.broker1" useShutdownHook="false">
> <destinations>
> <topic physicalName="pocket" />
> </destinations>
> <managementContext>
> <!-- use appserver provided context instead of creating one,
> for jboss use: -Djboss.platform.mbeanserver -->
> <managementContext createConnector="false"/>
> </managementContext>
> <persistenceAdapter>
> <!-- <amqPersistenceAdapter syncOnWrite="false" directory="${jboss.server.data.dir}/activemq" maxFileLength="20 mb"/> -->
> <!-- <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq"/> -->
> <!-- To use a different datasource, use th following syntax : -->
> <!-- <kahaPersistenceAdapter directory="${jboss.server.data.dir}/activemq" maxDataFileLength="33554432"/> -->
> <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq" dataSource="#my-ds" useDatabaseLock="false" />
> </persistenceAdapter>
> <transportConnectors>
> <transportConnector name="sample.broker1" uri="tcp://localhost:3030" discoveryUri="multicast://default"/>
> </transportConnectors>
> </broker>
> </beans>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2497) Message broker won't come back when the databse goes offline and comes back online

Posted by "Manjuram Perumalla (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60612#action_60612 ] 

Manjuram Perumalla commented on AMQ-2497:
-----------------------------------------

Are there any updates on this issue? We've similar problem with 5.0.0 and would like to know if it's been fixed in later versions.

Thanks

> Message broker won't come back when the databse goes offline and comes back online
> ----------------------------------------------------------------------------------
>
>                 Key: AMQ-2497
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2497
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: MS SQL 2000,2005,2008
>            Reporter: hiskill
>            Priority: Blocker
>             Fix For: 5.4.1
>
>
> - deployed ActiveMQ 5.3.0 as RAR on JBoss
> - broker comes up fine
> - at some point database goes offline
> - broker can't communicate with database and shuts down
> - now database comes back online
> - borker will never come back again and will have to restart the JBoss manually again to start the broker
> This will be a blocker for us to go to production as there is no availability of broker when database goes offline and comes back.
> Here is my broker-config.xml, let me know if any configuration is missing :
> <beans xmlns="http://activemq.apache.org/schema/core">
> <bean xmlns="" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> <bean xmlns="" id="my-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
> <property name="url" value="jdbc:sqlserver://mydb:1433;databaseName=myds"/>
> <property name="username" value="sql"/>
> <property name="password" value="sql"/>
> <property name="initialSize" value="10"/>
> <property name="poolPreparedStatements" value="true"/>
> </bean>
> <!-- shutdown hook is disabled as RAR classloader may be gone at shutdown -->
> <broker useJmx="true" brokerName="sample.broker1" useShutdownHook="false">
> <destinations>
> <topic physicalName="pocket" />
> </destinations>
> <managementContext>
> <!-- use appserver provided context instead of creating one,
> for jboss use: -Djboss.platform.mbeanserver -->
> <managementContext createConnector="false"/>
> </managementContext>
> <persistenceAdapter>
> <!-- <amqPersistenceAdapter syncOnWrite="false" directory="${jboss.server.data.dir}/activemq" maxFileLength="20 mb"/> -->
> <!-- <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq"/> -->
> <!-- To use a different datasource, use th following syntax : -->
> <!-- <kahaPersistenceAdapter directory="${jboss.server.data.dir}/activemq" maxDataFileLength="33554432"/> -->
> <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq" dataSource="#my-ds" useDatabaseLock="false" />
> </persistenceAdapter>
> <transportConnectors>
> <transportConnector name="sample.broker1" uri="tcp://localhost:3030" discoveryUri="multicast://default"/>
> </transportConnectors>
> </broker>
> </beans>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2497) Message broker won't come back when the databse goes offline and comes back online

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60619#action_60619 ] 

Gary Tully commented on AMQ-2497:
---------------------------------

Have you tried to configure a failover jdb connection: something like what is described here:
http://forum.springsource.org/showpost.php?p=124247&postcount=4

also, a snippet of the activemq log file when it i initiates shutdown would be useful to identify what part of the code is detecting the jdbc connection failure and deciding to stop.

> Message broker won't come back when the databse goes offline and comes back online
> ----------------------------------------------------------------------------------
>
>                 Key: AMQ-2497
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2497
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: MS SQL 2000,2005,2008
>            Reporter: hiskill
>            Priority: Blocker
>             Fix For: 5.4.1
>
>
> - deployed ActiveMQ 5.3.0 as RAR on JBoss
> - broker comes up fine
> - at some point database goes offline
> - broker can't communicate with database and shuts down
> - now database comes back online
> - borker will never come back again and will have to restart the JBoss manually again to start the broker
> This will be a blocker for us to go to production as there is no availability of broker when database goes offline and comes back.
> Here is my broker-config.xml, let me know if any configuration is missing :
> <beans xmlns="http://activemq.apache.org/schema/core">
> <bean xmlns="" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> <bean xmlns="" id="my-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
> <property name="url" value="jdbc:sqlserver://mydb:1433;databaseName=myds"/>
> <property name="username" value="sql"/>
> <property name="password" value="sql"/>
> <property name="initialSize" value="10"/>
> <property name="poolPreparedStatements" value="true"/>
> </bean>
> <!-- shutdown hook is disabled as RAR classloader may be gone at shutdown -->
> <broker useJmx="true" brokerName="sample.broker1" useShutdownHook="false">
> <destinations>
> <topic physicalName="pocket" />
> </destinations>
> <managementContext>
> <!-- use appserver provided context instead of creating one,
> for jboss use: -Djboss.platform.mbeanserver -->
> <managementContext createConnector="false"/>
> </managementContext>
> <persistenceAdapter>
> <!-- <amqPersistenceAdapter syncOnWrite="false" directory="${jboss.server.data.dir}/activemq" maxFileLength="20 mb"/> -->
> <!-- <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq"/> -->
> <!-- To use a different datasource, use th following syntax : -->
> <!-- <kahaPersistenceAdapter directory="${jboss.server.data.dir}/activemq" maxDataFileLength="33554432"/> -->
> <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq" dataSource="#my-ds" useDatabaseLock="false" />
> </persistenceAdapter>
> <transportConnectors>
> <transportConnector name="sample.broker1" uri="tcp://localhost:3030" discoveryUri="multicast://default"/>
> </transportConnectors>
> </broker>
> </beans>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2497) Message broker won't come back when the databse goes offline and comes back online

Posted by "Bruce Snyder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Snyder updated AMQ-2497:
------------------------------

    Fix Version/s: 5.5.0
                       (was: 5.4.1)

> Message broker won't come back when the databse goes offline and comes back online
> ----------------------------------------------------------------------------------
>
>                 Key: AMQ-2497
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2497
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: MS SQL 2000,2005,2008
>            Reporter: hiskill
>            Priority: Blocker
>             Fix For: 5.5.0
>
>
> - deployed ActiveMQ 5.3.0 as RAR on JBoss
> - broker comes up fine
> - at some point database goes offline
> - broker can't communicate with database and shuts down
> - now database comes back online
> - borker will never come back again and will have to restart the JBoss manually again to start the broker
> This will be a blocker for us to go to production as there is no availability of broker when database goes offline and comes back.
> Here is my broker-config.xml, let me know if any configuration is missing :
> <beans xmlns="http://activemq.apache.org/schema/core">
> <bean xmlns="" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> <bean xmlns="" id="my-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
> <property name="url" value="jdbc:sqlserver://mydb:1433;databaseName=myds"/>
> <property name="username" value="sql"/>
> <property name="password" value="sql"/>
> <property name="initialSize" value="10"/>
> <property name="poolPreparedStatements" value="true"/>
> </bean>
> <!-- shutdown hook is disabled as RAR classloader may be gone at shutdown -->
> <broker useJmx="true" brokerName="sample.broker1" useShutdownHook="false">
> <destinations>
> <topic physicalName="pocket" />
> </destinations>
> <managementContext>
> <!-- use appserver provided context instead of creating one,
> for jboss use: -Djboss.platform.mbeanserver -->
> <managementContext createConnector="false"/>
> </managementContext>
> <persistenceAdapter>
> <!-- <amqPersistenceAdapter syncOnWrite="false" directory="${jboss.server.data.dir}/activemq" maxFileLength="20 mb"/> -->
> <!-- <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq"/> -->
> <!-- To use a different datasource, use th following syntax : -->
> <!-- <kahaPersistenceAdapter directory="${jboss.server.data.dir}/activemq" maxDataFileLength="33554432"/> -->
> <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq" dataSource="#my-ds" useDatabaseLock="false" />
> </persistenceAdapter>
> <transportConnectors>
> <transportConnector name="sample.broker1" uri="tcp://localhost:3030" discoveryUri="multicast://default"/>
> </transportConnectors>
> </broker>
> </beans>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2497) Message broker won't come back when the databse goes offline and comes back online

Posted by "Manjuram Perumalla (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61346#action_61346 ] 

Manjuram Perumalla commented on AMQ-2497:
-----------------------------------------

I've added 'useDatabaseLock=false' to the database persistence adapter to disable db failover. This setting is working for us. Maybe this setting should be set to false by default (out-of-the-box) and let the users change it if they add database failover. Or improve the documentation.

>From the Javadoc of JDBCPersistenceAdapter, "Sets whether or not an exclusive database lock should be used to enable JDBC Master/Slave. Enabled by default." 





> Message broker won't come back when the databse goes offline and comes back online
> ----------------------------------------------------------------------------------
>
>                 Key: AMQ-2497
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2497
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: MS SQL 2000,2005,2008
>            Reporter: hiskill
>            Priority: Blocker
>             Fix For: 5.4.1
>
>
> - deployed ActiveMQ 5.3.0 as RAR on JBoss
> - broker comes up fine
> - at some point database goes offline
> - broker can't communicate with database and shuts down
> - now database comes back online
> - borker will never come back again and will have to restart the JBoss manually again to start the broker
> This will be a blocker for us to go to production as there is no availability of broker when database goes offline and comes back.
> Here is my broker-config.xml, let me know if any configuration is missing :
> <beans xmlns="http://activemq.apache.org/schema/core">
> <bean xmlns="" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> <bean xmlns="" id="my-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
> <property name="url" value="jdbc:sqlserver://mydb:1433;databaseName=myds"/>
> <property name="username" value="sql"/>
> <property name="password" value="sql"/>
> <property name="initialSize" value="10"/>
> <property name="poolPreparedStatements" value="true"/>
> </bean>
> <!-- shutdown hook is disabled as RAR classloader may be gone at shutdown -->
> <broker useJmx="true" brokerName="sample.broker1" useShutdownHook="false">
> <destinations>
> <topic physicalName="pocket" />
> </destinations>
> <managementContext>
> <!-- use appserver provided context instead of creating one,
> for jboss use: -Djboss.platform.mbeanserver -->
> <managementContext createConnector="false"/>
> </managementContext>
> <persistenceAdapter>
> <!-- <amqPersistenceAdapter syncOnWrite="false" directory="${jboss.server.data.dir}/activemq" maxFileLength="20 mb"/> -->
> <!-- <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq"/> -->
> <!-- To use a different datasource, use th following syntax : -->
> <!-- <kahaPersistenceAdapter directory="${jboss.server.data.dir}/activemq" maxDataFileLength="33554432"/> -->
> <journaledJDBC journalLogFiles="5" dataDirectory="${jboss.server.data.dir}/activemq" dataSource="#my-ds" useDatabaseLock="false" />
> </persistenceAdapter>
> <transportConnectors>
> <transportConnector name="sample.broker1" uri="tcp://localhost:3030" discoveryUri="multicast://default"/>
> </transportConnectors>
> </broker>
> </beans>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.