You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "mandar.wanpal" <ma...@gmail.com> on 2013/02/06 11:17:11 UTC

Failed to update lease Oracle connection Reset

Hi All,

We have configured AMQ in lease DB locking mechanism. I am facing strange
issue in which AMQ after some random time once its up, crashes throwing
below error.

2013-02-04 22:49:45,168 | WARN  | <hostname>, failed to update lease:
java.sql.SQLRecoverableException: IO Error: Connection reset |
org.apache.activemq.store.jdbc.LeaseDatabaseLocker | ActiveMQ Cleanup Timer
java.sql.SQLRecoverableException: IO Error: Connection reset

below is my activemq.xml snap for jdbc config.

    <persistenceAdapter>
           
            <jdbcPersistenceAdapter lockKeepAlivePeriod="5000"
lockAcquireSleepInterval="16000" dataDirectory="${activemq.base}/data"
dataSource="#oracle-ds">
                <databaseLocker>
                    <lease-database-locker/>
                </databaseLocker>
            </jdbcPersistenceAdapter>
        </persistenceAdapter>

		
		  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
         <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
         <property name=&quot;url&quot; value=&quot;jdbc:oracle:thin:@
                            (DESCRIPTION =
                            (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST
= &lt;host ip>)(PORT = 1521)))
                            (CONNECT_DATA = (SERVER =
DEDICATED)(SERVICE_NAME = <servicename>))   )" />
         <property name=&quot;username&quot; value=&quot;&lt;username>"/>
         <property name=&quot;password&quot; value=&quot;&lt;password>"/>
         <property name="maxActive" value="5"/>
         <property name="initialSize" value="2"/>
	 <property name="maxIdle" value="2"/>
	 <property name="minIdle" value="0"/>
         <property name="poolPreparedStatements" value="true"/>
     </bean>


Has someone faced such error before. what could be causing this. This setup
that we are doing is pretty new and yet we are not having any traffic on it.



-----
Regards,
Mandar Wanpal
Email: mandar.wanpal@gmail.com
--
View this message in context: http://activemq.2283324.n4.nabble.com/Failed-to-update-lease-Oracle-connection-Reset-tp4662859.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Failed to update lease Oracle connection Reset

Posted by SuoNayi_Gmail <su...@gmail.com>.
The dbcp connection pool may return a invalid connection when you require a
new connection to update the lease.
Enabling the idle check for the connection pool should help.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Failed-to-update-lease-Oracle-connection-Reset-tp4662859p4668390.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Failed to update lease Oracle connection Reset

Posted by pkorwar <pk...@yahoo.com>.
Mandar,

I am facing the same issue.
Did you have a solution for this?
Please post the solution if you had.

Thanks
Pramod



--
View this message in context: http://activemq.2283324.n4.nabble.com/Failed-to-update-lease-Oracle-connection-Reset-tp4662859p4668380.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Failed to update lease Oracle connection Reset

Posted by Gary Tully <ga...@gmail.com>.
that looks as if the connection pool is returning a connection that may
have been terminated on the server... it may be possible to configure the
pool to validate a connection before returning.





On 6 February 2013 10:17, mandar.wanpal <ma...@gmail.com> wrote:

> Hi All,
>
> We have configured AMQ in lease DB locking mechanism. I am facing strange
> issue in which AMQ after some random time once its up, crashes throwing
> below error.
>
> 2013-02-04 22:49:45,168 | WARN  | <hostname>, failed to update lease:
> java.sql.SQLRecoverableException: IO Error: Connection reset |
> org.apache.activemq.store.jdbc.LeaseDatabaseLocker | ActiveMQ Cleanup Timer
> java.sql.SQLRecoverableException: IO Error: Connection reset
>
> below is my activemq.xml snap for jdbc config.
>
>     <persistenceAdapter>
>
>             <jdbcPersistenceAdapter lockKeepAlivePeriod="5000"
> lockAcquireSleepInterval="16000" dataDirectory="${activemq.base}/data"
> dataSource="#oracle-ds">
>                 <databaseLocker>
>                     <lease-database-locker/>
>                 </databaseLocker>
>             </jdbcPersistenceAdapter>
>         </persistenceAdapter>
>
>
>                   <bean id="oracle-ds"
> class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>          <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"/>
>          <property name=&quot;url&quot; value=&quot;jdbc:oracle:thin:@
>                             (DESCRIPTION =
>                             (ADDRESS_LIST = (ADDRESS = (PROTOCOL =
> TCP)(HOST
> = &lt;host ip>)(PORT = 1521)))
>                             (CONNECT_DATA = (SERVER =
> DEDICATED)(SERVICE_NAME = <servicename>))   )" />
>          <property name=&quot;username&quot; value=&quot;&lt;username>"/>
>          <property name=&quot;password&quot; value=&quot;&lt;password>"/>
>          <property name="maxActive" value="5"/>
>          <property name="initialSize" value="2"/>
>          <property name="maxIdle" value="2"/>
>          <property name="minIdle" value="0"/>
>          <property name="poolPreparedStatements" value="true"/>
>      </bean>
>
>
> Has someone faced such error before. what could be causing this. This setup
> that we are doing is pretty new and yet we are not having any traffic on
> it.
>
>
>
> -----
> Regards,
> Mandar Wanpal
> Email: mandar.wanpal@gmail.com
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Failed-to-update-lease-Oracle-connection-Reset-tp4662859.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://redhat.com
http://blog.garytully.com