You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martin Dubuc <ma...@gmail.com> on 2011/02/11 16:17:38 UTC

IPv6 Issue with Tomcat

On my Tomcat server (currently running version 6.x), I have set up a
firewall rule to drop all IPv6 traffic. It seems that this is causing some
issue on startup, because the startup delay is noticeable (takes around 3
minutes) when the IPv6 firewall rule is on. If the IPv6 rule is not on, the
server usually starts in a few seconds. By looking more closely at the
problem, my understanding is that the delay is caused by the server trying
to access the database realm. It is using JDBC to connect to the database.
The driver is likely trying to communicate first using IPv6 and when a
timeout occurs (because all IPv6 packets are dropped by the firewall), the
driver switches back to IPv4 and then the startup is able to complete. To
me, this seems to be a JDBC driver issue, but I am wondering if there is
configuration within Tomcat to force the driver not to use IPv6.

Martin

Re: IPv6 Issue with Tomcat

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

Mark,

On 2/11/2011 12:14 PM, Mark Shifman wrote:
> I was burned in a similar fashion. Phil Steitz (on the commons user list)
> pointed me to.
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6483406
> 
> One recommended fix/workaround is that suggested by Chuck in a previous post.

I might recommend allowing loopback IPv6 communication, but that might
not be reasonable in the OP's environment.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1ViioACgkQ9CaO5/Lv0PDhnwCbBXY7IhAMMk53DaxSoAcWmmh5
KAEAni02VvvmaKsj0F9vjlr+liytLSjL
=j/S0
-----END PGP SIGNATURE-----

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


Re: IPv6 Issue with Tomcat

Posted by Mark Shifman <ma...@yale.edu>.
I was burned in a similar fashion. Phil Steitz (on the commons user list)
pointed me to.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6483406

One recommended fix/workaround is that suggested by Chuck in a previous post.
mas



On 02/11/2011 10:39 AM, Martin Dubuc wrote:
> I am using Tomcat 6.0.29 and JDK 6 Update 23.
> 
> Martin
> 
> On Fri, Feb 11, 2011 at 10:30 AM, Caldarale, Charles R <
> Chuck.Caldarale@unisys.com> wrote:
> 
>>> From: Martin Dubuc [mailto:martind1111@gmail.com]
>>> Subject: IPv6 Issue with Tomcat
>>
>>> I am wondering if there is configuration within Tomcat
>>> to force the driver not to use IPv6.
>>
>> Not within Tomcat, but possibly for the JVM you're using.  Try setting
>> -Djava.net.preferIPv4Stack=true as a JVM system property parameter.
>>
>> Of course, not telling us your actual Tomcat version, the JVM level you're
>> using, and the platform you're on makes providing advice somewhat of a shot
>> in the dark.
>>
>>  - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you received
>> this in error, please contact the sender and delete the e-mail and its
>> attachments from all computers.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 

-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shifman@yale.edu

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


Re: IPv6 Issue with Tomcat

Posted by Martin Dubuc <ma...@gmail.com>.
I am using Tomcat 6.0.29 and JDK 6 Update 23.

Martin

On Fri, Feb 11, 2011 at 10:30 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Martin Dubuc [mailto:martind1111@gmail.com]
> > Subject: IPv6 Issue with Tomcat
>
> > I am wondering if there is configuration within Tomcat
> > to force the driver not to use IPv6.
>
> Not within Tomcat, but possibly for the JVM you're using.  Try setting
> -Djava.net.preferIPv4Stack=true as a JVM system property parameter.
>
> Of course, not telling us your actual Tomcat version, the JVM level you're
> using, and the platform you're on makes providing advice somewhat of a shot
> in the dark.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: IPv6 Issue with Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Martin Dubuc [mailto:martind1111@gmail.com] 
> Subject: IPv6 Issue with Tomcat

> I am wondering if there is configuration within Tomcat 
> to force the driver not to use IPv6.

Not within Tomcat, but possibly for the JVM you're using.  Try setting -Djava.net.preferIPv4Stack=true as a JVM system property parameter.

Of course, not telling us your actual Tomcat version, the JVM level you're using, and the platform you're on makes providing advice somewhat of a shot in the dark.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: IPv6 Issue with Tomcat

Posted by Martin Dubuc <ma...@gmail.com>.
Thanks for all your response guys. Chuck's recommendation did fix my
problem. I also liked the loopback recommendation.

Martin

On Fri, Feb 11, 2011 at 10:17 AM, Martin Dubuc <ma...@gmail.com>wrote:

> On my Tomcat server (currently running version 6.x), I have set up a
> firewall rule to drop all IPv6 traffic. It seems that this is causing some
> issue on startup, because the startup delay is noticeable (takes around 3
> minutes) when the IPv6 firewall rule is on. If the IPv6 rule is not on, the
> server usually starts in a few seconds. By looking more closely at the
> problem, my understanding is that the delay is caused by the server trying
> to access the database realm. It is using JDBC to connect to the database.
> The driver is likely trying to communicate first using IPv6 and when a
> timeout occurs (because all IPv6 packets are dropped by the firewall), the
> driver switches back to IPv4 and then the startup is able to complete. To
> me, this seems to be a JDBC driver issue, but I am wondering if there is
> configuration within Tomcat to force the driver not to use IPv6.
>
> Martin
>