You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aditi Sinha <ad...@gmail.com> on 2012/07/06 15:50:33 UTC

How to support IPv6 on Apache Tomcat Version 7.0.22

Hi,


We have a web server hosted on Apache Tomcat Version 7.0.22. We are trying
to get the web server support IPv6.

Machine details: Windows 2008 server machine, 32-bit OS
Java version:  jdk1.6.0_25


The web server is not accessible using the IPv6 address. The connectivity
to windows server machine works fine though IPv6 address.
The firewall is turned off.


**

In the Catalina.log can see IPv6 [false] as below.

* *

*INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters
[false], random [true].*


Is there any configuration which needs to be done for Tomcat/Connector to
support IPv6?
 In server.xml we are using the AJP 1.3 Connector and HTTP/1.1 Connector.**



Early response would be appreciated.



Thanks & Regards,

Aditi

Re: How to support IPv6 on Apache Tomcat Version 7.0.22

Posted by Aditi Sinha <ad...@gmail.com>.
Chris,



Thanks for the info. I would start another email thread.



Regards,

Aditi


On Mon, Sep 10, 2012 at 7:11 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Aditi,
>
> On 9/10/12 3:19 AM, Aditi Sinha wrote:
> > Wanted to know if the HTTP NIO connectors do not support IPv6?
>
> AFAIK, all Tomcat connectors support IPv6 if your JVM and OS support
> IPv6 (and tcnative/apr support IPv6 if you are using APR). If you are
> having a specific problem, please start another thread and give as
> much configuration and error message/behavior detail as possible.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlBN7hkACgkQ9CaO5/Lv0PAMeACcCAdvrdWGjEkvPpXFyoUqhKUT
> YYEAoL5pbfvhCoRyd3rFMPW4sxfAlOzN
> =ebYS
>  -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: How to support IPv6 on Apache Tomcat Version 7.0.22

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aditi,

On 9/10/12 3:19 AM, Aditi Sinha wrote:
> Wanted to know if the HTTP NIO connectors do not support IPv6?

AFAIK, all Tomcat connectors support IPv6 if your JVM and OS support
IPv6 (and tcnative/apr support IPv6 if you are using APR). If you are
having a specific problem, please start another thread and give as
much configuration and error message/behavior detail as possible.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBN7hkACgkQ9CaO5/Lv0PAMeACcCAdvrdWGjEkvPpXFyoUqhKUT
YYEAoL5pbfvhCoRyd3rFMPW4sxfAlOzN
=ebYS
-----END PGP SIGNATURE-----

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


Re: How to support IPv6 on Apache Tomcat Version 7.0.22

Posted by Aditi Sinha <ad...@gmail.com>.
Hi Chris,

Apologies for coming back on this one after a long gap.

Wanted to know if the HTTP NIO connectors do not support IPv6?

In our server.xml we had below two connectors  defined.  This configuration
did not support Ipv6 For both ssl and non-ssl requests.



1.       For non-SSL requests:  HTTP Connector with  protocol="HTTP/1.1"
      *(HTTP BIO connector)*

2.       For SSL requests:  HTTP Connector with protocol="
org.apache.coyote.http11.Http11NioProtocol"       *(HTTP NIO connector)*



On modifying these two connectors to use the BIO implementation,  *protocol*
*=**“org.apache.coyote.http11.Http11Protocol”* the server supports IPv6.


Is there any other configuration required so that HTTP NIO connector would
support IPv6?

Thanks & Regards,
Aditi


On Tue, Jul 10, 2012 at 10:11 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Aditi,
>
> On 7/9/12 5:37 AM, Aditi Sinha wrote:
> > I could get the comparison of the three connectors here
> >
> http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Connector_Comparison
> >
> >  With the BIO connector specified, the server is not responding to
> > the https request. Is it because SSL Handshake is Blocking for BIO
> > connector?
>
> Everything is blocking for the BIO connection -- that's what the "B"
> stands for.
>
> > We need to support SSL. Is there a way to have below configuration
> > support IPv6?
>
> I can't see a reason why you can't use SSL over any of the connectors.
> What happens when you try to connect? Note that AJP never supports
> HTTPS (at least not directly -- the web proxy must terminate the SSL
> connection, but can forward the details like cipher, client
> certificate, etc. to Tomcat and your webapp).
>
> > HTTP Connector: NIO protocol
>
> <Connector protocol="org.apache.coyote.ajp.Http11NioProtocol"
>    ....
>    />
>
> > AJP Connector: APR protocol/NIO protocol.
>
> <Connector protocol="org.apache.coyote.ajp.AjpNioProtocol"
>    ....
>    />
>
> That should be all that is necessary.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk/8W0IACgkQ9CaO5/Lv0PA0RwCfe8hWScXATo/pPjBCcsGCwWi5
> jYgAoKRjazQPQkEe0T1vwlvulMc/kgk5
> =k0tm
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: How to support IPv6 on Apache Tomcat Version 7.0.22

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aditi,

