Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 33780 invoked from network); 23 Feb 2006 16:54:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Feb 2006 16:54:43 -0000 Received: (qmail 95675 invoked by uid 500); 23 Feb 2006 16:54:35 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 95398 invoked by uid 500); 23 Feb 2006 16:54:34 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 95387 invoked by uid 99); 23 Feb 2006 16:54:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2006 08:54:34 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.11.148.122] (HELO relay2.ptc.com) (12.11.148.122) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2006 08:54:33 -0800 Received: from hq-ex3fe3.ptcnet.ptc.com ([132.253.201.67]) by relay2.ptc.com with ESMTP; 23 Feb 2006 11:54:12 -0500 X-IronPort-AV: i="4.02,141,1139202000"; d="scan'208"; a="123989979:sNHT40459812" Received: from HQ-MAIL4.ptcnet.ptc.com ([132.253.202.96]) by hq-ex3fe3.ptcnet.ptc.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 23 Feb 2006 11:54:12 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Using APR with tomcat leaves port 8009 bound when tomcat is terminated? Date: Thu, 23 Feb 2006 11:54:11 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Using APR with tomcat leaves port 8009 bound when tomcat is terminated? Thread-Index: AcY4mRV8wvImQwc1SQCQDvelQYxwFAAAJ58w From: "Fenlason, Josh" To: "Tomcat Developers List" X-OriginalArrivalTime: 23 Feb 2006 16:54:12.0286 (UTC) FILETIME=[C597F5E0:01C63899] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks!! > -----Original Message----- > From: Jim Jagielski [mailto:jim@jaguNET.com]=20 > Sent: Thursday, February 23, 2006 10:49 AM > To: Tomcat Developers List > Subject: Re: Using APR with tomcat leaves port 8009 bound=20 > when tomcat is terminated? >=20 >=20 > I agree that the change is a big benefit, and for > most OSs we care about, SO_REUSEADDR is available. > The APR call should gracefully fail... >=20 > I'll plug this in later on today after some edge-case tests. >=20 > On Feb 23, 2006, at 11:02 AM, Fenlason, Josh wrote: >=20 > > Remy or anyone else working on the native connector, > > I'm not the only one who has seen this problem and=20 > obviously the Java=20 > > code isn't doing what you expected. Any chance you of this patch=20 > > getting accepted now? If not, would you be able to explain=20 > why not? =20 > > Thanks in advance. , > > Josh. > > > >> -----Original Message----- > >> From: Sean Neeley [mailto:Sean.Neeley@ProducePro.com] > >> Sent: Wednesday, February 22, 2006 10:59 AM > >> To: Tomcat Users List > >> Subject: RE: Using APR with tomcat leaves port 8009 bound=20 > when tomcat=20 > >> is terminated? > >> > >> > >> I built the native connector myself. The platform is Red=20 > Hat linux=20 > >> 8.0, kernel 2.4.32. Many, many thanks for the patch. The socket=20 > >> option used in the patch is also what the APR team recommended. I=20 > >> hope someone adds this change permanently in the tomcat source. > >> > >> - Sean > >> > >> -----Original Message----- > >> From: Fenlason, Josh [mailto:jfenlason@ptc.com] > >> Sent: Wednesday, February 22, 2006 10:35 AM > >> To: Tomcat Users List > >> Subject: RE: Using APR with tomcat leaves port 8009 bound=20 > when tomcat=20 > >> is terminated? > >> > >> I had the same problem and submitted a patch (with help from Bill=20 > >> Barker). The patch is below and I attached the thread=20 > Bill and I had=20 > >> to come to it in case your curious. You'll have to rebuild the=20 > >> native connector, but this should solve your problem. =20 > What platform=20 > >> are you on? Did you build the native connector yourself? =20 > Or where=20 > >> did you get the binary from? > >> > >> Remy or anyone else working on the native connector, > >> I'm not the only one who has seen this problem and=20 > obviously the Java=20 > >> code isn't doing what you expected. Any chance you of this patch=20 > >> getting accepted now? If not, would you be able to explain why? =20 > >> Thanks in advance. , Josh. > >> > >> bash-2.03$ diff -c network.c network.c.orig > >> *** network.c Mon Feb 6 12:50:54 2006 > >> --- network.c.orig Mon Feb 6 12:50:11 2006 > >> *************** > >> *** 385,391 **** > >> UNREFERENCED_STDARGS; > >> TCN_ASSERT(sock !=3D 0); > >> TCN_ASSERT(s->sock !=3D NULL); > >> + apr_socket_opt_set( s->sock, APR_SO_REUSEADDR, 1 ); > >> return (jint)apr_socket_bind(s->sock, a); > >> } > >> > >>> -----Original Message----- > >>> From: Sean Neeley [mailto:Sean.Neeley@ProducePro.com] > >>> Sent: Wednesday, February 22, 2006 10:06 AM > >>> To: users@tomcat.apache.org > >>> Subject: Using APR with tomcat leaves port 8009 bound=20 > when tomcat is=20 > >>> terminated? > >>> > >>> > >>> Hi, > >>> > >>> > >>> > >>> I'm using APR 1.2.2 with Tomcat 5.5.15. Occasionally I need to=20 > >>> restart the JVM, and so I have one of my servlets call=20 > >>> System.exit(0). When using the APR libraries with=20 > tomcat, exiting=20 > >>> the JVM in this manor leaves port 8009 in the FIN_WAIT2=20 > state (see=20 > >>> netstat man page). This prevents me from starting tomcat back up=20 > >>> immediately. I receive an error saying that the tomcat port is=20 > >>> already bound. If I remove the APR libraries so that tomcat does=20 > >>> not use them, I no longer encounter this problem. Can=20 > someone help? =20 > >>> I would like to use APR, but this problem prevents me. I have > >>> already posted this issue to the APR mailing list, and they > >>> say that the problem is with tomcat. Thanks. > >>> > >>> > >>> > >>> - Sean > >>> > >>> > >>> > >>> > >> > >>=20 > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > >> For additional commands, e-mail: users-help@tomcat.apache.org > >> > > > >=20 > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: dev-help@tomcat.apache.org > > >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org