You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Rob S." <ro...@tintri.com> on 2010/03/19 18:25:03 UTC

jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Hi everyone,

After using the jsvc init script provided with Tomcat 6, Tomcat no longer
writes any log files to /logs.  The only log file I'm getting is
catalina.out, which is coming from JSVC capturing System.out and System.err.

My Google-fu must be on vacation because this seems like it would be a
common question :)

Thanks in advance!

Rob

Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Posted by Rob Slifka <ro...@tintri.com>.
Hi Mark,

> time).
> There is one due fairly soon. Mladen has been working on daemon recently.
>

Excellent!  I'm in the processing of submitting the patch to daemon's
Tomcat5.sh at the moment.


>  > - Once that happens, Tomcat needs to be updated to pull that new release
> > from the archive.
>
That is easy.
>

Yep, I was just referring to the fact that there is disjoint work required.


>  > Since the current version that Tomcat links to isn't very useful, does
> > anyone have a suggestion on how to get it replaced?
> There is already a proposal to update Tomcat to the new daemon 1.0.2
> release.
>

Perfect timing :)

Rob

Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Posted by Mark Thomas <ma...@apache.org>.
On 19/03/2010 18:45, Rob S. wrote:
> Hi Chris,
> 
> I have a script that works and I'm ready to submit a patch.  Tomcat pulls
> jsvc.tar.gz from the commons-daemon project, circa 2004/2005.
> 
> http://archive.apache.org/dist/commons/daemon/binaries/
> 
> The structure of the 1.0.1 commons-daemon is different than the structure of
> 1.0.2.  There is no /bin directory in the 1.0.2 release.
> 
> Part of the trick is that in order to get this patch into Tomcat:
> 
> - There needs to be another release of commons-daemon (unlikely for some
> time).
There is one due fairly soon. Mladen has been working on daemon recently.

> - Once that happens, Tomcat needs to be updated to pull that new release
> from the archive.
That is easy.

> Since the current version that Tomcat links to isn't very useful, does
> anyone have a suggestion on how to get it replaced?
There is already a proposal to update Tomcat to the new daemon 1.0.2
release.

Mark



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


Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Posted by "Rob S." <ro...@tintri.com>.
Hi Chris,

I have a script that works and I'm ready to submit a patch.  Tomcat pulls
jsvc.tar.gz from the commons-daemon project, circa 2004/2005.

http://archive.apache.org/dist/commons/daemon/binaries/

The structure of the 1.0.1 commons-daemon is different than the structure of
1.0.2.  There is no /bin directory in the 1.0.2 release.

Part of the trick is that in order to get this patch into Tomcat:

- There needs to be another release of commons-daemon (unlikely for some
time).
- Once that happens, Tomcat needs to be updated to pull that new release
from the archive.

Since the current version that Tomcat links to isn't very useful, does
anyone have a suggestion on how to get it replaced?

Rob

On Fri, Mar 19, 2010 at 11:27 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rob,
>
> On 3/19/2010 1:51 PM, Rob S. wrote:
> > The core of the issue seems to be that jsvc is starting Java directly
> which
> > means you have to duplicate the hard work catalina.sh does.  So while I'm
> > really talking about just getting the log files to show back up, that's
> only
> > a symptom of the larger problem.
> >
> > Is this an accurate analysis?
> >
> > Is there a better approach that can rely on all the hard work catalina.sh
> > does?
>
> Hmm... not really: IIRC jsvc requires that it calls Java directly, so
> you cant just do something like "./jsvc catalina.sh start". :(
>
> It appears that the scripts that come with jsvc are not really up to
> snuff. Actually, reading catalina.sh isn't too bad if you know which
> "mode" you want to be in.
>
> For instance, if you just want to "start", then search for "start"
> (/with/ quotes) and look at the 'case' that handles starting Tomcat. You
> also have the stuff before the switch statement, too, like determining
> CATALINA_HOME, executing any existing setenv.sh file, etc.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkujwfYACgkQ9CaO5/Lv0PAxlQCgqoOjwlvgVKWWuStAHkJuAWS1
> TcUAn17nSWMfFp7X5tRpA00XWqqyAIMe
> =5EYt
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Posted by Rob Slifka <ro...@tintri.com>.
Done and done!

https://issues.apache.org/jira/browse/DAEMON-153

Thanks everyone,

Rob

On Fri, Mar 19, 2010 at 12:20 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rob,
>
> On 3/19/2010 2:48 PM, Rob S. wrote:
> > On Fri, Mar 19, 2010 at 11:33 AM, André Warnier <aw...@ice-sa.com> wrote:
> >
> >>
> >> You should probably install a *real* tomcat pre-packaged distribution,
> like
> >> the ones you get with Debian or RedHat.  Their startup scripts work fine
> >> with jsvc, right out of the box.
> >>
> >
> > Hi Andre,
> >
> > Pragmatically speaking, that would allow me to exit this conversation
> > quickly and get back to the task at hand :)
> >
> > Since I've already done the work, I'd like future Tomcat 6 users to not
> have
> > to go down this road and I'm content to spend about 30-60 minutes
> > contributing although at this point I'm not sure how to continue.
>
> Well, you could post the fruits of your labor to the list as a start.
> You could also log a bug in bugzilla and attach a patch (or entirely new
> file) to the bug for inclusion into the Tomcat distro.
>
> Another option would be to file a bug against jsvc itself and attach
> your script(s) there. Tomcat really just re-packages jscv, so I'm not
> sure what they'll say if you log the bug against Tomcat.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkujzpcACgkQ9CaO5/Lv0PClUgCfVZegm4pDetL0jSJj6dk931vC
> e7MAn2CNrSlYiIDeto9A/9efv2KeeSVm
> =kBNZ
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

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

