IPV6 Port Listening

  • 1
  • Question
  • Updated 6 years ago
I am running one of the sample code programs which is set up to listen on port 8280. Although I am on and IPv4 network, I wanted to confirm that I could communicate with the esb server via an ipv6 address. I am on a windows 7 system and could ping the ipv6 loopback address (::1). However when I attempt a web services call using the loopback ipv6 address, I get a java error that the connection was refused. If I run Netstat I can see the port 8280 has a TCP listener on ipv4 port 8280, but none on an equivalent ipv6 port.

What I am trying to understand is whether ultraesb is written such that it will monitor both the ipv4 and ipv6 ports? Or is this something that is transparently done as part of the underlying Java runtime and perhaps because I am not on an active ipv6 network it is not working?

Any help would be appreciated
Photo of JimZuber

JimZuber

  • 5 Posts
  • 1 Reply Like

Posted 6 years ago

  • 1
Photo of Asankha Perera

Asankha Perera, Founder and CTO

  • 384 Posts
  • 23 Reply Likes
Hi Jim

I tried this on Windows 7 and Ubuntu 10.04, and with Ubuntu things work fine as expected. For example, I can start the UltraESB default configuration, and connect with the SOA ToolBox or FireFox to http://[::1]:8280/service/echo-back and see a response from the UltraESB. Note that even specifying the IPV6 only interface as follows works as expected, and only binds on the local IPV6 interface. However, as I do not have a native IPV6 network I cannot test with a real address.

On Windows things fail when I try to force the "::1" as the bindAddress and I encounter the issue http://bugs.sun.com/view_bug.do?bug_i...

I would strongly recommend the deployment of the UltraESB over Linux, which makes it easy to thoroughly tune it for best performance. However, I'd be happy to look into any issue with IPV6/Windows if there is a need at your end

cheers
asankha
Photo of JimZuber

JimZuber

  • 5 Posts
  • 1 Reply Like
Asankha,

I played around with ubuntu in a VMware virtual machine, but ran into a number of obstacles, perhaps related to the fact that I am on a virtual machine. It would really be great if the Window 7 issue noted below were resolved...

The bottom line is that in Windows 7 when you start IIS it listens to both the ipv4 port 80 (TCP 0.0.0.0:80) and IPv6 port 80 (TCP [::]:80). You can see these settingasby running netstat -an from Windows 7 DOS command line. When I run UltraESB, only the ipV4 port 8280 is listened to and there is no listener associated with the ipv6 port 8280.

From a remote system, I can successfully ping the ipv6 link local address of the Windows 7 system running ultraesb. But if I attempt make a web service call using the same ipv6 address it fails as ultraesb it is not listening on ipv6 port 8280.

Anything you could do to address this issue would be appreciated.

Jim
Photo of Asankha Perera

Asankha Perera, Founder and CTO

  • 384 Posts
  • 23 Reply Likes
Hi Jim

Are you looking at Windows 7 as the target production deployment platform for the UltraESB?

We regularly use EC2 to load test the UltraESB, and thus Ubuntu on a VMware system should not cause you any trouble. Even if there is any issue, it would be much easier to deal with it, than with issues on a Windows OS.

I suspect the issue is caused when using NIO channels with Windows and IPV6 - IIS maybe using normal sockets, and thus not seeing the same issues. I find many bug reports related to the Windows JDK and IPV6 as follows:

http://bugs.sun.com/view_bug.do?bug_i...
http://bugs.sun.com/view_bug.do?bug_i...
http://bugs.sun.com/view_bug.do?bug_i...

One possibility would be to try a version of JDK 7 on Windows - but for any production deployment, I'd always strongly suggest a Linux deployment, where I am sure things could be configured to work. I'm interested to follow up with any issues you faced on Ubuntu/VMware - is thats an alternate option?

thanks
asankha
Photo of JimZuber

JimZuber

  • 5 Posts
  • 1 Reply Like
Asankha,

I am using UltraESB for a mock Web services implementation, so the deployment environment is a less of an issue as I am using it in a development environment. BTW, I really like the product. Very easy to use!

I may be able to use the Ubuntu environment, but part of my problem is I am having trouble talking from a remote machine using the link local ipV6 address for the ESB. Interestingly, I can successfully access the esb from firefox inside of the same Ubuntu instance using a strange synax for the URL that includes the interface ID (%eth0). The same syntax does not work on the remote machine. All these problems may disappear once I get in an environment where a full ipV6 address is being allocated by a router.Won't be able to try that for a few days.

jim
Photo of Asankha Perera

Asankha Perera, Founder and CTO

  • 384 Posts
  • 23 Reply Likes
Jim

thanks for the feedback :)!

I will continue to investigate this further.. but I do not have access to a full IPV6 environment to test, so I will be eagerly expecting your updates too.. Like you say, on a true IPV6 environment, things could 'just work' too..

cheers
asankha
Photo of Asankha Perera

Asankha Perera, Founder and CTO

  • 384 Posts
  • 23 Reply Likes
Hi Jim

Can you try this[1] pure Java sample server from the book "Java NIO" by Ron Hitchens [2].

Note that the following line has been changed:
"serverSocket.bind (new InetSocketAddress (java.net.InetAddress.getByName("::1"), port));"

On Ubuntu, it listens on IPV6, but on Windows, results in the same error "Address family not supported by protocol family: bind"

thanks
asankha

[1] http://adroitlogic.org/files/SelectSo...
[2] http://books.google.com/books?id=z7TQ...
Photo of JimZuber

JimZuber

  • 5 Posts
  • 1 Reply Like
Tried the example code and got...

C:\Temp>java SelectSockets
Listening on port 1234
Exception in thread "main" java.net.SocketException: Address family not supported by protocol family: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(Ser
119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerS
at sun.nio.ch.ServerSocketAdaptor.bind(ServerS
at SelectSockets.go(SelectSockets.java:42)
at SelectSockets.main(SelectSockets.java:25)

Jim
Photo of JimZuber

JimZuber

  • 5 Posts
  • 1 Reply Like
Asankha,

Java 7 did the trick! UltraESB running under Windows 7 now monitors the ipV6 port. Thanks for you support.

Note that the leading tool for Web Services testing is SoapUI. While this product provides some powerful support for Soap based mock services, its support for REST based mock services is almost non-existent (basically, just setting up a separate test case for each endpoint and sending a file). The ultraESB environment was a much cleaner solution for putting together the mock services, particularly with the IntelliJ IDE for writing the code. I could load the payload, read it into a string, manipulate it, the write it back out to the payload. The learning curve was very minimal. Great job!

Regards,

Jim
Photo of Asankha Perera

Asankha Perera, Founder and CTO

  • 384 Posts
  • 23 Reply Likes
Jim

Thats Great news!

We are very happy to hear that the mock services have been easy to use, especially with the great integration with IntelliJ IDEA, Thats a great IDE!

At the right time, you could consider the UltraESB as an option to implement the real service as well. Recently we added support to create RESTful JSON Data Services, and in future this support will be extended for other message formats. Of course there are many other uses for the UltraESB in integrating enterprise systems!

cheers
asankha