Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Zorro wrote: Op 27-11-2012 23:56, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harm-Jan, On 11/27/12 3:32 PM, Zorro wrote: Op 27-11-2012 20:00, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harm-Jan, On 11/26/12 3:16 PM, Zorro wrote: I have now this in my server.xml: For IPv4: For IPv6: With this setup I can connect to port 80 over Ipv4 And IPv6 to my Linux box. So, a recap: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface is IPv6 is available, otherwise only IPv4 * Linux vs. Windows is not relevant Do I have that all right? Or does Linux work as expected (bind to both interfaces) and Windows does not? Ideally, this should work everywhere: ... and listen on both 0.0.0.0:80 and :::80 The only configuration shown by Zorro has two connectors and says that works on Windows. 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. You mean using the above configuration? So, you have 2 connectors on Windows and one of them doesn't work at all? Please stop Tomcat, delete all log files, confirm your (2-connector) configuration, start Tomcat, then re-post your configuration and the complete catalina.out log file, plus versions of everything all at once. Better yet, if you could provide a matrix of configurations that *do* work versus *don't* work, that would be great, too. I'm specifically interested in knowing if this is a generic APR problem, or only APR-on-Windows. Jeffrey Janner has had problems on Windows (which may be a win32 TCP/IP stack problem) but if it doesn't work on Linux, either, then perhaps it really is a bug with APR or tcnative. Maybe its worth it to include it in the documentation of the native library. Maybe it's worth filing a bug report. If I can get you to cough-up full details, it will make it much easier. - -chris Chris, This is what I observed. Tomcat 7.0.32 1. Linux (Fedora 14, gcc 4.5.1, OpenJDK IcedTea6 1.9.10 java version 1.6.0_20) One connector for port 80 defined without the address attribute: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface if IPv6 is available, otherwise only IPv4 - 2. Windows Vista (java version 1.7.0_09) One connector for port 80 defined without the address attribute: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv4 interface (not to IPv6). What about when specifying two connectors, one for IPV4 and one for IPv6? Chris, André, Specifying 2 Connectors in the server.xml: For IPv4: redirectPort="8443" address="0.0.0.0"/> For IPv6: redirectPort="8443" address="::0"/> 1. Linux * APR connector binds for IPv6 to the IPv6 Connector and for IPv4 to the IPv4 Connector * NIO/BIO connector binds to the IPv4 Connector For NIO/BIO the catalina.log shows exceptions: SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-0:0:0:0:0:0:0:0-80"] java.net.BindException: Address already in use /0:0:0:0:0:0:0:0:80 at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406) ... - 2. Windows Vista * APR connector binds for IPv6 to the IPv6 Connector and for IPv4 to the IPv4 Connector * NIO/BIO connector binds to the IPv4 Connector For NIO/BIO the catalina.log shows exceptions: 28-nov-2012 21:45:55 org.apache.coyote.AbstractProtocol init SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-0:0:0:0:0:0:0:0-80"] java.net.BindException: Address already in use: JVM_Bind /0:0:0:0:0:0:0:0:80 at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406) ... Maybe I am interpreting this wrong, but in my view this confirms what I was trying to explain before (and again, I am no expert but I go by what I found by Googling). It goes a bit along these lines (and sorry if I'm mixing up things a bit, I have a cold, I'm tired and want to go to bed; but I'm sure you can correct). - On an O.S. which has a dual-capable IP stack (meaning basically : an IP stack which is basically IPv6, but can handle IPv4 also) : - java connectors, when not specifying an address, will bind to both ::0 (IPv6) and 0.0.0.0 (IPv4) (there is no magic there, it's the IP stack who does it). - java connectors, when specifying an address : - if the address is 0.0.0.0, will bind to both ::0 and 0.0.0.0 (IPv6 and IPv4) (???) - if the address is ::0, will bind *only* to IPv6 (???) Thus, in this case, if you configure 2 connectors, both on port 80, there will be a conflict, because the first one binds to ::0 and 0.0.0.0, and when the second
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Op 27-11-2012 23:56, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harm-Jan, On 11/27/12 3:32 PM, Zorro wrote: Op 27-11-2012 20:00, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harm-Jan, On 11/26/12 3:16 PM, Zorro wrote: I have now this in my server.xml: For IPv4: For IPv6: With this setup I can connect to port 80 over Ipv4 And IPv6 to my Linux box. So, a recap: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface is IPv6 is available, otherwise only IPv4 * Linux vs. Windows is not relevant Do I have that all right? Or does Linux work as expected (bind to both interfaces) and Windows does not? Ideally, this should work everywhere: ... and listen on both 0.0.0.0:80 and :::80 The only configuration shown by Zorro has two connectors and says that works on Windows. 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. You mean using the above configuration? So, you have 2 connectors on Windows and one of them doesn't work at all? Please stop Tomcat, delete all log files, confirm your (2-connector) configuration, start Tomcat, then re-post your configuration and the complete catalina.out log file, plus versions of everything all at once. Better yet, if you could provide a matrix of configurations that *do* work versus *don't* work, that would be great, too. I'm specifically interested in knowing if this is a generic APR problem, or only APR-on-Windows. Jeffrey Janner has had problems on Windows (which may be a win32 TCP/IP stack problem) but if it doesn't work on Linux, either, then perhaps it really is a bug with APR or tcnative. Maybe its worth it to include it in the documentation of the native library. Maybe it's worth filing a bug report. If I can get you to cough-up full details, it will make it much easier. - -chris Chris, This is what I observed. Tomcat 7.0.32 1. Linux (Fedora 14, gcc 4.5.1, OpenJDK IcedTea6 1.9.10 java version 1.6.0_20) One connector for port 80 defined without the address attribute: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface if IPv6 is available, otherwise only IPv4 - 2. Windows Vista (java version 1.7.0_09) One connector for port 80 defined without the address attribute: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv4 interface (not to IPv6). What about when specifying two connectors, one for IPV4 and one for IPv6? Chris, André, Specifying 2 Connectors in the server.xml: For IPv4: redirectPort="8443" address="0.0.0.0"/> For IPv6: redirectPort="8443" address="::0"/> 1. Linux * APR connector binds for IPv6 to the IPv6 Connector and for IPv4 to the IPv4 Connector * NIO/BIO connector binds to the IPv4 Connector For NIO/BIO the catalina.log shows exceptions: SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-0:0:0:0:0:0:0:0-80"] java.net.BindException: Address already in use /0:0:0:0:0:0:0:0:80 at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406) ... - 2. Windows Vista * APR connector binds for IPv6 to the IPv6 Connector and for IPv4 to the IPv4 Connector * NIO/BIO connector binds to the IPv4 Connector For NIO/BIO the catalina.log shows exceptions: 28-nov-2012 21:45:55 org.apache.coyote.AbstractProtocol init SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-0:0:0:0:0:0:0:0-80"] java.net.BindException: Address already in use: JVM_Bind /0:0:0:0:0:0:0:0:80 at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406) ... Regards, Harm-Jan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harm-Jan, On 11/27/12 3:32 PM, Zorro wrote: > Op 27-11-2012 20:00, Christopher Schultz schreef: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> Harm-Jan, >> >> On 11/26/12 3:16 PM, Zorro wrote: >>> I have now this in my server.xml: For IPv4: >> port="80" protocol="HTTP/1.1" connectionTimeout="2" >>> redirectPort="8443" address="0.0.0.0" /> For IPv6: >> port="80" protocol="HTTP/1.1" connectionTimeout="2" >>> redirectPort="8443" address="::0" /> >>> >>> With this setup I can connect to port 80 over Ipv4 And IPv6 to >>> my Linux box. >> So, a recap: >> >> * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" >> is specified >> >> * APR connector binds only to IPv6 interface is IPv6 is >> available, otherwise only IPv4 >> >> * Linux vs. Windows is not relevant >> >> Do I have that all right? Or does Linux work as expected (bind to >> both interfaces) and Windows does not? >> >> Ideally, this should work everywhere: >> >> >> >> ... and listen on both 0.0.0.0:80 and :::80 >> >> The only configuration shown by Zorro has two connectors and says >> that works on Windows. >> >>> 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. >> You mean using the above configuration? >> >> So, you have 2 connectors on Windows and one of them doesn't work >> at all? Please stop Tomcat, delete all log files, confirm your >> (2-connector) configuration, start Tomcat, then re-post your >> configuration and the complete catalina.out log file, >> plus versions of everything all at once. >> >> Better yet, if you could provide a matrix of configurations that >> *do* work versus *don't* work, that would be great, too. I'm >> specifically interested in knowing if this is a generic APR >> problem, or only APR-on-Windows. Jeffrey Janner has had problems >> on Windows (which may be a win32 TCP/IP stack problem) but if it >> doesn't work on Linux, either, then perhaps it really is a bug >> with APR or tcnative. >> >>> Maybe its worth it to include it in the documentation of the >>> native library. >> Maybe it's worth filing a bug report. If I can get you to >> cough-up full details, it will make it much easier. >> >> - -chris > > Chris, > > This is what I observed. Tomcat 7.0.32 > > 1. Linux (Fedora 14, gcc 4.5.1, OpenJDK IcedTea6 1.9.10 java > version 1.6.0_20) > > One connector for port 80 defined without the address attribute: > > * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" > is specified * APR connector binds only to IPv6 interface if IPv6 > is available, otherwise only IPv4 > > - > > 2. Windows Vista (java version 1.7.0_09) > > One connector for port 80 defined without the address attribute: > > * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" > is specified * APR connector binds only to IPv4 interface (not to > IPv6). What about when specifying two connectors, one for IPV4 and one for IPv6? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlC1RTMACgkQ9CaO5/Lv0PACPgCcDxAOM3Cya0+gF2btkUXXFHcA 9P8AoI5VNewZO4wN7x1JwfbTql2QhOSQ =6SMB -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Zorro wrote: Op 27-11-2012 20:00, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harm-Jan, On 11/26/12 3:16 PM, Zorro wrote: I have now this in my server.xml: For IPv4: For IPv6: With this setup I can connect to port 80 over Ipv4 And IPv6 to my Linux box. So, a recap: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface is IPv6 is available, otherwise only IPv4 * Linux vs. Windows is not relevant Do I have that all right? Or does Linux work as expected (bind to both interfaces) and Windows does not? Ideally, this should work everywhere: ... and listen on both 0.0.0.0:80 and :::80 The only configuration shown by Zorro has two connectors and says that works on Windows. 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. You mean using the above configuration? So, you have 2 connectors on Windows and one of them doesn't work at all? Please stop Tomcat, delete all log files, confirm your (2-connector) configuration, start Tomcat, then re-post your configuration and the complete catalina.out log file, plus versions of everything all at once. Better yet, if you could provide a matrix of configurations that *do* work versus *don't* work, that would be great, too. I'm specifically interested in knowing if this is a generic APR problem, or only APR-on-Windows. Jeffrey Janner has had problems on Windows (which may be a win32 TCP/IP stack problem) but if it doesn't work on Linux, either, then perhaps it really is a bug with APR or tcnative. Maybe its worth it to include it in the documentation of the native library. Maybe it's worth filing a bug report. If I can get you to cough-up full details, it will make it much easier. - -chris Chris, This is what I observed. Tomcat 7.0.32 1. Linux (Fedora 14, gcc 4.5.1, OpenJDK IcedTea6 1.9.10 java version 1.6.0_20) One connector for port 80 defined without the address attribute: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface if IPv6 is available, otherwise only IPv4 - 2. Windows Vista (java version 1.7.0_09) One connector for port 80 defined without the address attribute: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv4 interface (not to IPv6). In all 4 cases above, you can quickly check exactly what is bound to what, by using the "netstat" command after you have started Tomcat. The options of netstat vary somewhat depending on the OS. Under Linux, I'd try : ps -ef | grep tomcat (to find out its PID) netstat --tcp -pan | grep LISTEN | grep (tomcat's PID) Under Windows : netstat -aon - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
> -Original Message- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Tuesday, November 27, 2012 1:01 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 > > Harm-Jan, > > On 11/26/12 3:16 PM, Zorro wrote: > > I have now this in my server.xml: For IPv4: > protocol="HTTP/1.1" connectionTimeout="2" redirectPort="8443" > > address="0.0.0.0" /> For IPv6: > protocol="HTTP/1.1" connectionTimeout="2" redirectPort="8443" > > address="::0" /> > > > > With this setup I can connect to port 80 over Ipv4 And IPv6 to my > > Linux box. > > So, a recap: > > * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is > specified > > * APR connector binds only to IPv6 interface is IPv6 is available, > otherwise only IPv4 > > * Linux vs. Windows is not relevant > > Do I have that all right? Or does Linux work as expected (bind to both > interfaces) and Windows does not? > > Ideally, this should work everywhere: > > > > ... and listen on both 0.0.0.0:80 and :::80 > > The only configuration shown by Zorro has two connectors and says that > works on Windows. > > > 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. > > You mean using the above configuration? > > So, you have 2 connectors on Windows and one of them doesn't work at > all? Please stop Tomcat, delete all log files, confirm your > (2-connector) configuration, start Tomcat, then re-post your > configuration and the complete catalina.out log file, plus > versions of everything all at once. > > Better yet, if you could provide a matrix of configurations that *do* > work versus *don't* work, that would be great, too. I'm specifically > interested in knowing if this is a generic APR problem, or only APR-on- > Windows. Jeffrey Janner has had problems on Windows (which may be a > win32 TCP/IP stack problem) but if it doesn't work on Linux, either, > then perhaps it really is a bug with APR or tcnative. > > > Maybe its worth it to include it in the documentation of the native > > library. > > Maybe it's worth filing a bug report. If I can get you to cough-up full > details, it will make it much easier. > > - -chris Chris, I want to say that it might have been a Windows stack limitation, at least up until the Windows 7 stack (which is Server 2008 R2). Earlier versions didn't support dual-bind, but I can't be positive. I have one of those server and can check it when I have a freer moment in a few days. I'll report back to this thread. Jeff
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Op 27-11-2012 20:00, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harm-Jan, On 11/26/12 3:16 PM, Zorro wrote: I have now this in my server.xml: For IPv4: For IPv6: With this setup I can connect to port 80 over Ipv4 And IPv6 to my Linux box. So, a recap: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface is IPv6 is available, otherwise only IPv4 * Linux vs. Windows is not relevant Do I have that all right? Or does Linux work as expected (bind to both interfaces) and Windows does not? Ideally, this should work everywhere: ... and listen on both 0.0.0.0:80 and :::80 The only configuration shown by Zorro has two connectors and says that works on Windows. 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. You mean using the above configuration? So, you have 2 connectors on Windows and one of them doesn't work at all? Please stop Tomcat, delete all log files, confirm your (2-connector) configuration, start Tomcat, then re-post your configuration and the complete catalina.out log file, plus versions of everything all at once. Better yet, if you could provide a matrix of configurations that *do* work versus *don't* work, that would be great, too. I'm specifically interested in knowing if this is a generic APR problem, or only APR-on-Windows. Jeffrey Janner has had problems on Windows (which may be a win32 TCP/IP stack problem) but if it doesn't work on Linux, either, then perhaps it really is a bug with APR or tcnative. Maybe its worth it to include it in the documentation of the native library. Maybe it's worth filing a bug report. If I can get you to cough-up full details, it will make it much easier. - -chris Chris, This is what I observed. Tomcat 7.0.32 1. Linux (Fedora 14, gcc 4.5.1, OpenJDK IcedTea6 1.9.10 java version 1.6.0_20) One connector for port 80 defined without the address attribute: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface if IPv6 is available, otherwise only IPv4 - 2. Windows Vista (java version 1.7.0_09) One connector for port 80 defined without the address attribute: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv4 interface (not to IPv6). Regards, Harm-Jan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harm-Jan, On 11/26/12 3:16 PM, Zorro wrote: > I have now this in my server.xml: For IPv4: protocol="HTTP/1.1" connectionTimeout="2" redirectPort="8443" > address="0.0.0.0" /> For IPv6: protocol="HTTP/1.1" connectionTimeout="2" redirectPort="8443" > address="::0" /> > > With this setup I can connect to port 80 over Ipv4 And IPv6 to my > Linux box. So, a recap: * NIO/BIO connector binds to both IPv4 and IPv6 when no "address" is specified * APR connector binds only to IPv6 interface is IPv6 is available, otherwise only IPv4 * Linux vs. Windows is not relevant Do I have that all right? Or does Linux work as expected (bind to both interfaces) and Windows does not? Ideally, this should work everywhere: ... and listen on both 0.0.0.0:80 and :::80 The only configuration shown by Zorro has two connectors and says that works on Windows. > 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. You mean using the above configuration? So, you have 2 connectors on Windows and one of them doesn't work at all? Please stop Tomcat, delete all log files, confirm your (2-connector) configuration, start Tomcat, then re-post your configuration and the complete catalina.out log file, plus versions of everything all at once. Better yet, if you could provide a matrix of configurations that *do* work versus *don't* work, that would be great, too. I'm specifically interested in knowing if this is a generic APR problem, or only APR-on-Windows. Jeffrey Janner has had problems on Windows (which may be a win32 TCP/IP stack problem) but if it doesn't work on Linux, either, then perhaps it really is a bug with APR or tcnative. > Maybe its worth it to include it in the documentation of the > native library. Maybe it's worth filing a bug report. If I can get you to cough-up full details, it will make it much easier. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlC1DdMACgkQ9CaO5/Lv0PB7/QCfVuX1sz1f8TWFRFf0amCTTkAz HCAAn1sWzO1daDKAemV3b2zI2YAemboE =n8bC -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 11/26/12 3:14 PM, André Warnier wrote: > Also, I don't know if this is really relevant here, but I seem to > remember a parameter or attribute somewhere named > "preferIPv4Stack"/"preferIPv6Stack". That is for configuring the Java networking stack, so I suspect it has no effect on the APR/native networking configuration. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlC1C4YACgkQ9CaO5/Lv0PBGqQCgkLYyMUySFopTHuxDW68n61o2 hmAAoKDJ6ZoDTBYhttP5DrCa4iJzkdMv =UzLU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
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: redirectPort="8443" address="0.0.0.0" /> For IPv6: 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
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Jeffrey Janner wrote: -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 Note that as per earlier in this thread, there is a workaround, consisting of defining 2 s, one for IPv4 and one for IPv6, both on the same port, 80 e.g. Also, I don't know if this is really relevant here, but I seem to remember a parameter or attribute somewhere named "preferIPv4Stack"/"preferIPv6Stack". ... Ok, I was digging a bit deeper in Google, and this is by no means an authoritative explanation, just my take on it so far : At least some versions of Windows seem to have 2 independent IP stacks, one for IPv4 and one for IPv6. (As opposed to one IPv6 stack which can also "do IPv4" when required). And natively under such an OS, one cannot bind a server socket to both an IPv4 and an IPv6 address; one needs two separate sockets. Apparently also, the JVM can to some extend "hide" this from Java programs, and perform it's magic under the hood, binding to one or the other or both as required, while still making it look as one socket to the Java program. (wild guess : maybe that APR, being "native" and closer to the OS, doesn't allow this, while the other Connector variations do). You can still open 2 separate s though. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
> -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
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 -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlCzwCwACgkQ9CaO5/Lv0PD6pQCfbPXCmEL6pW17tjcszd3LdYFY /XgAnjVCEAOW2uGGsEccq+AOeaX8DIBz =wR4p -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Op 23-11-2012 23:00, André Warnier schreef: Zorro wrote: Op 23-11-2012 22:04, André Warnier schreef: Zorro wrote: Op 23-11-2012 20:06, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zorro, On 11/22/12 5:07 PM, Zorro wrote: Hi, I tried to use the Apache Tomcat Native Library 1.1.24 using APR version 1.4.6 with my Tomcat 7.0.32 server but after installing it I cannot connect over ipv4. Using Tomcat with the Native Library on Fedora 14 everything starts up fine. However a telnet 127.0.0.1 80 gives a 'Connection refused'. But with a telnet ::1 80 I can connect to Tomcat! Using the http-bio-80 connector I can connect to Tomcat over ipv4 as well over ipv6. Both telnet 127.0.0.1 80 and telnet ::1 80 do connect to Tomcat. Is there a way to use the Apache Tomcat Native Library also for ipv4 connections? Try setting address="127.0.0.1" in your . Or "0.0.0.0" if you want to listen on all IPv4 interfaces. - -chris Hi Chris, Thank you for your response. Indeed setting the address attribute to 0.0.0.0 in the element solves the issue. Tomcat is then indeed listening to all IPv4 interfaces. Though connecting over IPv6 is not possible then. Can't you them set up a second Connector, with an equivalent IPv6 address ? Since it is bound to different addresses, it shouldn't conflict with the first, or would it ? I have set them up now as: For IPv4: redirectPort="8443" address="0.0.0.0" /> For IPv6: redirectPort="8443" address="::0" /> As I understand it, this way one cannot use port 80 simultaneously for IPv4 and IPv6? Well, honestly I wonder. But on the face of it, I don't immediately see why not. Have you tried it ? (I mean, set both Connectors above for port 80) .. Hi André, Indeed setting both connectors to port 80 is also functioning. Thank you! Harm-Jan Zwinderman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Zorro wrote: Op 23-11-2012 22:04, André Warnier schreef: Zorro wrote: Op 23-11-2012 20:06, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zorro, On 11/22/12 5:07 PM, Zorro wrote: Hi, I tried to use the Apache Tomcat Native Library 1.1.24 using APR version 1.4.6 with my Tomcat 7.0.32 server but after installing it I cannot connect over ipv4. Using Tomcat with the Native Library on Fedora 14 everything starts up fine. However a telnet 127.0.0.1 80 gives a 'Connection refused'. But with a telnet ::1 80 I can connect to Tomcat! Using the http-bio-80 connector I can connect to Tomcat over ipv4 as well over ipv6. Both telnet 127.0.0.1 80 and telnet ::1 80 do connect to Tomcat. Is there a way to use the Apache Tomcat Native Library also for ipv4 connections? Try setting address="127.0.0.1" in your . Or "0.0.0.0" if you want to listen on all IPv4 interfaces. - -chris Hi Chris, Thank you for your response. Indeed setting the address attribute to 0.0.0.0 in the element solves the issue. Tomcat is then indeed listening to all IPv4 interfaces. Though connecting over IPv6 is not possible then. Can't you them set up a second Connector, with an equivalent IPv6 address ? Since it is bound to different addresses, it shouldn't conflict with the first, or would it ? I have set them up now as: For IPv4: redirectPort="8443" address="0.0.0.0" /> For IPv6: redirectPort="8443" address="::0" /> As I understand it, this way one cannot use port 80 simultaneously for IPv4 and IPv6? Well, honestly I wonder. But on the face of it, I don't immediately see why not. Have you tried it ? (I mean, set both Connectors above for port 80) .. (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) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Op 23-11-2012 22:04, André Warnier schreef: Zorro wrote: Op 23-11-2012 20:06, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zorro, On 11/22/12 5:07 PM, Zorro wrote: Hi, I tried to use the Apache Tomcat Native Library 1.1.24 using APR version 1.4.6 with my Tomcat 7.0.32 server but after installing it I cannot connect over ipv4. Using Tomcat with the Native Library on Fedora 14 everything starts up fine. However a telnet 127.0.0.1 80 gives a 'Connection refused'. But with a telnet ::1 80 I can connect to Tomcat! Using the http-bio-80 connector I can connect to Tomcat over ipv4 as well over ipv6. Both telnet 127.0.0.1 80 and telnet ::1 80 do connect to Tomcat. Is there a way to use the Apache Tomcat Native Library also for ipv4 connections? Try setting address="127.0.0.1" in your . Or "0.0.0.0" if you want to listen on all IPv4 interfaces. - -chris Hi Chris, Thank you for your response. Indeed setting the address attribute to 0.0.0.0 in the element solves the issue. Tomcat is then indeed listening to all IPv4 interfaces. Though connecting over IPv6 is not possible then. Can't you them set up a second Connector, with an equivalent IPv6 address ? Since it is bound to different addresses, it shouldn't conflict with the first, or would it ? I have set them up now as: For IPv4: redirectPort="8443" address="0.0.0.0" /> For IPv6: redirectPort="8443" address="::0" /> As I understand it, this way one cannot use port 80 simultaneously for IPv4 and IPv6? Regards, Harm-Jan Zwinderman (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) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Zorro wrote: Op 23-11-2012 20:06, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zorro, On 11/22/12 5:07 PM, Zorro wrote: Hi, I tried to use the Apache Tomcat Native Library 1.1.24 using APR version 1.4.6 with my Tomcat 7.0.32 server but after installing it I cannot connect over ipv4. Using Tomcat with the Native Library on Fedora 14 everything starts up fine. However a telnet 127.0.0.1 80 gives a 'Connection refused'. But with a telnet ::1 80 I can connect to Tomcat! Using the http-bio-80 connector I can connect to Tomcat over ipv4 as well over ipv6. Both telnet 127.0.0.1 80 and telnet ::1 80 do connect to Tomcat. Is there a way to use the Apache Tomcat Native Library also for ipv4 connections? Try setting address="127.0.0.1" in your . Or "0.0.0.0" if you want to listen on all IPv4 interfaces. - -chris Hi Chris, Thank you for your response. Indeed setting the address attribute to 0.0.0.0 in the element solves the issue. Tomcat is then indeed listening to all IPv4 interfaces. Though connecting over IPv6 is not possible then. Can't you them set up a second Connector, with an equivalent IPv6 address ? Since it is bound to different addresses, it shouldn't conflict with the first, or would it ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Op 23-11-2012 20:06, Christopher Schultz schreef: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zorro, On 11/22/12 5:07 PM, Zorro wrote: Hi, I tried to use the Apache Tomcat Native Library 1.1.24 using APR version 1.4.6 with my Tomcat 7.0.32 server but after installing it I cannot connect over ipv4. Using Tomcat with the Native Library on Fedora 14 everything starts up fine. However a telnet 127.0.0.1 80 gives a 'Connection refused'. But with a telnet ::1 80 I can connect to Tomcat! Using the http-bio-80 connector I can connect to Tomcat over ipv4 as well over ipv6. Both telnet 127.0.0.1 80 and telnet ::1 80 do connect to Tomcat. Is there a way to use the Apache Tomcat Native Library also for ipv4 connections? Try setting address="127.0.0.1" in your . Or "0.0.0.0" if you want to listen on all IPv4 interfaces. - -chris Hi Chris, Thank you for your response. Indeed setting the address attribute to 0.0.0.0 in the element solves the issue. Tomcat is then indeed listening to all IPv4 interfaces. Though connecting over IPv6 is not possible then. Regards, Harm-Jan Zwinderman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zorro, On 11/22/12 5:07 PM, Zorro wrote: > Hi, > > I tried to use the Apache Tomcat Native Library 1.1.24 using APR > version 1.4.6 with my Tomcat 7.0.32 server but after installing it > I cannot connect over ipv4. > > Using Tomcat with the Native Library on Fedora 14 everything starts > up fine. However a telnet 127.0.0.1 80 gives a 'Connection > refused'. But with a telnet ::1 80 I can connect to Tomcat! > > Using the http-bio-80 connector I can connect to Tomcat over ipv4 > as well over ipv6. Both telnet 127.0.0.1 80 and telnet ::1 80 do > connect to Tomcat. > > Is there a way to use the Apache Tomcat Native Library also for > ipv4 connections? Try setting address="127.0.0.1" in your . Or "0.0.0.0" if you want to listen on all IPv4 interfaces. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlCvyRsACgkQ9CaO5/Lv0PDN0QCghJbWT49Kd9GoYRMvCMmv/vnH Y2wAoIQDs4o/vDutxV/9MMJJeA8aqHPP =tsi7 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Using the Tomcat Native Library can only connect over ipv6 But not over ipv4
Hi, I tried to use the Apache Tomcat Native Library 1.1.24 using APR version 1.4.6 with my Tomcat 7.0.32 server but after installing it I cannot connect over ipv4. Using Tomcat with the Native Library on Fedora 14 everything starts up fine. However a telnet 127.0.0.1 80 gives a 'Connection refused'. But with a telnet ::1 80 I can connect to Tomcat! Using the http-bio-80 connector I can connect to Tomcat over ipv4 as well over ipv6. Both telnet 127.0.0.1 80 and telnet ::1 80 do connect to Tomcat. Is there a way to use the Apache Tomcat Native Library also for ipv4 connections? Kind regards, Harm-Jan Zwinderman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org