Rob,

On 3/19/2010 2:48 PM, Rob S. wrote:
> On Fri, Mar 19, 2010 at 11:33 AM, André Warnier <aw...@ice-sa.com> wrote:
> 
>>
>> You should probably install a *real* tomcat pre-packaged distribution, like
>> the ones you get with Debian or RedHat.  Their startup scripts work fine
>> with jsvc, right out of the box.
>>
> 
> Hi Andre,
> 
> Pragmatically speaking, that would allow me to exit this conversation
> quickly and get back to the task at hand :)
> 
> Since I've already done the work, I'd like future Tomcat 6 users to not have
> to go down this road and I'm content to spend about 30-60 minutes
> contributing although at this point I'm not sure how to continue.

Well, you could post the fruits of your labor to the list as a start.
You could also log a bug in bugzilla and attach a patch (or entirely new
file) to the bug for inclusion into the Tomcat distro.

Another option would be to file a bug against jsvc itself and attach
your script(s) there. Tomcat really just re-packages jscv, so I'm not
sure what they'll say if you log the bug against Tomcat.

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

iEYEARECAAYFAkujzpcACgkQ9CaO5/Lv0PClUgCfVZegm4pDetL0jSJj6dk931vC
e7MAn2CNrSlYiIDeto9A/9efv2KeeSVm
=kBNZ
-----END PGP SIGNATURE-----

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


Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Posted by "Rob S." <ro...@tintri.com>.
On Fri, Mar 19, 2010 at 11:33 AM, André Warnier <aw...@ice-sa.com> wrote:

>
> You should probably install a *real* tomcat pre-packaged distribution, like
> the ones you get with Debian or RedHat.  Their startup scripts work fine
> with jsvc, right out of the box.
>

Hi Andre,

Pragmatically speaking, that would allow me to exit this conversation
quickly and get back to the task at hand :)

Since I've already done the work, I'd like future Tomcat 6 users to not have
to go down this road and I'm content to spend about 30-60 minutes
contributing although at this point I'm not sure how to continue.

Rob

Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Posted by André Warnier <aw...@ice-sa.com>.
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Rob,
> 
> On 3/19/2010 1:51 PM, Rob S. wrote:
>> The core of the issue seems to be that jsvc is starting Java directly which
>> means you have to duplicate the hard work catalina.sh does.  So while I'm
>> really talking about just getting the log files to show back up, that's only
>> a symptom of the larger problem.
>>
>> Is this an accurate analysis?
>>
>> Is there a better approach that can rely on all the hard work catalina.sh
>> does?
> 
You should probably install a *real* tomcat pre-packaged distribution, 
like the ones you get with Debian or RedHat.  Their startup scripts work 
fine with jsvc, right out of the box.


Ok, now I suggest that you step back from your screen, because in about 
2 minutes it might get hot and bloody here.

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


Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

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

Rob,

On 3/19/2010 1:51 PM, Rob S. wrote:
> The core of the issue seems to be that jsvc is starting Java directly which
> means you have to duplicate the hard work catalina.sh does.  So while I'm
> really talking about just getting the log files to show back up, that's only
> a symptom of the larger problem.
> 
> Is this an accurate analysis?
> 
> Is there a better approach that can rely on all the hard work catalina.sh
> does?

Hmm... not really: IIRC jsvc requires that it calls Java directly, so
you cant just do something like "./jsvc catalina.sh start". :(

It appears that the scripts that come with jsvc are not really up to
snuff. Actually, reading catalina.sh isn't too bad if you know which
"mode" you want to be in.

For instance, if you just want to "start", then search for "start"
(/with/ quotes) and look at the 'case' that handles starting Tomcat. You
also have the stuff before the switch statement, too, like determining
CATALINA_HOME, executing any existing setenv.sh file, etc.

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

iEYEARECAAYFAkujwfYACgkQ9CaO5/Lv0PAxlQCgqoOjwlvgVKWWuStAHkJuAWS1
TcUAn17nSWMfFp7X5tRpA00XWqqyAIMe
=5EYt
-----END PGP SIGNATURE-----

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


Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Posted by "Rob S." <ro...@tintri.com>.
The core of the issue seems to be that jsvc is starting Java directly which
means you have to duplicate the hard work catalina.sh does.  So while I'm
really talking about just getting the log files to show back up, that's only
a symptom of the larger problem.

Is this an accurate analysis?

Is there a better approach that can rely on all the hard work catalina.sh
does?

Rob



On Fri, Mar 19, 2010 at 10:40 AM, Rob S. <ro...@tintri.com> wrote:

> Yep, the "update" really just changed the name of Bootstrap :)
>
> In the process of debugging this now and I will definitely post the results
> here / submit a patch, hopefully later today.
>
> Rob
>
>
> On Fri, Mar 19, 2010 at 10:34 AM, Christopher Schultz <
> chris@christopherschultz.net> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Rob,
>>
>> On 3/19/2010 1:25 PM, Rob S. wrote:
>> > After using the jsvc init script provided with Tomcat 6, Tomcat no
>> longer
>> > writes any log files to /logs.  The only log file I'm getting is
>> > catalina.out, which is coming from JSVC capturing System.out and
>> System.err.
>>
>> Are you talking about bin/Tomcat.sh that comes bundled with Tomcat 6
>> under bin/jsvc.tar.gz? I'm looking at 6.0.20's version of that file, and
>> it's got some disturbing stuff in it, like this:
>>
>> JAVA_HOME=/usr/java/jdk1.3.1
>>
>> and this:
>>
>> CLASSPATH=\
>> $JAVA_HOME/lib/tools.jar:\
>> $DAEMON_HOME/dist/commons-daemon.jar:\
>> $CATALINA_HOME/bin/bootstrap.jar
>>
>> (note the tools.jar)
>>
>> The script Tomcat5.sh has similar craziness in it, but I suppose those
>> scripts /do/ say:
>>
>> # Adapt the following lines to your configuration
>>
>> Given that the script basically has to be configured, can you please
>> post any customizations that you have made to the script?
>>
>> I haven't looked at the source to jsvc, but I see that the -errfile
>> parameter to jsvc is set to '&1' which, in many shells, means "standard
>> output". You can see from the (rather simple) script that the -outfile
>> and -errfile options are set to reasonable values
>> ($CATALINA_HOME/logs/catalina.out).
>>
>> Actually, if you're using multiple Tomcat instances and setting
>> CATALINA_BASE, then the script is wrong: it should say:
>>
>>    -outfile $CATALINA_BASE/logs/catalina.out \
>>    -errfile '&1' \
>>
>> Better yet:
>>
>>    -outfile "$CATALINA_HOME/logs/catalina.out" \
>>    -errfile '&1' \
>>
>> Oh, those pesky spaces in path names! (Cue Andre's rant)
>>
>> > My Google-fu must be on vacation because this seems like it would be a
>> > common question :)
>>
>> :)
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAkujtbIACgkQ9CaO5/Lv0PCcVgCfQxE6QpBJu80x+RLO5RBLZy1V
>> 1NEAniXVtMqyiUsDioaDT0BL9v/yh4Xc
>> =4n6+
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>

Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

Posted by "Rob S." <ro...@tintri.com>.
Yep, the "update" really just changed the name of Bootstrap :)

