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 9F693DBC8 for ; Tue, 24 Jul 2012 15:22:45 +0000 (UTC) Received: (qmail 54245 invoked by uid 500); 24 Jul 2012 15:22:45 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 54078 invoked by uid 500); 24 Jul 2012 15:22:44 -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 54049 invoked by uid 99); 24 Jul 2012 15:22:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 15:22:43 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.212.179 as permitted sender) Received: from [209.85.212.179] (HELO mail-wi0-f179.google.com) (209.85.212.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 15:22:39 +0000 Received: by wibhq4 with SMTP id hq4so3383850wib.14 for ; Tue, 24 Jul 2012 08:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=S55DW6OYKwY6xoPNAPHRdES3LZc/mtrVVNpUQXWYCN0=; b=yzk1Ow9pAgl68bmfsHKpfZgzTlV+tQqbcdM9lfN1MLJvkR6s5L+fzpNq870bpmvwgN BKSpQdF2tMLxgNVQoEDTRtXAtJJj4ZxamrlNoNFHwQ6x29ezUyliaNCbKHEPq1vBll9u 5Eb+BMnXhywMJEGECr0zl2phAYb5cnSgzOKkpQ+fvxviOreLQxmHkCl0XW7AfTtZ9qx1 Wcm57BS4UOWadPPKmJvxbS5dRyXugh+KVWxppgnT0JBFnuq2SCVj0Y+AoyxQv3sbWLdR tSK2f6Mx2fsir8s3tGbo0VMZWb5oo5Rnx9228XBm9v8zisVUIDExrS1cgqDmUaV/YyLK 2pGQ== MIME-Version: 1.0 Received: by 10.216.136.230 with SMTP id w80mr10985981wei.199.1343143337765; Tue, 24 Jul 2012 08:22:17 -0700 (PDT) Received: by 10.194.54.66 with HTTP; Tue, 24 Jul 2012 08:22:17 -0700 (PDT) In-Reply-To: <1342770529832-4654188.post@n4.nabble.com> References: <1342770529832-4654188.post@n4.nabble.com> Date: Tue, 24 Jul 2012 16:22:17 +0100 Message-ID: Subject: Re: Unable to re-establish network connection From: Gary Tully To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org can you try with more logging: enable DEBUG level logging for org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent there may be something interesting in there on the failure to reconnect case. On 20 July 2012 08:48, sandy wrote: > I have a local broker that must infinitely re-establish connection to a > cluster of broker (master/slave) when network is down. > > What I encounter is that sometimes my local broker can re-establish when > network is up but sometimes it just die and stop fwding message. The problem > is kind of intermittent. > Can somebody help me on how to configure network connector so that It will > ALWAYS automatically re-establish the network bridge? > I m using activemq 5.6.0 and current configuration is as follow > > > > uri="static:(failover:(tcp://master,tcp://slave)?randomize=false&maxReconnectAttempts=0)?useExponentialBackOff=false&maxReconnectDelay=9000000" > staticBridge="true" > > > > > > > Thanks > > > -- succesfully reestablish > > 2012-07-20 11:43:17,095 | ERROR | Failed to connect to > [tcp://203.127.254.43:61616, tcp://203.127.254.43:61613] after: 1 attempt(s) > | org.apache.activemq.transport.failover.FailoverTransport | ActiveMQ > Task-12 > 2012-07-20 11:43:17,095 | WARN | Network connection between > vm://local_station_2#336 and unconnected shutdown due to a remote error: > java.net.NoRouteToHostException: No route to host: connect | > org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ Task-12 > 2012-07-20 11:43:17,095 | INFO | Connector vm://local_station_2 Stopped | > org.apache.activemq.broker.TransportConnector | ActiveMQ Task-4 > 2012-07-20 11:43:18,095 | INFO | Establishing network connection from > vm://local_station_2?async=false&network=true to > failover:(tcp://203.127.254.43:61616,tcp://203.127.254.43:61613)?randomize=false&maxReconnectAttempts=0 > | org.apache.activemq.network.DiscoveryNetworkConnector | ActiveMQ Task-14 > 2012-07-20 11:43:18,095 | INFO | Connector vm://local_station_2 Started | > org.apache.activemq.broker.TransportConnector | ActiveMQ Task-14 > 2012-07-20 11:43:18,110 | ERROR | Failed to connect to > [tcp://203.127.254.43:61616, tcp://203.127.254.43:61613] after: 1 attempt(s) > | org.apache.activemq.transport.failover.FailoverTransport | ActiveMQ Task-4 > 2012-07-20 11:43:18,110 | WARN | Network connection between > vm://local_station_2#338 and unconnected shutdown due to a remote error: > java.net.NoRouteToHostException: No route to host: connect | > org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ Task-4 > 2012-07-20 11:43:18,110 | INFO | Connector vm://local_station_2 Stopped | > org.apache.activemq.broker.TransportConnector | ActiveMQ Task-8 > 2012-07-20 11:43:19,110 | INFO | Establishing network connection from > vm://local_station_2?async=false&network=true to > failover:(tcp://203.127.254.43:61616,tcp://203.127.254.43:61613)?randomize=false&maxReconnectAttempts=0 > | org.apache.activemq.network.DiscoveryNetworkConnector | ActiveMQ Task-14 > 2012-07-20 11:43:19,110 | INFO | Connector vm://local_station_2 Started | > org.apache.activemq.broker.TransportConnector | ActiveMQ Task-14 > 2012-07-20 11:43:19,110 | INFO | Successfully connected to > tcp://203.127.254.43:61616 | > org.apache.activemq.transport.failover.FailoverTransport | ActiveMQ Task-13 > 2012-07-20 11:43:19,157 | INFO | Network connection between > vm://local_station_2#340 and > tcp://203.127.254.43:61616(server_primaryBroker) has been established. | > org.apache.activemq.network.DemandForwardingBridgeSupport | > StartLocalBridge: localBroker=vm://local_station_2#340 > > > > -- with same configuration , nothing changes but it cant reestablish ( > "Connection reset, not attempting to automatically reconnect") > > 2012-07-20 15:18:28,873 | INFO | Network connection between > vm://local_station_2#466 and > tcp://203.127.254.43:61616(server_primaryBroker) has been established. | > org.apache.activemq.network.DemandForwardingBridgeSupport | > StartLocalBridge: localBroker=vm://local_station_2#466 > 2012-07-20 15:19:17,578 | WARN | Transport (tcp://203.127.254.43:61616) > failed, reason: java.net.SocketException: Connection reset, not attempting > to automatically reconnect | > org.apache.activemq.transport.failover.FailoverTransport | ActiveMQ > Transport: tcp:///203.127.254.43:61616 > 2012-07-20 15:19:17,578 | INFO | Network connection between > vm://local_station_2#466 and unconnected shutdown due to a local error: > java.net.SocketException: Connection reset | > org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ > Transport: tcp:///203.127.254.43:61616 > 2012-07-20 15:19:17,593 | INFO | Network connection between > vm://local_station_2#466 and unconnected shutdown due to a local error: > java.net.SocketException: Connection reset | > org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ > Transport: tcp:///203.127.254.43:61616 > 2012-07-20 15:19:17,593 | INFO | Establishing network connection from > vm://local_station_2?async=false&network=true to > failover:(tcp://203.127.254.43:61616,tcp://203.127.254.43:61613)?randomize=false&maxReconnectAttempts=0 > | org.apache.activemq.network.DiscoveryNetworkConnector | ActiveMQ Task-31 > 2012-07-20 15:19:17,640 | INFO | Connector vm://local_station_2 Started | > org.apache.activemq.broker.TransportConnector | ActiveMQ Task-31 > 2012-07-20 15:19:17,625 | INFO | Connector vm://local_station_2 Stopped | > org.apache.activemq.broker.TransportConnector | ActiveMQ Task-30 > 2012-07-20 15:19:17,640 | INFO | local_station_2 bridge to > server_primaryBroker stopped | > org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ Task-30 > 2012-07-20 15:19:17,703 | ERROR | Failed to connect to > [tcp://203.127.254.43:61616, tcp://203.127.254.43:61613] after: 1 attempt(s) > | org.apache.activemq.transport.failover.FailoverTransport | ActiveMQ > Task-28 > 2012-07-20 15:19:17,718 | WARN | Network connection between > vm://local_station_2#468 and unconnected shutdown due to a remote error: > java.net.NoRouteToHostException: No route to host: connect | > org.apache.activemq.network.DemandForwardingBridgeSupport | ActiveMQ Task-28 > 2012-07-20 15:19:17,718 | WARN | Network connection between > vm://local_station_2#468 and unconnected shutdown due to a remote error: > java.net.NoRouteToHostException: No route to host: connect | > org.apache.activemq.network.DemandForwardingBridgeSupport | > StartRemoteBridge: remoteBroker=unconnected > 2012-07-20 15:19:17,718 | INFO | Connector vm://local_station_2 Stopped | > org.apache.activemq.broker.TransportConnector | ActiveMQ Task-30 > > > > > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Unable-to-re-establish-network-connection-tp4654188.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://fusesource.com http://blog.garytully.com