Discussion:
Activemq IPV6 Client Connection (Java and C++)
Oscar Pernas
2012-04-16 15:33:38 UTC
Permalink
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.
Gary Tully
2012-04-17 09:54:00 UTC
Permalink
can you post the failover uri from the java case and the exception?
Post by Oscar Pernas
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
Timothy Bish
2012-04-20 15:26:50 UTC
Permalink
Post by Oscar Pernas
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.
Post by Oscar Pernas
- 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.
Post by Oscar Pernas
Any Idea?
thanks in advance
--
Tim Bish
Sr Software Engineer | FuseSource Corp
tim.bish-***@public.gmane.org | www.fusesource.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/
MattG987
2013-08-06 15:58:35 UTC
Permalink
Post by Oscar Pernas
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
2013-08-06 21:50:50 UTC
Permalink
Thanks Matthew for circling back with the solution to this!
Post by MattG987
Post by Oscar Pernas
Hi all,
Im trying to use ActiveMQ with IPV6 but Im running into some problems.
I'm
Post by Oscar Pernas
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.
Post by Oscar Pernas
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
Post by Oscar Pernas
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
--
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
Loading...