Op 26-11-2012 20:31, Jeffrey Janner schreef:
-----Original Message-----
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Monday, November 26, 2012 1:17 PM
To: Tomcat Users List
Subject: Re: Using the Tomcat Native Library can only connect over ipv6
But not over ipv4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Zorro,

On 11/23/12 4:37 PM, Zorro wrote:
its not really a problem but if we ever migrate the internet to
IPv6 it would be brilliant to have the connector serving both
protocols which the http-bio-80 connector seems to be able to do
Let me double-check: are you saying that Tomcat/APR will only do IPv4
*or* IPv6 but not both? ... and that the BIO and NIO connectors *will*
allow both?

- -chris
Chris -
This has long been an issue with the Windows version of APR.
If you leave off the "address=" parameter of the connector, it will default to 
IPv6 only.
The workaround I've been using for years is the "address=0.0.0.0" feature, 
since I'm an IPv4 only setup.
Theoretically, it should set up both connections, but doesn't.
I'm not sure if anyone's ever found a reason for this behavior, but it does 
only seem to affect APR connections.
You can search back in history a year or so for more detailed analysis if you'd 
like.  (search for my posts on the subject.)
Jeff

Chris,

I think the answer as also Jeff pointed out is yes.

After building and installing the APR based Tomcat Native Library on in my case Fedora 14 Linux I could not connect to IPv4 adresses served by my Linux box.

Assuming I had done something wrong I had done tens of rebuilds of OpenSSL, APR and the Native library. After searching a LOT on internet I found a similar issue described on Stackoverflow and then I found out that connecting to address ::1 on port 80 on my Linux box went ok.

As you and André explained to me specifying the address attribute with 0.0.0.0 on the Connector forced the APR connector to use IPv4.

I have now this in my server.xml:
For IPv4:
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" address="0.0.0.0" />
For IPv6:
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" address="::0" />

With this setup I can connect to port 80 over Ipv4 And IPv6 to my Linux box.

On a Windows Vista PC I have also installed Tomcat 7.0.32 and the Windows installation set downloaded from tomcat.apache.org uses per default the Native Library. I have not changed anything in the configuration yet and on that PC a telnet 127.0.0.1 80 is ok while a IPv6 telnet ::1 80 fails.

Maybe its worth it to include it in the documentation of the native library.

Regards,
Harm-Jan Zwinderman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to