Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat and ipv6

 
Siddhesh Deodhar
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Siddhesh Deodhar
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic