Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Sep 2011 12:46:09 -0700
From:      Devin Teske <devin.teske@fisglobal.com>
To:        "'Doug Barton'" <dougb@FreeBSD.org>
Cc:        freebsd-rc@freebsd.org, ale@FreeBSD.org
Subject:   RE: www/tomcat7 bug in rc.d startup script when clear_tmp_enable="YES"
Message-ID:  <038e01cc6ccd$a37a79b0$ea6f6d10$@fisglobal.com>
In-Reply-To: <4E667606.7010300@FreeBSD.org>
References:  <038001cc6ccb$32226ea0$96674be0$@fisglobal.com> <4E667606.7010300@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
NOTE TO BCC'D VICORIANS: DO NOT REPLY TO THIS E-MAIL -- this is an e-mail to the
FreeBSD Mailing Lists; you have been BCC'd for discussion purposes only.

> -----Original Message-----
> From: Doug Barton [mailto:dougb@FreeBSD.org]
> Sent: Tuesday, September 06, 2011 12:36 PM
> To: Devin Teske
> Cc: freebsd-rc@freebsd.org; ale@FreeBSD.org
> Subject: Re: www/tomcat7 bug in rc.d startup script when
> clear_tmp_enable="YES"
> 
> Since this is a port you are infinitely more likely to get attention to the
issue if you
> cc the maintainer.
> 
> The right answer here is that:
> 
> # REQUIRE: NETWORKING SERVERS
> # BEFORE: DAEMON
> 
> should be
> 
> REQUIRE: LOGIN
> 
> since this service runs as an unprivileged user. That will also solve the
clear_tmp
> problem.
> 
> 
> Doug

Thanks Doug!!! and I actually hit send prematurely (while waiting for one final
test result to come back).

My proposed solution did not work -- but yours did!

On a side-note, is "REQUIRE" essentially analogous to "AFTER" in that we don't
need an "AFTER" feature added to rcorder(8)? Or maybe rcorder(8) would benefit
from an "AFTER" as an antithesis to the already supported "BEFORE" feature?
-- 
Devin



> 
> On 09/06/2011 12:28, Devin Teske wrote:
> > Hi List,
> >
> > A bit short on time here and can't file a PR just this minute, but
> > wanted to share a buggette that we've discovered in the www/tomcat7
> > port (currently at version 7.0.20 as of last week, but bug dates back
> > months as far back as version
> > 7.0.14 and perhaps further).
> >
> > ___ Bug description: ___
> >
> > If one puts the following two lines into one's rc.conf(5) configuration:
> >
> > 	tomcat7_enable="YES"
> > 	clear_tmp_enable="YES"
> >
> > What happens is that tomcat7 is fired up and creates his
> >
> > 	/tmp/hsperfdata_{user}
> >
> > directory, but then later the clear_tmp script is fired and blows away
> > items recently created by tomcat.
> >
> > The end-result is that after booting the system, one can execute:
> >
> > 	service tomcat7 status
> >
> > and get the false response:
> >
> > 	tomcat7 is not running
> >
> > Meanwhile, one can execute:
> >
> > 	ps auxwww | sh -c 'head -1; grep java'
> >
> > and clearly see that tomcat *is* running. Indeed, one can even execute:
> >
> > 	cat /var/run/tomcat7.pid
> >
> > and indeed, this is the correct pid.
> >
> > ___ Root-cause description: ___
> >
> > The problem is truly that the tomcat7 rc.d script uses the jps command
> > to determine that the appropriate java process is running and that jps
> > relies on data in the java.io.tmpdir directory (/tmp) which was.... (wait
for it) ...
> > whacked by clear_tmp moments after firing up tomcat.
> >
> > ___ Solution description: ___
> >
> > Apply the following patch to /usr/local/etc/rc.d/tomcat7:
> >
> > ========== BEGIN PATCH EXCERPT ==========
> > --- /usr/local/etc/rc.d/tomcat7.orig    2011-09-06 12:25:45.000000000 -0700
> > +++ /usr/local/etc/rc.d/tomcat7 2011-09-06 12:26:17.000000000 -0700
> > @@ -4,7 +4,7 @@
> >  #
> >
> >  # PROVIDE: tomcat7
> > -# REQUIRE: NETWORKING SERVERS
> > +# REQUIRE: NETWORKING SERVERS clear_tmp
> >  # BEFORE: DAEMON
> >  # KEYWORD: shutdown
> >
> > ========== END PATCH EXCERPT ==========
> 
> 
> 
> --
> 
> 	Nothin' ever doesn't change, but nothin' changes much.
> 			-- OK Go
> 
> 	Breadth of IT experience, and depth of knowledge in the DNS.
> 	Yours for the right price.  :)  http://SupersetSolutions.com/


_____________

The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
_____________



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?038e01cc6ccd$a37a79b0$ea6f6d10$>