In the process of debugging this now and I will definitely post the results
here / submit a patch, hopefully later today.

Rob

On Fri, Mar 19, 2010 at 10:34 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rob,
>
> On 3/19/2010 1:25 PM, Rob S. wrote:
> > After using the jsvc init script provided with Tomcat 6, Tomcat no longer
> > writes any log files to /logs.  The only log file I'm getting is
> > catalina.out, which is coming from JSVC capturing System.out and
> System.err.
>
> Are you talking about bin/Tomcat.sh that comes bundled with Tomcat 6
> under bin/jsvc.tar.gz? I'm looking at 6.0.20's version of that file, and
> it's got some disturbing stuff in it, like this:
>
> JAVA_HOME=/usr/java/jdk1.3.1
>
> and this:
>
> CLASSPATH=\
> $JAVA_HOME/lib/tools.jar:\
> $DAEMON_HOME/dist/commons-daemon.jar:\
> $CATALINA_HOME/bin/bootstrap.jar
>
> (note the tools.jar)
>
> The script Tomcat5.sh has similar craziness in it, but I suppose those
> scripts /do/ say:
>
> # Adapt the following lines to your configuration
>
> Given that the script basically has to be configured, can you please
> post any customizations that you have made to the script?
>
> I haven't looked at the source to jsvc, but I see that the -errfile
> parameter to jsvc is set to '&1' which, in many shells, means "standard
> output". You can see from the (rather simple) script that the -outfile
> and -errfile options are set to reasonable values
> ($CATALINA_HOME/logs/catalina.out).
>
> Actually, if you're using multiple Tomcat instances and setting
> CATALINA_BASE, then the script is wrong: it should say:
>
>    -outfile $CATALINA_BASE/logs/catalina.out \
>    -errfile '&1' \
>
> Better yet:
>
>    -outfile "$CATALINA_HOME/logs/catalina.out" \
>    -errfile '&1' \
>
> Oh, those pesky spaces in path names! (Cue Andre's rant)
>
> > My Google-fu must be on vacation because this seems like it would be a
> > common question :)
>
> :)
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkujtbIACgkQ9CaO5/Lv0PCcVgCfQxE6QpBJu80x+RLO5RBLZy1V
> 1NEAniXVtMqyiUsDioaDT0BL9v/yh4Xc
> =4n6+
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: jsvc w/Tomcat 6.0.26 - Tomcat logs disappeared

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

Rob,

On 3/19/2010 1:25 PM, Rob S. wrote:
> After using the jsvc init script provided with Tomcat 6, Tomcat no longer
> writes any log files to /logs.  The only log file I'm getting is
> catalina.out, which is coming from JSVC capturing System.out and System.err.

Are you talking about bin/Tomcat.sh that comes bundled with Tomcat 6
under bin/jsvc.tar.gz? I'm looking at 6.0.20's version of that file, and
it's got some disturbing stuff in it, like this:

JAVA_HOME=/usr/java/jdk1.3.1

and this:

CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$DAEMON_HOME/dist/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar

(note the tools.jar)

The script Tomcat5.sh has similar craziness in it, but I suppose those
scripts /do/ say:

# Adapt the following lines to your configuration

Given that the script basically has to be configured, can you please
post any customizations that you have made to the script?

I haven't looked at the source to jsvc, but I see that the -errfile
parameter to jsvc is set to '&1' which, in many shells, means "standard
output". You can see from the (rather simple) script that the -outfile
and -errfile options are set to reasonable values
($CATALINA_HOME/logs/catalina.out).

Actually, if you're using multiple Tomcat instances and setting
CATALINA_BASE, then the script is wrong: it should say:

    -outfile $CATALINA_BASE/logs/catalina.out \
    -errfile '&1' \

Better yet:

    -outfile "$CATALINA_HOME/logs/catalina.out" \
    -errfile '&1' \

Oh, those pesky spaces in path names! (Cue Andre's rant)

> My Google-fu must be on vacation because this seems like it would be a
> common question :)

:)

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

iEYEARECAAYFAkujtbIACgkQ9CaO5/Lv0PCcVgCfQxE6QpBJu80x+RLO5RBLZy1V
1NEAniXVtMqyiUsDioaDT0BL9v/yh4Xc
=4n6+
-----END PGP SIGNATURE-----

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