Discussion:
Apache Tomcat 7.0.035 and IPv6 environment
Geett Chanddra Singha
2013-03-28 05:01:59 UTC
Permalink
Hi All,

I have a web application hosted on Apache Tomcat Version 7.0.035.
We are trying to make the web application run IPv6 environment.

Environment Details
Windows 2008 server machine, 64-bit OS
Java version: JRE 1.7.x

The home page of web application is not accessible using the IPv6 address.
The connectivity to windows server machine goes though IPv6 address.

Here is the Tomcat startup log details:

Mar 28, 2013 10:21:47 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.24 using APR
version 1.4
.6.
Mar 28, 2013 10:21:47 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], ra
ndom [true].
Mar 28, 2013 10:21:48 AM org.apache.catalina.core.AprLifecycleListener
initializ
eSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012)
Mar 28, 2013 10:21:49 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-9080"]
Mar 28, 2013 10:21:49 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Mar 28, 2013 10:21:49 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3117 ms
Mar 28, 2013 10:21:49 AM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Mar 28, 2013 10:21:49 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.35
Mar 28, 2013 10:21:49 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
C:\Users\Administrator\Desktop\apache-
tomcat-7.0.35\webapps\docs
Mar 28, 2013 10:21:50 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
C:\Users\Administrator\Desktop\apache-
tomcat-7.0.35\webapps\examples
Mar 28, 2013 10:21:51 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
C:\Users\Administrator\Desktop\apache-
tomcat-7.0.35\webapps\host-manager
Mar 28, 2013 10:21:51 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
C:\Users\Administrator\Desktop\apache-
tomcat-7.0.35\webapps\manager
Mar 28, 2013 10:21:51 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
C:\Users\Administrator\Desktop\apache-
tomcat-7.0.35\webapps\ROOT
Mar 28, 2013 10:21:51 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-9080"]
Mar 28, 2013 10:21:51 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Mar 28, 2013 10:21:51 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2536 ms

Please help me to get solution for this.
--
Thanks & Regards
Geett Chanddra Singha
Konstantin Kolinko
2013-03-28 05:26:03 UTC
Permalink
Post by Geett Chanddra Singha
Hi All,
I have a web application hosted on Apache Tomcat Version 7.0.035.
We are trying to make the web application run IPv6 environment.
Environment Details
Windows 2008 server machine, 64-bit OS
Java version: JRE 1.7.x
The home page of web application is not accessible using the IPv6 address.
The connectivity to windows server machine goes though IPv6 address.
Mar 28, 2013 10:21:47 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.24 using APR
version 1.4
.6.
APR connector cannot listen on both IPv4 and IPv6 addresses at the same time.
You have to choose one (with address attribute).

If you need both IPv4 and IPv6, configure 2 connectors.

It has been discussed previously. Search the archives.
Geett Chanddra Singha
2013-03-28 05:32:10 UTC
Permalink
Thanks Konstantin Kolinko!

It will be great help for me if you could provide steps to configure the
same or documents, where in I could get configuration steps.
Post by Geett Chanddra Singha
Post by Geett Chanddra Singha
Hi All,
I have a web application hosted on Apache Tomcat Version 7.0.035.
We are trying to make the web application run IPv6 environment.
Environment Details
Windows 2008 server machine, 64-bit OS
Java version: JRE 1.7.x
The home page of web application is not accessible using the IPv6
address.
Post by Geett Chanddra Singha
The connectivity to windows server machine goes though IPv6 address.
Mar 28, 2013 10:21:47 AM org.apache.catalina.core.AprLifecycleListener
init
Post by Geett Chanddra Singha
INFO: Loaded APR based Apache Tomcat Native library 1.1.24 using APR
version 1.4
.6.
APR connector cannot listen on both IPv4 and IPv6 addresses at the same time.
You have to choose one (with address attribute).
If you need both IPv4 and IPv6, configure 2 connectors.
It has been discussed previously. Search the archives.
---------------------------------------------------------------------
--
Thanks & Regards
Geett Chanddra Singha
Christopher Schultz
2013-03-28 13:17:55 UTC
Permalink
Geet,
Post by Geett Chanddra Singha
Thanks Konstantin Kolinko!
It will be great help for me if you could provide steps to
configure the same or documents, where in I could get configuration
steps.
Well, you could search the archives... that's what they are there for.
Or, you could read the online documentation:

https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Standard_Implementation

Look at the "address" attribute. On many systems, a single interface
has both IPv4 and IPv6 addresses, so you may or may not be able to do
this:

<Connector address="0.0.0.0" port="8080" />
<Connector address="::" port="8080" />

I'm not sure if Tomcat interprets the "address" value prior to handing
it off to APR... if so, you may have to use "0:0:0:0:0:0:0:0" for your
IPv6 address because IIRC Tomcat/JVM does not understand IPv6 shorthand.

Anyhow, if the above doesn't work (because port 8080 can only be bound
once per interface), you'll need to do something like this:

<Connector address="0.0.0.0" port="8080" />
<Connector address="::" port="8081" /><!-- note the different port -->

- -chris

Loading...