On 7/9/12 5:37 AM, Aditi Sinha wrote:
> I could get the comparison of the three connectors here 
> http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Connector_Comparison
>
>  With the BIO connector specified, the server is not responding to
> the https request. Is it because SSL Handshake is Blocking for BIO
> connector?

Everything is blocking for the BIO connection -- that's what the "B"
stands for.

> We need to support SSL. Is there a way to have below configuration
> support IPv6?

I can't see a reason why you can't use SSL over any of the connectors.
What happens when you try to connect? Note that AJP never supports
HTTPS (at least not directly -- the web proxy must terminate the SSL
connection, but can forward the details like cipher, client
certificate, etc. to Tomcat and your webapp).

> HTTP Connector: NIO protocol

<Connector protocol="org.apache.coyote.ajp.Http11NioProtocol"
   ....
   />

> AJP Connector: APR protocol/NIO protocol.

<Connector protocol="org.apache.coyote.ajp.AjpNioProtocol"
   ....
   />

That should be all that is necessary.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/8W0IACgkQ9CaO5/Lv0PA0RwCfe8hWScXATo/pPjBCcsGCwWi5
jYgAoKRjazQPQkEe0T1vwlvulMc/kgk5
=k0tm
-----END PGP SIGNATURE-----

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


Re: How to support IPv6 on Apache Tomcat Version 7.0.22

Posted by Aditi Sinha <ad...@gmail.com>.
I could get the comparison of the three connectors here
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Connector_Comparison

With the BIO connector specified, the server is not responding to the https
request.
Is it because SSL Handshake is Blocking for BIO connector?

We need to support SSL. Is there a way to have below configuration support
IPv6?

HTTP Connector: NIO protocol
AJP Connector: APR protocol/NIO protocol.

Thanks & Regards,
Aditi
On Mon, Jul 9, 2012 at 1:04 PM, Aditi Sinha <ad...@gmail.com> wrote:

> Hi Kolinko,
>
> Thank you so much. We specified the BIO connector implementation for HTTP
> and AJP protocol and the setup now supports IPv6.
>
> Is there any preference among the three connectors "BIO", "NIO" and "APR"?
> How should one decide which connector to opt for?
>
> Thanks & Regards,
> Aditi
>  On Fri, Jul 6, 2012 at 9:58 PM, Konstantin Kolinko <
> knst.kolinko@gmail.com> wrote:
>
>> 2012/7/6 Aditi Sinha <ad...@gmail.com>:
>> > Hi,
>> >
>> >
>> > We have a web server hosted on Apache Tomcat Version 7.0.22. We are
>> trying
>> > to get the web server support IPv6.
>> >
>> > Machine details: Windows 2008 server machine, 32-bit OS
>> > Java version:  jdk1.6.0_25
>> >
>> >
>> > The web server is not accessible using the IPv6 address. The
>> connectivity
>> > to windows server machine works fine though IPv6 address.
>> > The firewall is turned off.
>> >
>> >
>> > **
>> >
>> > In the Catalina.log can see IPv6 [false] as below.
>> >
>> > * *
>> >
>> > *INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters
>> > [false], random [true].*
>> >
>> >
>> > Is there any configuration which needs to be done for Tomcat/Connector
>> to
>> > support IPv6?
>> >  In server.xml we are using the AJP 1.3 Connector and HTTP/1.1
>> Connector.**
>>
>> Look into the docs - there are 3 different connector implementations
>> for HTTP protocol, and 3 for AJP protocol. They are known as "BIO",
>> "NIO" and "APR" one.
>>
>> As you have Tomcat-Native library installed, the configuration by
>> default will use the "APR" connector.    But your problem is that the
>> binary version of Tomcat-Native that you are using is not compiled
>> with support for IPv6 and thus this connector does not support IPv6.
>>
>> So have the following possibilities:
>> a) compile your own version of Tomcat-Native for your platform and
>> make sure that it has IPv6 support enabled. For Windows it might be
>> tricky.
>>
>> b) choose other connector implementation - see "protocol" attribute on
>> <Connector> element in Configuration Reference.
>>
>> c) uninstall Tomcat-Native library or disable AprLifecycleListener in
>> your configuration. In this case Tomcat will autoselect the BIO
>> connector implementations for both protocols.
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>

Re: How to support IPv6 on Apache Tomcat Version 7.0.22

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aditi,

On 7/9/12 3:34 AM, Aditi Sinha wrote:
> Thank you so much. We specified the BIO connector implementation
> for HTTP and AJP protocol and the setup now supports IPv6.
> 
> Is there any preference among the three connectors "BIO", "NIO" and
> "APR"? How should one decide which connector to opt for?

