activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Carlson <gshpsr...@charter.net>
Subject Re: Failover error
Date Thu, 23 Aug 2007 18:59:18 GMT
Does anyone have any insight into this issue? Is this something on my side? Here are some code
snippets:
        	logger.debug("creating QueueConnectionFactory with:"+uri);
            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
            		user,
            		password,
            		uri);
		connection = factory.createQueueConnection(user, password);
             session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

This produces the following in my log:
Aug 23,2007 13:36:51,160 DEBUG main jms.InitialContext - creating QueueConnectionFactory with:failover:(tcp://localhost:61616,tcp://localhost:61616)?initialReconnectDelay=10000;maxReconnectDelay=300000;useExponentialBackOff=false;maxReconnectAttempts=10

and from activemq:
Aug 23,2007 13:36:51,285 DEBUG StartupThread failover.FailoverTransport - Waking up reconnect
task
Aug 23,2007 13:36:51,285 DEBUG ActiveMQ Task failover.FailoverTransport - Attempting connect
to: tcp://localhost:61616
Aug 23,2007 13:36:52,457 DEBUG ActiveMQ Task failover.FailoverTransport - Connect fail to:
tcp://localhost:61616, reason: java.net.ConnectException: Connection refused: connect
Aug 23,2007 13:36:52,457 DEBUG StartupThread failover.FailoverTransport - Started.
Aug 23,2007 13:36:52,457 DEBUG ActiveMQ Task failover.FailoverTransport - Waiting 10 ms before
attempting connection. 
Aug 23,2007 13:36:52,457 DEBUG StartupThread failover.FailoverTransport - Waiting for transport
to reconnect.
Aug 23,2007 13:36:52,473 DEBUG ActiveMQ Task failover.FailoverTransport - Attempting connect
to: tcp://localhost:61616
Aug 23,2007 13:36:53,457 DEBUG ActiveMQ Task failover.FailoverTransport - Connect fail to:
tcp://localhost:61616, reason: java.net.ConnectException: Connection refused: connect
Aug 23,2007 13:36:53,457 DEBUG ActiveMQ Task failover.FailoverTransport - Waiting 20 ms before
attempting connection. 
Aug 23,2007 13:36:53,457 DEBUG StartupThread failover.FailoverTransport - Waiting for transport
to reconnect.
Aug 23,2007 13:36:53,488 DEBUG ActiveMQ Task failover.FailoverTransport - Attempting connect
to: tcp://localhost:61616
Aug 23,2007 13:36:54,473 DEBUG ActiveMQ Task failover.FailoverTransport - Connect fail to:
tcp://localhost:61616, reason: java.net.ConnectException: Connection refused: connect
Aug 23,2007 13:36:54,473 DEBUG StartupThread failover.FailoverTransport - Waiting for transport
to reconnect.
Aug 23,2007 13:36:54,473 DEBUG ActiveMQ Task failover.FailoverTransport - Waiting 40 ms before
attempting connection. 
...which continues in the same manner forever.

Regardless of what options I use, the application behaves in exactly the same way, that is
it uses the defaults as specified on:
http://activemq.apache.org/failover-transport-reference.html

Is my code incorrect? Is this a bug? Does anyone else have any experience with this?

Thanks

---- Dave Carlson <gshpsrule@charter.net> wrote: 
> 
> Hi, It appears as thought maxReconnectAttempts is not working in 4.1.1. I
> create a ActiveMQConnectionFactory with the url
> failover:(tcp://localhost:61616)?initialReconnectDelay=11;maxReconnectDelay=3;maxReconnectAttempts=1
> and it never stops trying to reconnect. Here is some of the output from
> activeMQ in my logs:
> Aug 22,2007 14:42:20,569 DEBUG ActiveMQ Task failover.FailoverTransport -
> Attempting connect to: tcp://localhost:61616
> Aug 22,2007 14:42:21,757 DEBUG ActiveMQ Task failover.FailoverTransport -
> Connect fail to: tcp://localhost:61616, reason: java.net.ConnectException:
> Connection refused: connect
> Aug 22,2007 14:42:21,757 DEBUG main failover.FailoverTransport - Started.
> Aug 22,2007 14:42:21,757 DEBUG ActiveMQ Task failover.FailoverTransport -
> Waiting 10 ms before attempting connection. 
> Aug 22,2007 14:42:21,772 DEBUG main failover.FailoverTransport - Waiting for
> transport to reconnect.
> Aug 22,2007 14:42:21,772 DEBUG ActiveMQ Task failover.FailoverTransport -
> Attempting connect to: tcp://localhost:61616
> Aug 22,2007 14:42:22,788 DEBUG ActiveMQ Task failover.FailoverTransport -
> Connect fail to: tcp://localhost:61616, reason: java.net.ConnectException:
> Connection refused: connect
> Aug 22,2007 14:42:22,788 DEBUG ActiveMQ Task failover.FailoverTransport -
> Waiting 20 ms before attempting connection. 
> Aug 22,2007 14:42:22,788 DEBUG main failover.FailoverTransport - Waiting for
> transport to reconnect.
> Aug 22,2007 14:42:22,804 DEBUG ActiveMQ Task failover.FailoverTransport -
> Attempting connect to: tcp://localhost:61616
> Aug 22,2007 14:42:23,788 DEBUG ActiveMQ Task failover.FailoverTransport -
> Connect fail to: tcp://localhost:61616, reason: java.net.ConnectException:
> Connection refused: connect
> Aug 22,2007 14:42:23,788 DEBUG ActiveMQ Task failover.FailoverTransport -
> Waiting 40 ms before attempting connection. 
> Aug 22,2007 14:42:23,788 DEBUG main failover.FailoverTransport - Waiting for
> transport to reconnect.
> Aug 22,2007 14:42:23,835 DEBUG ActiveMQ Task failover.FailoverTransport -
> Attempting connect to: tcp://localhost:61616
> Aug 22,2007 14:42:24,788 DEBUG ActiveMQ Task failover.FailoverTransport -
> Connect fail to: tcp://localhost:61616, reason: java.net.ConnectException:
> Connection refused: connect
> Aug 22,2007 14:42:24,788 DEBUG ActiveMQ Task failover.FailoverTransport -
> Waiting 80 ms before attempting connection. 
> Aug 22,2007 14:42:24,788 DEBUG main failover.FailoverTransport - Waiting for
> transport to reconnect.
> Aug 22,2007 14:42:24,866 DEBUG ActiveMQ Task failover.FailoverTransport -
> Attempting connect to: tcp://localhost:61616
> Aug 22,2007 14:42:25,804 DEBUG ActiveMQ Task failover.FailoverTransport -
> Connect fail to: tcp://localhost:61616, reason: java.net.ConnectException:
> Connection refused: connect
> Aug 22,2007 14:42:25,804 DEBUG ActiveMQ Task failover.FailoverTransport -
> Waiting 160 ms before attempting connection. 
> Aug 22,2007 14:42:25,804 DEBUG main failover.FailoverTransport - Waiting for
> transport to reconnect.
> Aug 22,2007 14:42:25,960 DEBUG ActiveMQ Task failover.FailoverTransport -
> Attempting connect to: tcp://localhost:61616
> Aug 22,2007 14:42:26,897 DEBUG ActiveMQ Task failover.FailoverTransport -
> Connect fail to: tcp://localhost:61616, reason: java.net.ConnectException:
> Connection refused: connect
> 
> Clearly it is making more than 1 attempt. Is this a known bug? Will it be
> fixed.
> 
> Thanks 
> -- 
> View this message in context: http://www.nabble.com/Failover-error-tf4313690s2354.html#a12281668
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 


Mime
View raw message