failover invalid connect parameters

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

failover invalid connect parameters

qt4x11
We are trying to instantiate a new ActiveMQConnectionFactory in our code
using the brokerURL

failover:(ssl://107.22.0.25:61616,ssl://174.129.78.76:61616
)?tcp.keepAlive=true

This does not work.  We get a stack trace during application deployment

14:47:19,203 ERROR [stderr] (MSC service thread 1-1) Caused by:
java.lang.IllegalArgumentException: Invalid connect parameters:
{tcp.keepAlive=true}
14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:64)
14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
14:47:19,203 ERROR [stderr] (MSC service thread 1-1) ... 30 more


If we remove options from the brokerURL

failover:(ssl://107.22.0.25:61616,ssl://174.129.78.76:61616)

we're able to deploy successfully.

We are using ActiveMQ 5.5.0.  What is it about the keepAlive option we're
appending to the failover brokerURL that is causing deployment errors?  Is
there any way we can use tcp keepAlive with failover?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: failover invalid connect parameters

tabish121@gmail.com
On Thu, 2011-10-20 at 17:34 -0500, qt4x11 wrote:
> We are trying to instantiate a new ActiveMQConnectionFactory in our code
> using the brokerURL
>
> failover:(ssl://107.22.0.25:61616,ssl://174.129.78.76:61616
> )?tcp.keepAlive=true
>

Try this:

failover:(ssl://107.22.0.25:61616?keepAlive=true,ssl://174.129.78.76:61616?keepAlive=true)

Transport options go on the specific transport, keepAlive is not a
property of the failover transport.  Tcp KeepAlive isn't really all that
helpful though as it only checks every two hours or so for a connection
by default.  The InactivityMonitor will be sending its own keep alive
commands between broker and client which should be all you need.

> This does not work.  We get a stack trace during application deployment
>
> 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) Caused by:
> java.lang.IllegalArgumentException: Invalid connect parameters:
> {tcp.keepAlive=true}
> 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:64)
> 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
> 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
> 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
> 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
> 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) ... 30 more
>
>
> If we remove options from the brokerURL
>
> failover:(ssl://107.22.0.25:61616,ssl://174.129.78.76:61616)
>
> we're able to deploy successfully.
>
> We are using ActiveMQ 5.5.0.  What is it about the keepAlive option we're
> appending to the failover brokerURL that is causing deployment errors?  Is
> there any way we can use tcp keepAlive with failover?
>
> Thanks.

--
Tim Bish
------------
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/



Reply | Threaded
Open this post in threaded view
|

Re: failover invalid connect parameters

qt4x11
Worked like a charm!  Thank you!

On Thu, Oct 20, 2011 at 5:54 PM, Timothy Bish <[hidden email]> wrote:

> On Thu, 2011-10-20 at 17:34 -0500, qt4x11 wrote:
> > We are trying to instantiate a new ActiveMQConnectionFactory in our code
> > using the brokerURL
> >
> > failover:(ssl://107.22.0.25:61616,ssl://174.129.78.76:61616
> > )?tcp.keepAlive=true
> >
>
> Try this:
>
> failover:(ssl://
> 107.22.0.25:61616?keepAlive=true,ssl://174.129.78.76:61616?keepAlive=true)
>
> Transport options go on the specific transport, keepAlive is not a
> property of the failover transport.  Tcp KeepAlive isn't really all that
> helpful though as it only checks every two hours or so for a connection
> by default.  The InactivityMonitor will be sending its own keep alive
> commands between broker and client which should be all you need.
>
> > This does not work.  We get a stack trace during application deployment
> >
> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) Caused by:
> > java.lang.IllegalArgumentException: Invalid connect parameters:
> > {tcp.keepAlive=true}
> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> >
> org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:64)
> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> >
> org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> >
> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> >
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
> >
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) ... 30 more
> >
> >
> > If we remove options from the brokerURL
> >
> > failover:(ssl://107.22.0.25:61616,ssl://174.129.78.76:61616)
> >
> > we're able to deploy successfully.
> >
> > We are using ActiveMQ 5.5.0.  What is it about the keepAlive option we're
> > appending to the failover brokerURL that is causing deployment errors?
>  Is
> > there any way we can use tcp keepAlive with failover?
> >
> > Thanks.
>
> --
> Tim Bish
> ------------
> FuseSource
> Email: [hidden email]
> Web: http://fusesource.com
> Twitter: tabish121
> Blog: http://timbish.blogspot.com/
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: failover invalid connect parameters

ccorsi
I think you can also replace tcp.keepAlive=true with transport.keepAlive.

--Claudio




>________________________________
>From: qt4x11 <[hidden email]>
>To: [hidden email]
>Sent: Friday, October 21, 2011 12:42 PM
>Subject: Re: failover invalid connect parameters
>
>Worked like a charm!  Thank you!
>
>On Thu, Oct 20, 2011 at 5:54 PM, Timothy Bish <[hidden email]> wrote:
>
>> On Thu, 2011-10-20 at 17:34 -0500, qt4x11 wrote:
>> > We are trying to instantiate a new ActiveMQConnectionFactory in our code
>> > using the brokerURL
>> >
>> > failover:(ssl://107.22.0.25:61616,ssl://174.129.78.76:61616
>> > )?tcp.keepAlive=true
>> >
>>
>> Try this:
>>
>> failover:(ssl://
>> 107.22.0.25:61616?keepAlive=true,ssl://174.129.78.76:61616?keepAlive=true)
>>
>> Transport options go on the specific transport, keepAlive is not a
>> property of the failover transport.  Tcp KeepAlive isn't really all that
>> helpful though as it only checks every two hours or so for a connection
>> by default.  The InactivityMonitor will be sending its own keep alive
>> commands between broker and client which should be all you need.
>>
>> > This does not work.  We get a stack trace during application deployment
>> >
>> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) Caused by:
>> > java.lang.IllegalArgumentException: Invalid connect parameters:
>> > {tcp.keepAlive=true}
>> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
>> >
>> org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:64)
>> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
>> >
>> org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
>> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
>> >
>> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
>> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
>> >
>> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
>> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) at
>> >
>> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
>> > 14:47:19,203 ERROR [stderr] (MSC service thread 1-1) ... 30 more
>> >
>> >
>> > If we remove options from the brokerURL
>> >
>> > failover:(ssl://107.22.0.25:61616,ssl://174.129.78.76:61616)
>> >
>> > we're able to deploy successfully.
>> >
>> > We are using ActiveMQ 5.5.0.  What is it about the keepAlive option we're
>> > appending to the failover brokerURL that is causing deployment errors?
>>  Is
>> > there any way we can use tcp keepAlive with failover?
>> >
>> > Thanks.
>>
>> --
>> Tim Bish
>> ------------
>> FuseSource
>> Email: [hidden email]
>> Web: http://fusesource.com
>> Twitter: tabish121
>> Blog: http://timbish.blogspot.com/
>>
>>
>>
>>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: failover invalid connect parameters

liny
This post was updated on .
In reply to this post by tabish121@gmail.com
Hi,

I don't understand why below two broker URLs don't work:
failover:(tcp://taxsrv01.taiwan.ti.com:61616)?randomize=false;updateURIsSupported=true;maxReconnectAttempts=3;maxReconnectDelay=10000</value>
or
failover:(tcp://taxsrv01.taiwan.ti.com:61616?randomize=false;updateURIsSupported=true;maxReconnectAttempts=3;maxReconnectDelay=10000,tcp://RNA0297887.apr.dhcp.ti.com:61616?randomize=false;updateURIsSupported=true;maxReconnectAttempts=3;maxReconnectDelay=10000)
I still get
reason: java.lang.IllegalArgumentException: Invalid connect parameters: {randomize=false;updateURIsSupported=true;maxReconnectAttempts=3;maxReconnectDelay=10000}

Any help is appreciated!!!!
Reply | Threaded
Open this post in threaded view
|

Re: failover invalid connect parameters

gtully
have a look through some of the usage in the tests. I gave google code
search a whirl to pull them out, the result is reasonable:
http://www.google.com/codesearch#search/&q=%22failover%22%20lang:%5Ejava$%20license:%5Eapache$%20activemq&type=cs

On 21 December 2011 09:58, liny <[hidden email]> wrote:

> Hi,
>
> I don't understand why below two broker URLs don't work:
>
>
> I still get
>
>
> Any help is appreciated!!!!
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/failover-invalid-connect-parameters-tp3923668p4221073.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
http://fusesource.com
http://blog.garytully.com
Reply | Threaded
Open this post in threaded view
|

Re: failover invalid connect parameters

liny
This post was updated on .
Hi, Gary:

Thanks for reply.
I changed to
failover:(tcp://taxsrv01.taiwan.ti.com:61616)?randomize=false&amp;updateURIsSupported=true&amp;maxReconnectAttempts=3&amp;maxReconnectDelay=10000
Yes, I must use
"&amp;"
 to replace "&", can't just use "&" in your broker URL.
That's very strange!
Reply | Threaded
Open this post in threaded view
|

Re: failover invalid connect parameters

gtully
That is because XML has some 'special characters' that need encoding; see
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

On 21 December 2011 12:37, liny <[hidden email]> wrote:

> Hi, Gary:
>
> Thanks for reply.
> I changed to
>
> Yes, I must use "&amp;" to replace "&", can't just use "&" in your broker
> URL.
> That's very strange!
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/failover-invalid-connect-parameters-tp3923668p4221517.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
http://fusesource.com
http://blog.garytully.com