Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 896F417932 for ; Wed, 25 Feb 2015 13:18:09 +0000 (UTC) Received: (qmail 85866 invoked by uid 500); 25 Feb 2015 13:18:04 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 85795 invoked by uid 500); 25 Feb 2015 13:18:04 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 85782 invoked by uid 99); 25 Feb 2015 13:18:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2015 13:18:04 +0000 Date: Wed, 25 Feb 2015 13:18:04 +0000 (UTC) From: "Savita (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQ-5588) Failover transport should not hang on startup if it cannot connect & Failover transport timeout options overrides reconnection strategy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-5588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14336465#comment-14336465 ] Savita commented on AMQ-5588: ----------------------------- Hi, If I use startupMaxReconnectAttempts it throws exception and never again reconnects or attempts to connect once AMQ is up again. Can you fix this defect to work like "If AMQ is down once the application is started running, applications successfully reconnect and keep sending messages". However, if AMQ is down, before the application could be started, it throws the following exception and dies. Exception in thread "main" javax.jms.JMSException: Connection refused: connect at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1423) at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1510) at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:325) at test.tutorial.QueueProducer.main(QueueProducer.java:16) Caused by: java.net.ConnectException: Connection refused: connect > Failover transport should not hang on startup if it cannot connect & Failover transport timeout options overrides reconnection strategy > --------------------------------------------------------------------------------------------------------------------------------------- > > Key: AMQ-5588 > URL: https://issues.apache.org/jira/browse/AMQ-5588 > Project: ActiveMQ > Issue Type: Bug > Environment: Unix, Mule ESB, AMQ- 5.9, java > Reporter: Savita > Priority: Blocker > > I am having issues discussed in the 2 defects (AMQ-2114) & (AMQCPP-545) > (AMQ-2114) Failover transport should not hang on startup if it cannot connect > (AMQCPP-545) Failover transport timeout options should only operate on Message sends. > If AMQ is down while on startup, the reconnect strategy does not work and blocks there forever. > To overcome this blocking issue, we are setting timeout on the broker. But, this will throw a Failover timeout exception. > Once this exception occurs, the mule server is not able to deploy the applications which are depending on this connection. However, we have no issues if the connection goes down after the applications are deployed. The applications successfully reconnect to AMQ once, the connection is up. > This problem is happening if the mule server is started while the AMQ is down. The applications fail to get deployed despite the strategy. This is because of the Failover timeout exception. > Here is the part of log: > Caused by: java.io.IOException: Failover timeout of 30000 ms reached. > at org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:532) > at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40) > at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81) > at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86) > at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1284) > Please, help me with the fix. We are using Unix servers. > Let me know if you need more information. -- This message was sent by Atlassian JIRA (v6.3.4#6332)