aspose file tools*
The moose likes Tomcat and the fly likes Tomcat and ipv6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat and ipv6" Watch "Tomcat and ipv6" New topic
Author

Tomcat and ipv6

Siddhesh Deodhar
Ranch Hand

Joined: Mar 05, 2009
Posts: 118
Hi all

I want to migrate my application from ipv4 to ipv6.
I am using Tomcat 5.5.7 running on my GNU linux with kernel version 2.6.18-164.el5.
While searching on the net I found that if your OS supports IPV6 (which is yes in my case) I don't need to do any
changes and tomcat 5.5 and later supports IPv6

I tried to opening home page of Tomcat in IPV6 format. Like follows

http://<ip>:8080/ - Opens Tomcat home page
Below 2 gives no network access message
http://::ffff:<ip>:8080 - Does not opens
http://[0000:0000:0000:0000:0000:0000:0AF4:0070]:8080 - Does not opens

I tried to ping that machine with IPv6 format address. I got reply back
V:\>ping ::ffff:<ip>
Pinging <ip> with 32 bytes of data:
Reply from <ip>: bytes=32 time<1ms TTL=63
Reply from <ip>: bytes=32 time<1ms TTL=63
Reply from <ip>: bytes=32 time<1ms TTL=63
Reply from <ip>: bytes=32 time<1ms TTL=63

So this means my local machine(Windows 7) supports IPv6.

I tried installing Tomcat 6 on my windows machine and and tried opening link in IPV6 format
http://[::1]:8080 but it does not works.

Am I missing on anything else ?
I am searching on Net regarding this. If any one has and good link or document to share , please let me know.


Good, Better, Best, Don't take rest until, Good becomes Better, and Better becomes Best.
Sidd : (SCJP 6 [90%] )
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16222
    
  21

I very briefly spent time in ipv6-land about 2-3 years ago. As I recall, the JVM of the day wanted to use ipv6 by default plus my virtual machine setups kept getting their ip address setting chewed up.

The notation and escaping for ipv6 URLS is a little non-intuitive, so I suspect that your URL needs adjusting. But I'd have to research it to know the proper form.

Also check to make sure Tomcat is listening on ipv6. A "netstat -ln" should result in the following, I think


I just noticed that there's no ipv4 form listed on my test system, which is interesting.


Customer surveys are for companies who didn't pay proper attention to begin with.
Siddhesh Deodhar
Ranch Hand

Joined: Mar 05, 2009
Posts: 118
Yes, "netstat -ln"returns following



Well, it looks like proxy issue to me, when I say no proxy, I am able to open home page of my tomcat running on my local machine using
link http://[::1]:8080/

But when i try to open the same url using ip address like follows
http://[0000:0000:0000:0000:0000:0000:0AF4:C035]:8080

it says page not found.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16222
    
  21

Is it a Tomcat "Page not found" page, an Apache "Page not found" page, or a browser "Page not found" page? Each of them has a distinctive appearance and that will narrow down the problem.
Siddhesh Deodhar
Ranch Hand

Joined: Mar 05, 2009
Posts: 118
When I fire the url http://[0000:0000:0000:0000:0000:0000:0AF4:C035]:8080
which is ipv6 conversion of my ipv4 address URL http://10.244.192.53:8080/ I get following error

Unable to connect
Firefox can't establish a connection to the server at [0000:0000:0000:0000:0000:0000:0af4:c035]:8080.

Tomcat is running on my desktop Windows 7 system. I have enabled IPv6 on my windows 7 OS. I learn that I
dont need to do any changes to my tomcat 6 to support IPv6.

Any idea why I am unable to access the page?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat and ipv6