You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Greenbean <ur...@gmail.com> on 2013/07/23 23:28:37 UTC

ActiveMQ 5.8 FailoverTransport - Invalid connect parameters

We are having problems with the failovertransport after upgrading to ActiveMQ
5.8.  Previously we could use a URL as shown below.  However, after
upgrading to the 5.8 client libraries we get an Invalid connect parameters
error.  I have tried various combinations (failover:// and failover: without
the //) but nothing seems to work.  Has anyone else run in to this problem?

failover://(tcp://myhost:61616)?initialReconnectDelay=100

Caused by: java.lang.IllegalArgumentException: Invalid connect parameters:
{initialReconnectDelay=100}
	at
org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:64)
	at
org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
	at
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:64)
	at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-8-FailoverTransport-Invalid-connect-parameters-tp4669644.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.8 FailoverTransport - Invalid connect parameters

Posted by Joseph Butler <jb...@redhat.com>.
Hello,

I had a similar issue in a custom OSGi environment.  When evaluating the
transport connection parameters, ActiveMQ uses an IntrospectionSupport
package to look at the transport connection parameters and create a map of
key value pairs.  As part of this IntrospectionSupport package, it does a
check to see if the class you are working with is SSLServerSocket. In this
case we are not (the clazz is
org.apache.activemq.transport.failover.FailoverTransport), but
javax.net.ssl.SSLServerSocket needs to be on the classpath in order to
evaulate.  

In the environment I was in, javax.net.ssl was not available to the bundle
in the OSGi container.   Adding javax.net.ssl to the environment solved this
issue.

This may not be the reason for your failure, but just wanted to share my
experience.

Joe



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-8-FailoverTransport-Invalid-connect-parameters-tp4669644p4675343.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.8 FailoverTransport - Invalid connect parameters

Posted by Gary Tully <ga...@gmail.com>.
thanks for closing the loop on this - for sure it is non obvious

On 20 March 2014 20:05, gilesD <gi...@gmail.com> wrote:
> "failover://(tcp://myhost:61616)?initialReconnectDelay=100
> Caused by: java.lang.IllegalArgumentException: Invalid connect parameters:
> {initialReconnectDelay=100} "
>
> I had a similar issue, the URI is perfectly valid, after looking into the
> activemq source I found that when it was trying to set the failover
> transport properties it was throwing an exception because it could not find
> the converter from the TypeConversionSupport converters list in
> activemq-client and as a result the properties were not set and you would
> get the "Invalid connect parameters" error.
>
> This issue was because of a missing TypeConverter, The converters were not
> initializied properly, There are 25 converters but only 7 were loaded. The
> converter that we needed was the String to Long but it was missing because
> of an error when creating the converter for UTF8Buffer i.e.
> CONVERSION_MAP.put(new ConversionKey(UTF8Buffer.class, String.class),
> toStringConverter);
>
>
> The UTF8Buffer class could not found in my project as a result the remaining
> converters were not loaded, so I had to download and add the jar hawtbuf19
> and this took care of the issue.
> http://www.java2s.com/Code/Jar/h/Downloadhawtbuf19jar.htm
> <http://www.java2s.com/Code/Jar/h/Downloadhawtbuf19jar.htm >
>
> Greenbean wrote
>> We are having problems with the failovertransport after upgrading to
>> ActiveMQ 5.8.  Previously we could use a URL as shown below.  However,
>> after upgrading to the 5.8 client libraries we get an Invalid connect
>> parameters error.  I have tried various combinations (failover:// and
>> failover: without the //) but nothing seems to work.  Has anyone else run
>> in to this problem?
>>
>> failover://(tcp://myhost:61616)?initialReconnectDelay=100
>>
>> Caused by: java.lang.IllegalArgumentException: Invalid connect parameters:
>> {initialReconnectDelay=100}
>>       at
>> org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:64)
>>       at
>> org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
>>       at
>> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:64)
>>       at
>> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-8-FailoverTransport-Invalid-connect-parameters-tp4669644p4679364.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



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

Re: ActiveMQ 5.8 FailoverTransport - Invalid connect parameters

Posted by gilesD <gi...@gmail.com>.
"failover://(tcp://myhost:61616)?initialReconnectDelay=100 
Caused by: java.lang.IllegalArgumentException: Invalid connect parameters:
{initialReconnectDelay=100} "

I had a similar issue, the URI is perfectly valid, after looking into the
activemq source I found that when it was trying to set the failover
transport properties it was throwing an exception because it could not find
the converter from the TypeConversionSupport converters list in
activemq-client and as a result the properties were not set and you would
get the "Invalid connect parameters" error.

This issue was because of a missing TypeConverter, The converters were not
initializied properly, There are 25 converters but only 7 were loaded. The
converter that we needed was the String to Long but it was missing because
of an error when creating the converter for UTF8Buffer i.e.
CONVERSION_MAP.put(new ConversionKey(UTF8Buffer.class, String.class),
toStringConverter);


The UTF8Buffer class could not found in my project as a result the remaining
converters were not loaded, so I had to download and add the jar hawtbuf19
and this took care of the issue.
http://www.java2s.com/Code/Jar/h/Downloadhawtbuf19jar.htm
<http://www.java2s.com/Code/Jar/h/Downloadhawtbuf19jar.htm >  

Greenbean wrote
> We are having problems with the failovertransport after upgrading to
> ActiveMQ 5.8.  Previously we could use a URL as shown below.  However,
> after upgrading to the 5.8 client libraries we get an Invalid connect
> parameters error.  I have tried various combinations (failover:// and
> failover: without the //) but nothing seems to work.  Has anyone else run
> in to this problem?
> 
> failover://(tcp://myhost:61616)?initialReconnectDelay=100
> 
> Caused by: java.lang.IllegalArgumentException: Invalid connect parameters:
> {initialReconnectDelay=100}
> 	at
> org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:64)
> 	at
> org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
> 	at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:64)
> 	at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)





--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-8-FailoverTransport-Invalid-connect-parameters-tp4669644p4679364.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.8 FailoverTransport - Invalid connect parameters

Posted by Timothy Bish <ta...@gmail.com>.
On 07/23/2013 05:28 PM, Greenbean wrote:
> We are having problems with the failovertransport after upgrading to ActiveMQ
> 5.8.  Previously we could use a URL as shown below.  However, after
> upgrading to the 5.8 client libraries we get an Invalid connect parameters
> error.  I have tried various combinations (failover:// and failover: without
> the //) but nothing seems to work.  Has anyone else run in to this problem?
>
> failover://(tcp://myhost:61616)?initialReconnectDelay=100
>
> Caused by: java.lang.IllegalArgumentException: Invalid connect parameters:
> {initialReconnectDelay=100}
> 	at
> org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:64)
> 	at
> org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
> 	at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:64)
> 	at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-8-FailoverTransport-Invalid-connect-parameters-tp4669644.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
There's a bunch of unit tests that use just such syntax.  If you can 
reproduce it in a JUnit test case than open a new issue in Jira.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/