activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SuoNayi <suonayi2...@163.com>
Subject Re:Re: Re:Re: ActiveMQ Master/slave with MySQLCluster backend
Date Fri, 29 Mar 2013 03:36:00 GMT
Paul is right and you should use the JDBCIOExceptionHandler instead of the default one.Does
it because the majority of the members of MySql cluster are failed so the database failover
can not work as expected?Can you post the detailed exception stack?


At 2013-03-29 00:48:28,"Paul Gale" <paul.n.gale@gmail.com> wrote:
>Hi Ali,
>
>Are you using the JDBCIOExceptionHandler with your broker? That _should_
>help.
>
>By default a broker is assigned the DefaultIOExceptionHandler to handle
>exceptions. You should probably change it out to use the
>JDBCIOExceptionHandler instead as mentioned here:
>http://activemq.apache.org/configurable-ioexception-handling.html.
>
>The page doesn't mention the JDBCIOExceptionHandler explicitly (which it
>should), however, it has the same configuration options as the default
>handler but different defaults. It defaults 'ignoreSQLExceptions' to false
>and 'stopStartConnectors' to true. The JDBCIOExceptionHandler understands
>how to deal with pluggable lockers (if present) to determine lock ownership.
>
>One would have thought that the documentation would emphasize this more.
>Alternatively it could switch out the default exception handler to be
>JDBCIOExceptionHandler when it detects that a jdbcPersistenceAdapter is
>being used.
>
>Thanks,
>Paul
>
>On Thu, Mar 28, 2013 at 11:08 AM, schweet <aktarali@gmail.com> wrote:
>>
>> Hi;
>>
>> Yes, I am having to use the lease DB feature. No other way round it.
>>         <persistenceAdapter>
>>                 <jdbcPersistenceAdapter dataDirectory="${activemq.data}"
>> dataSource="#mysql-ds" lockKeepAlivePeriod="5000">
>>                 <locker>
>>                        <lease-database-locker
>> lockAcquireSleepInterval="8000"/>
>>                 </locker>
>>         </jdbcPersistenceAdapter>
>>         </persistenceAdapter>
>>
>>
>> I have found other problems with the version of activemq that I'm running.
>> 5.7 has issues with Failover. For example, if you have multi master mesh
>> MYSQL setup, master activemq connects to 1 DB, grabs a lock, the other mq
>> nodes try to get a lease, they cant, they keep trying and trying with
>sleep
>> time as above. All good so far...Then I tried taking down 1 db host, MQ
>> master switches nicely to the 2nd DB host, I taken take down the 2nd DB
>host
>> expecting it to connect to the 3rd DB, it doesnt. Throws an exception and
>> leaves the JMS 61616 running, another MQ node then grabs the lease off one
>> of the DB's and starts 61616 thinking that its now master. Problem here
>is,
>> I have a Network LB which is being consumed by client that use the jms
>queue
>> as some clients cannot utilise the failover string, this vip obviously has
>> to use something for keepalive - it uses 61616 to route traffic to the
>> active MQ node. When the former master MQ node fails to cleanly close
>> 61616/or become a slave after an exception (db failure), the vip is
>sending
>> traffic to the dead MQ as 61616 is still active!
>>
>> Good god! Its a nightmare. Can someone help? Has 5.8 resolved this issue?
>I
>> hope? Please someone advise.
>>
>>
>> thanks
>> Ali.
>>
>>
>>
>> --
>> View this message in context:
>http://activemq.2283324.n4.nabble.com/ActiveMQ-Master-slave-with-MySQLCluster-backend-tp4341454p4665253.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message