activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Pernas <os...@pernas.es>
Subject Re: ActiveMQ-CPP client hangs while connecting when ActiveMQ is not running
Date Tue, 10 May 2011 13:56:40 GMT
If you are using  startupMaxReconnectAttempts=3, connection should not block
you. Perhaps could be the way of you are writing the address. I allways set
address like this:

failover://(tcp://localhost:61616)?startupMaxReconnectAttempts=1&initialReconnectDelay=1

and it works fine. Try it.

2011/5/10 Timothy Bish <tabish121@gmail.com>

> On Tue, 2011-05-10 at 13:24 +0100, Suneel Papineni wrote:
> > Hi,
> >
> >
> >
> > I am trying to connect to ActiveMQ which is not running or stopped
> > through an ActiveMQ-CPP client. The application hangs while doing this
> > and I need to kill the application through task manager.  (i.e. getting
> > hung at "connectionFactory->createConnection(uname,pwd,applicationId);"
> > at this statement.
> >
> >
> >
> > When I tried to debug the code, it is hanging at
> > "connection->setDefaultClientId( this->settings->clientId );" in
> > ActiveMQConnectionFactory.cpp. Please find attached output log from
> > Visual Studio.
> >
> >
>
> Because you are using the failover transport the client is waiting for a
> broker to become available to connect to so that it can send the
> connection request with your specified authentication data.
>
> Regards
>
>
> >
> > I am using Broker URI as
> > "failover:tcp://localhost:61616?transport.useInactivityMonitor=true".
> > Also I tried to use
> > "failover:tcp://localhost:61616?startupMaxReconnectAttempts=3&transport.
> > useInactivityMonitor=true". This is also hanging the application.
> >
> >
> >
> > Could someone please let me know how can I solve this and through an
> > exception when ActiveMQ server is not running. Also please let me know
> > if I need to add any more configuration.
> >
> >
> >
> > Thanks & Regards
> >
> > Suneel
> >
> >
> >
> > Debug log from Visual Studio is:
> >
> >
> >
> > 'MBBL_Test_App.exe': Loaded 'C:\Windows\SysWOW64\FWPUCLNT.DLL'
> >
> > 'MBBL_Test_App.exe': Loaded 'C:\Windows\SysWOW64\rasadhlp.dll'
> >
> > 'MBBL_Test_App.exe': Loaded 'C:\Windows\SysWOW64\WSHTCPIP.DLL'
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::net::SocketException at memory location 0x022be228..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be36c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be5b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022be56c..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022be8d4..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bed90..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: activemq::exceptions::ActiveMQException at memory location
> > 0x022bf0b0..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::io::IOException at memory location 0x022bf254..
> >
> > First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++
> > exception: decaf::lang::exceptions::NoSuchElementException at memory
> > location 0x022bf344..
> >
> >
> >
> >
> >
>
> --
> Tim Bish
> ------------
> FuseSource
> Email: tim.bish@fusesource.com
> Web: http://fusesource.com
> Twitter: tabish121
> Blog: http://timbish.blogspot.com/
>
> Connect at CamelOne May 24-26
>
> The Open Source Integration Conference
>
>


-- 
Óscar Pernas Plaza.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message