Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6DB37200C66 for ; Sun, 30 Apr 2017 22:04:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 68002160BA4; Sun, 30 Apr 2017 20:04:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 869CE160B8C for ; Sun, 30 Apr 2017 22:04:47 +0200 (CEST) Received: (qmail 35214 invoked by uid 500); 30 Apr 2017 20:04:41 -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 35202 invoked by uid 99); 30 Apr 2017 20:04:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Apr 2017 20:04:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DB4F4C01DB for ; Sun, 30 Apr 2017 20:04:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.148 X-Spam-Level: X-Spam-Status: No, score=0.148 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id BLx0G0q_Q3zP for ; Sun, 30 Apr 2017 20:04:38 +0000 (UTC) Received: from nm40-vm1.bullet.mail.bf1.yahoo.com (nm40-vm1.bullet.mail.bf1.yahoo.com [72.30.239.209]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D24A45F36F for ; Sun, 30 Apr 2017 20:04:37 +0000 (UTC) Received: from [66.196.81.173] by nm40.bullet.mail.bf1.yahoo.com with NNFMP; 30 Apr 2017 20:04:31 -0000 Received: from [98.139.211.162] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 30 Apr 2017 20:04:31 -0000 Received: from [127.0.0.1] by smtp219.mail.bf1.yahoo.com with NNFMP; 30 Apr 2017 20:04:31 -0000 X-Yahoo-Newman-Id: 195205.24167.bm@smtp219.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: a.Sva_kVM1kVzgm91Qdg_4e56PU19Ar26V_5AgGyfh4omir 0w4XvAiGhC5azsWpJE3k2W1DYD04Q_iNP9H47wYc7_w1S59qf4aUCSyts9ou Ka2zKWI3MsEWndFX2C2yu9GwbunFlTt_8PrAMaTgXzlF3fHV6yopDK5vjgar njuGjHnlSPj_hjTApItawGyhWPS3QmgKPUIDk.vnNZbBrVHhBOcwxo3RKPnc 3o8aFNse8uuh.sIIQ23HDtKhrKchABNiBxaFdvWv8ktTbPw_XmuvtnITC8gb HtV20LbmsP27Q31rjvfKYEtitwSp0ic2MoL9LkZQWHza3SAt_WjY_oUCaYIv 4lgoHr.HbU5GbKX9rDT5ZJKfsnQIVnNOERoCzjlTkfDm5IGix2PuXWMIqRZM TmsD0E7nDAsgh5VYj_DQAp_ZibiVhWJrhJ4r98fELqPW9l9yIzNX2PcGzDeT bmp8JZFVvIudVgqYE3rJoJLUMTzUBI6sgp0RwYAIzhlsRSkTTdboHtqLQBgv nOGUdw2NA2GHsV9DNkaQUeSQt3Nnnn7ZN7l.Cl5BqpQ-- X-Yahoo-SMTP: uvldg1aswBDAGjrCtRmdM_TbPcQ- Subject: Re: Re: Failover - send timeout not working To: Tim Bain , ActiveMQ Users References: From: Martin Lichtin Message-ID: Date: Sun, 30 Apr 2017 22:04:36 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit archived-at: Sun, 30 Apr 2017 20:04:48 -0000 JIRA: https://issues.apache.org/jira/browse/AMQ-6666 I'm running now with a patched version without the "command.isMessage()" condition and fail-over behaviour has substantially improved. Can't really judge whether it is the correct fix, however. - Martin On 30.04.2017 18:50, Tim Bain wrote: > It does seem like there needs to be another path out of that code block, > though I wonder if the expectation was that nothing that wasn't a message > would ever make it to that block. Either way, it seems to not be working > the way it should, so please submit a bug in JIRA for the problem. > > Tim > > On Apr 29, 2017 4:24 AM, "Martin Lichtin" wrote: > >> I'm running into a situation with the Failover Transport not respecting >> the timeout that's been set. >> The symptom is endless messages of this kind: >> >> 2017-04-29 09:48:26,128 | TRACE | .engine.cfgengine.in]-11 | >> FailoverTransport | sport.failover.FailoverTransport 615 | >> 81 - org.apache.activemq.activemq-osgi - 5.14.0 | Waiting for transport >> to reconnect..: TransactionInfo {commandId = 127798, responseRequired = >> true, type = 7, connectionId = ID:inucdev4-57330-1493370444659-3:3, >> transactionId = XID:[1096044365,globalId=63747 >> 26c6366672d656e67696e653130333530323030303034,branchId=63747 >> 26c6366672d656e67696e6531313036383134]} >> 2017-04-29 09:48:26,228 | TRACE | .engine.cfgengine.in]-11 | >> FailoverTransport | sport.failover.FailoverTransport 615 | >> 81 - org.apache.activemq.activemq-osgi - 5.14.0 | Waiting for transport >> to reconnect..: TransactionInfo {commandId = 127798, responseRequired = >> true, type = 7, connectionId = ID:inucdev4-57330-1493370444659-3:3, >> transactionId = XID:[1096044365,globalId=63747 >> 26c6366672d656e67696e653130333530323030303034,branchId=63747 >> 26c6366672d656e67696e6531313036383134]} >> 2017-04-29 09:48:26,329 | TRACE | .engine.cfgengine.in]-11 | >> FailoverTransport | sport.failover.FailoverTransport 615 | >> 81 - org.apache.activemq.activemq-osgi - 5.14.0 | Waiting for transport >> to reconnect..: TransactionInfo {commandId = 127798, responseRequired = >> true, type = 7, connectionId = ID:inucdev4-57330-1493370444659-3:3, >> transactionId = XID:[1096044365,globalId=63747 >> 26c6366672d656e67696e653130333530323030303034,branchId=63747 >> 26c6366672d656e67696e6531313036383134]} >> 2017-04-29 09:48:26,429 | TRACE | .engine.cfgengine.in]-11 | >> FailoverTransport | sport.failover.FailoverTransport 615 | >> 81 - org.apache.activemq.activemq-osgi - 5.14.0 | Waiting for transport >> to reconnect..: TransactionInfo {commandId = 127798, responseRequired = >> true, type = 7, connectionId = ID:inucdev4-57330-1493370444659-3:3, >> transactionId = XID:[1096044365,globalId=63747 >> 26c6366672d656e67696e653130333530323030303034,branchId=63747 >> 26c6366672d656e67696e6531313036383134]} >> 2017-04-29 09:48:26,530 | TRACE | .engine.cfgengine.in]-11 | >> FailoverTransport | sport.failover.FailoverTransport 615 | >> 81 - org.apache.activemq.activemq-osgi - 5.14.0 | Waiting for transport >> to reconnect..: TransactionInfo {commandId = 127798, responseRequired = >> true, type = 7, connectionId = ID:inucdev4-57330-1493370444659-3:3, >> transactionId = XID:[1096044365,globalId=63747 >> 26c6366672d656e67696e653130333530323030303034,branchId=63747 >> 26c6366672d656e67696e6531313036383134]} >> ... >> 2017-04-29 09:48:33,270 | TRACE | .engine.cfgengine.in]-11 | >> FailoverTransport | sport.failover.FailoverTransport 615 | >> 81 - org.apache.activemq.activemq-osgi - 5.14.0 | Waiting for transport >> to reconnect..: TransactionInfo {commandId = 127798, responseRequired = >> true, type = 7, connectionId = ID:inucdev4-57330-1493370444659-3:3, >> transactionId = XID:[1096044365,globalId=63747 >> 26c6366672d656e67696e653130333530323030303034,branchId=63747 >> 26c6366672d656e67696e6531313036383134]} >> 2017-04-29 09:48:33,371 | TRACE | .engine.cfgengine.in]-11 | >> FailoverTransport | sport.failover.FailoverTransport 615 | >> 81 - org.apache.activemq.activemq-osgi - 5.14.0 | Waiting for transport >> to reconnect..: TransactionInfo {commandId = 127798, responseRequired = >> true, type = 7, connectionId = ID:inucdev4-57330-1493370444659-3:3, >> transactionId = XID:[1096044365,globalId=63747 >> 26c6366672d656e67696e653130333530323030303034,branchId=63747 >> 26c6366672d656e67696e6531313036383134]} >> >> >> It seems to never get out of this loop: >> >> while (transport == null && !disposed && connectionFailure == null >> && !Thread.currentThread().isInterrupted() && >> willReconnect()) { >> >> LOG.trace("Waiting for transport to reconnect..: {}", command); >> long end = System.currentTimeMillis(); >> if (command.isMessage() && timeout > 0 && (end - start > timeout)) >> { >> timedout = true; >> LOG.info("Failover timed out after {} ms", (end - start)); >> break; >> } >> try { >> reconnectMutex.wait(100); >> } catch (InterruptedException e) { >> Thread.currentThread().interrupt(); >> LOG.debug("Interupted:", e); >> } >> transport = connectedTransport.get(); >> } >> >> The timeout is set to 5000ms and should have hit a long time ago, but I >> guess "command.isMessage()" returns false in this situation? >> Any reason this condition is needed? It seems to me anything that can't be >> sent within the timeout should cause the throw. >> >> - Martin >> >>