You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Oscar Pernas <os...@pernas.es> on 2012/04/16 17:33:38 UTC

Activemq IPV6 Client Connection (Java and C++)

Hi all,

Im trying to use ActiveMQ with IPV6 but Im running into some problems. I'm
in debian linux, and seems that ActiveMQ(5.5.1) is up and listening IPV6.

    tcp6   0   0 :::61616      :::*          LISTEN      24671/java

I can make a ping and a telnet to ::1 61616 and all seems that works fine.

Now Im trying to connect two clients (one in Java and one in C++).

-Java client: If I set the uri tcp://[::1]:61616, connection is stablished,
but if I add the failover transport (failover://(tcp://[::1]:61616)), I can
see an Invalid broker URI exception. Its not compatible, or there is
another way to use failover with IPV6?

- C++ Client: Im setting the same URI that it works in Java
(tcp://[::1]:61616) but doesnt work and I get "Resource temporarily
unavailable". Any idea of what coulde be reason? I tested too with a
connection string like this: ""tcp://[fe80::XXX:XXXX:XXXX:XXXX]:61616" and
I'm receiving this error "the requested name is valid and found in
database, but doesnt have the correct data that is trying to resolve".


Any Idea?


thanks in advance

-- 
Óscar Pernas Plaza.

Re: Activemq IPV6 Client Connection (Java and C++)

Posted by Timothy Bish <ta...@gmail.com>.
On Mon, 2012-04-16 at 17:33 +0200, Oscar Pernas wrote: 
> Hi all,
> 
> Im trying to use ActiveMQ with IPV6 but Im running into some problems. I'm
> in debian linux, and seems that ActiveMQ(5.5.1) is up and listening IPV6.
> 
>     tcp6   0   0 :::61616      :::*          LISTEN      24671/java
> 
> I can make a ping and a telnet to ::1 61616 and all seems that works fine.
> 
> Now Im trying to connect two clients (one in Java and one in C++).
> 
> -Java client: If I set the uri tcp://[::1]:61616, connection is stablished,
> but if I add the failover transport (failover://(tcp://[::1]:61616)), I can
> see an Invalid broker URI exception. Its not compatible, or there is
> another way to use failover with IPV6?

Working up a unit test for this and creating an issue would be helpful,
there are already some URI parsing tests in svn.

> 
> - C++ Client: Im setting the same URI that it works in Java
> (tcp://[::1]:61616) but doesnt work and I get "Resource temporarily
> unavailable". Any idea of what coulde be reason? I tested too with a
> connection string like this: ""tcp://[fe80::XXX:XXXX:XXXX:XXXX]:61616" and
> I'm receiving this error "the requested name is valid and found in
> database, but doesnt have the correct data that is trying to resolve".
> 
> 

The C++ client doesn't have any support for IPV6 yet, we welcome any
contributions you'd like to make in this area.  

> Any Idea?
> 
> 
> thanks in advance
> 

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


Re: Activemq IPV6 Client Connection (Java and C++)

Posted by Gary Tully <ga...@gmail.com>.
can you post the failover uri from the java case and the exception?

On 16 April 2012 16:33, Oscar Pernas <os...@pernas.es> wrote:
> Hi all,
>
> Im trying to use ActiveMQ with IPV6 but Im running into some problems. I'm
> in debian linux, and seems that ActiveMQ(5.5.1) is up and listening IPV6.
>
>    tcp6   0   0 :::61616      :::*          LISTEN      24671/java
>
> I can make a ping and a telnet to ::1 61616 and all seems that works fine.
>
> Now Im trying to connect two clients (one in Java and one in C++).
>
> -Java client: If I set the uri tcp://[::1]:61616, connection is stablished,
> but if I add the failover transport (failover://(tcp://[::1]:61616)), I can
> see an Invalid broker URI exception. Its not compatible, or there is
> another way to use failover with IPV6?
>
> - C++ Client: Im setting the same URI that it works in Java
> (tcp://[::1]:61616) but doesnt work and I get "Resource temporarily
> unavailable". Any idea of what coulde be reason? I tested too with a
> connection string like this: ""tcp://[fe80::XXX:XXXX:XXXX:XXXX]:61616" and
> I'm receiving this error "the requested name is valid and found in
> database, but doesnt have the correct data that is trying to resolve".
>
>
> Any Idea?
>
>
> thanks in advance
>
> --
> Óscar Pernas Plaza.



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

Re: Activemq IPV6 Client Connection (Java and C++)

Posted by Christian Posta <ch...@gmail.com>.
Thanks Matthew for circling back with the solution to this!


On Tue, Aug 6, 2013 at 8:58 AM, MattG987 <Ma...@gmail.com> wrote:

> oscarp wrote
> > Hi all,
> >
> > Im trying to use ActiveMQ with IPV6 but Im running into some problems.
> I'm
> > in debian linux, and seems that ActiveMQ(5.5.1) is up and listening IPV6.
> >
> >     tcp6   0   0 :::61616      :::*          LISTEN      24671/java
> >
> > I can make a ping and a telnet to ::1 61616 and all seems that works
> fine.
> >
> > Now Im trying to connect two clients (one in Java and one in C++).
> >
> > -Java client: If I set the uri tcp://[::1]:61616, connection is
> > stablished,
> > but if I add the failover transport (failover://(tcp://[::1]:61616)), I
> > can
> > see an Invalid broker URI exception. Its not compatible, or there is
> > another way to use failover with IPV6?
> >
> > - C++ Client: Im setting the same URI that it works in Java
> > (tcp://[::1]:61616) but doesnt work and I get "Resource temporarily
> > unavailable". Any idea of what coulde be reason? I tested too with a
> > connection string like this: ""tcp://[fe80::XXX:XXXX:XXXX:XXXX]:61616"
> and
> > I'm receiving this error "the requested name is valid and found in
> > database, but doesnt have the correct data that is trying to resolve".
> >
> >
> > Any Idea?
> >
> >
> > thanks in advance
> >
> > --
> > Óscar Pernas Plaza.
>
> As I encountered this recently, I figured I would post the solution here,
> in
> case someone else encounters it someday.
>
> The problem is Java's URI parser (not ActiveMQ) will not accept the left
> bracket in the IPv6 address in "failover://(tcp://[::1]:61616)", where it
> WILL accept the corresponding IPv4 structure
> "failover://(tcp://127.0.0.1:61616)" and IPv6 without failover
> "tcp://[::1]:61616".
>
> The solution to this is to exclude the "//" from the failover.
> "failover:(tcp://[::1]:61616)" is accepted by the Java URI parser, and will
> function correctly.
>
> -Matthew Griffin
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Activemq-IPV6-Client-Connection-Java-and-C-tp4561898p4670128.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Activemq IPV6 Client Connection (Java and C++)

Posted by MattG987 <Ma...@gmail.com>.
oscarp wrote
> Hi all,
> 
> Im trying to use ActiveMQ with IPV6 but Im running into some problems. I'm
> in debian linux, and seems that ActiveMQ(5.5.1) is up and listening IPV6.
> 
>     tcp6   0   0 :::61616      :::*          LISTEN      24671/java
> 
> I can make a ping and a telnet to ::1 61616 and all seems that works fine.
> 
> Now Im trying to connect two clients (one in Java and one in C++).
> 
> -Java client: If I set the uri tcp://[::1]:61616, connection is
> stablished,
> but if I add the failover transport (failover://(tcp://[::1]:61616)), I
> can
> see an Invalid broker URI exception. Its not compatible, or there is
> another way to use failover with IPV6?
> 
> - C++ Client: Im setting the same URI that it works in Java
> (tcp://[::1]:61616) but doesnt work and I get "Resource temporarily
> unavailable". Any idea of what coulde be reason? I tested too with a
> connection string like this: ""tcp://[fe80::XXX:XXXX:XXXX:XXXX]:61616" and
> I'm receiving this error "the requested name is valid and found in
> database, but doesnt have the correct data that is trying to resolve".
> 
> 
> Any Idea?
> 
> 
> thanks in advance
> 
> -- 
> Óscar Pernas Plaza.

As I encountered this recently, I figured I would post the solution here, in
case someone else encounters it someday.

The problem is Java's URI parser (not ActiveMQ) will not accept the left
bracket in the IPv6 address in "failover://(tcp://[::1]:61616)", where it
WILL accept the corresponding IPv4 structure
"failover://(tcp://127.0.0.1:61616)" and IPv6 without failover
"tcp://[::1]:61616".

The solution to this is to exclude the "//" from the failover.
"failover:(tcp://[::1]:61616)" is accepted by the Java URI parser, and will
function correctly.

-Matthew Griffin



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-IPV6-Client-Connection-Java-and-C-tp4561898p4670128.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.