Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B832AE1F1 for ; Fri, 8 Feb 2013 11:46:04 +0000 (UTC) Received: (qmail 63983 invoked by uid 500); 8 Feb 2013 11:46:04 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 63609 invoked by uid 500); 8 Feb 2013 11:45:59 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 63577 invoked by uid 99); 8 Feb 2013 11:45:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 11:45:58 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of suonayi2006@163.com designates 220.181.13.62 as permitted sender) Received: from [220.181.13.62] (HELO m13-62.163.com) (220.181.13.62) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 11:45:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Received:Date:From:To:Subject:In-Reply-To: References:Content-Type:MIME-Version:Message-ID; bh=yqhPZdiCWGhU WIAMzkcvDOGZxs6RyVUu45bMRuO+8OA=; b=NJNtOEfFOSuE+QhGrvl81vC2LTq6 s3rGsnJtefIqLGvnlyOAaik1sv8hEp0utlBS3ZjpTCxerxzHsR8Q5QIJSv5O6OyM CsnprtygiTPG+HXfqd3OTtsDkktOuC4QzKQuog1cHog+gs7Y0K0C18EWhKIovxlQ 72ugcf2O9I1W4mU= Received: from suonayi2006$163.com ( [114.249.241.86] ) by ajax-webmail-wmsvr62 (Coremail) ; Fri, 8 Feb 2013 19:45:26 +0800 (CST) X-Originating-IP: [114.249.241.86] Date: Fri, 8 Feb 2013 19:45:26 +0800 (CST) From: SuoNayi To: users@activemq.apache.org Subject: Re:lease-database-locker allowing multiple brokers to become master X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20130124(21453.5226.5222) Copyright (c) 2002-2013 www.mailtech.cn 163com In-Reply-To: References: X-CM-CTRLDATA: qRvHp2Zvb3Rlcl9odG09NjE0ODo4MQ== Content-Type: multipart/alternative; boundary="----=_Part_182341_1311834726.1360323926002" MIME-Version: 1.0 Message-ID: <223b5c44.c2ef.13cb99fd7f2.Coremail.suonayi2006@163.com> X-CM-TRANSID: PsGowECJsEBW5RRREZVeAA--.1760W X-CM-SenderInfo: xvxr0td1lsiiqw6rljoofrz/xtbBEAK9GlD+MviSuwACs6 X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_182341_1311834726.1360323926002 Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: 7bit Hi, lockAcquireSleepInterval should be greater than lockKeepAlivePeriod always. My guess is that misconfiguration will case that the role of master broker would be switched once one of slaves requires the lease database lock. You may have a look at https://issues.apache.org/jira/browse/AMQ-3654. At 2013-02-06 03:44:39,"Travis Klotz" wrote: >Ok, i'm working with 5.7 and am trying out the lease-database-locker >and am having issues with both of my test instances becoming master. >I assume I must be doing something very obviously wrong but I can't >figure it out. > >I'm starting with a base 5.7 windows zip setup run from the command >line (no services). I add my oracle database driver to the lib/extra >directory. I modify activemq.xml, change the broker name to "svr1", >modify the persistenceAdapter to look like this: > > > > > > > > > >Remove the jetty include, change the openwire port number (to avoid >conflicting with my current 5.6 instance) like so: > > > > uri="tcp://0.0.0.0:51616?maximumConnections=1000&wireformat.maxFrameSize=104857600"/> > > >And then add my database datasource after the broker definition: > >class="org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS"> > > > > > > >class="org.apache.commons.dbcp.datasources.SharedPoolDataSource" >destroy-method="close"> > > > > > > > > >I then fire up the server and everything seems to be working properly. > The lock table says "svr1" and the timestap is updated every few >seconds. > >I shutdown the server, copy the entire install directory to another >location on the same machine and modify the copied activemq.xml file. >I change the broker name to "svr2" and update the port number "41616". > Next I start up SVR1, everything goes as expected, database is >updated, JMX reports this instance is not a slave. Next I start up >SVR2, it loads says it is attempting to acquire the lease and then >says that it is becoming master, the database is updated with SVR2 and >JMX reports that SVR2 is not the slave. However nothing seems to >have changed on SVR1, nothing new in the logs, JMX still reports >that it is still not the save instance. > >About 10% of the time when I start SVR2, it tries to get the lease >and fails, waits its 5 seconds and tries again, succeeds and once >again leaveing SVR1 in some kind of limbo state. > >Any ideas what I'm doing wrong? > >Travis ------=_Part_182341_1311834726.1360323926002--