IMHO the NIO connector should be your best bet: it can serve the
highest number of clients with the lowest overhead *and* does not
require any native code to do it. So, it's more effective *and*
simpler to deploy. Also, NIO (and APR) support the Comet protocol
whereas BIO does not.

You can certainly use NIO with AJP, though you may have to reconfigure
your AJP bridge to get the benefit of additional AJP connections from
the web proxy -- otherwise, you're just going to be using the standard
N:N connection mapping between httpd and Tomcat, and won't get the
benefit of being able to handle many (thousands?) connections from
httpd to Tomcat with a smaller number of request processing threads in
your <Executor>.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/8WmUACgkQ9CaO5/Lv0PCTpgCeJy3yxj7b2GFh11y59lV2Xvuz
wjMAn0/cvgbTk9L2iVbX/bvFpgFIJfCU
=H/0+
-----END PGP SIGNATURE-----

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


Re: How to support IPv6 on Apache Tomcat Version 7.0.22

Posted by Aditi Sinha <ad...@gmail.com>.
Hi Kolinko,

Thank you so much. We specified the BIO connector implementation for HTTP
and AJP protocol and the setup now supports IPv6.

Is there any preference among the three connectors "BIO", "NIO" and "APR"?
How should one decide which connector to opt for?

Thanks & Regards,
Aditi
On Fri, Jul 6, 2012 at 9:58 PM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2012/7/6 Aditi Sinha <ad...@gmail.com>:
> > Hi,
> >
> >
> > We have a web server hosted on Apache Tomcat Version 7.0.22. We are
> trying
> > to get the web server support IPv6.
> >
> > Machine details: Windows 2008 server machine, 32-bit OS
> > Java version:  jdk1.6.0_25
> >
> >
> > The web server is not accessible using the IPv6 address. The connectivity
> > to windows server machine works fine though IPv6 address.
> > The firewall is turned off.
> >
> >
> > **
> >
> > In the Catalina.log can see IPv6 [false] as below.
> >
> > * *
> >
> > *INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters
> > [false], random [true].*
> >
> >
> > Is there any configuration which needs to be done for Tomcat/Connector to
> > support IPv6?
> >  In server.xml we are using the AJP 1.3 Connector and HTTP/1.1
> Connector.**
>
> Look into the docs - there are 3 different connector implementations
> for HTTP protocol, and 3 for AJP protocol. They are known as "BIO",
> "NIO" and "APR" one.
>
> As you have Tomcat-Native library installed, the configuration by
> default will use the "APR" connector.    But your problem is that the
> binary version of Tomcat-Native that you are using is not compiled
> with support for IPv6 and thus this connector does not support IPv6.
>
> So have the following possibilities:
> a) compile your own version of Tomcat-Native for your platform and
> make sure that it has IPv6 support enabled. For Windows it might be
> tricky.
>
> b) choose other connector implementation - see "protocol" attribute on
> <Connector> element in Configuration Reference.
>
> c) uninstall Tomcat-Native library or disable AprLifecycleListener in
> your configuration. In this case Tomcat will autoselect the BIO
> connector implementations for both protocols.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: How to support IPv6 on Apache Tomcat Version 7.0.22

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/7/6 Aditi Sinha <ad...@gmail.com>:
> Hi,
>
>
> We have a web server hosted on Apache Tomcat Version 7.0.22. We are trying
> to get the web server support IPv6.
>
> Machine details: Windows 2008 server machine, 32-bit OS
> Java version:  jdk1.6.0_25
>
>
> The web server is not accessible using the IPv6 address. The connectivity
> to windows server machine works fine though IPv6 address.
> The firewall is turned off.
>
>
> **
>
> In the Catalina.log can see IPv6 [false] as below.
>
> * *
>
> *INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters
> [false], random [true].*
>
>
> Is there any configuration which needs to be done for Tomcat/Connector to
> support IPv6?
>  In server.xml we are using the AJP 1.3 Connector and HTTP/1.1 Connector.**

Look into the docs - there are 3 different connector implementations
for HTTP protocol, and 3 for AJP protocol. They are known as "BIO",
"NIO" and "APR" one.

As you have Tomcat-Native library installed, the configuration by
default will use the "APR" connector.    But your problem is that the
binary version of Tomcat-Native that you are using is not compiled
with support for IPv6 and thus this connector does not support IPv6.

So have the following possibilities:
a) compile your own version of Tomcat-Native for your platform and
make sure that it has IPv6 support enabled. For Windows it might be
tricky.

b) choose other connector implementation - see "protocol" attribute on
<Connector> element in Configuration Reference.

c) uninstall Tomcat-Native library or disable AprLifecycleListener in
your configuration. In this case Tomcat will autoselect the BIO
connector implementations for both protocols.

Best regards,
Konstantin Kolinko

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