You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by André Warnier <aw...@ice-sa.com> on 2008/06/05 01:58:01 UTC
request for simplistic Tomcat 5.5 log config
Hi.
I am setting up a server with lots of applications generating logs, and
would like to simplify my life by handling them all with logrotate,
which generally speaking I am getting done.
But I have a problem with Tomcat.
For one small web-application, there is thus a Tomcat 5.5 server running.
I am interested only in start/stop and in real errors, and would like to
have one single Tomcat logfile, with everything in it, as terse as
possible while remaining useful to track down a fatal error if any.
Currently, despite some chasing around Tomcat5.5 documentation and
configuration files, and commenting out various things that looked like
they had to do with logs, I am left with still the following files in
the /var/log/tomcat5.5 directory. If I stop Tomcat and delete them, they
re-appear at the next Tomcat start :
admin.2008-06-04.log
catalina_2008-06-04.log
catalina.2008-06-04.log
catalina.out
host-manager.2008-06-04.log
localhost.2008-06-04.log
manager.2008-06-04.log
(notice e.g. both "catalina.2008-06-04.log" and "catalina_2008-06-04.log" ?)
I know where catalina.out comes from, and that's fine, it can stay.
But how do I get rid of the other ones, or get all these things to use
the same "tomcat.errors.log" for instance ?
Where do these things "live" ?
(not in the on-line Tomcat5.5 documentation, that's for sure)
(This is Linux Debian Etch, with Tomcat5.5 out of the box, standard
apt-get install.)
Thanks much in advance,
André
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: request for simplistic Tomcat 5.5 log config
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: André Warnier [mailto:aw@ice-sa.com]
> Subject: Re: request for simplistic Tomcat 5.5 log config
>
> Now, again, I see the following files in the
> /var/log/tomcat5.5 directory
Which further shows how the 3rd-party repackagers have corrupted the Tomcat distribution. You really need to throw that away and install an actual Tomcat - or make it the sys admin's problem.
- 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: request for simplistic Tomcat 5.5 log config
Posted by "Mark H. Wood" <mw...@IUPUI.Edu>.
On Fri, Jun 06, 2008 at 12:54:26AM +0200, André Warnier wrote:
> Mark Thomas wrote:
>> André Warnier wrote:
>>> (This is Linux Debian Etch, with Tomcat5.5 out of the box, standard
>>> apt-get install.)
>> Without knowing if/how 5.5.x has been mangled by the packaging process it
>> is going to be difficult to help you. The packaging process tends to play
>> all sorts of games with file locations and default configurations.
>
> Yes, it mangles quite a bit. Tomcat5.5 is split (as files and links)
> between /etc/tomcat5.5, /var/lib/tomcat5.5, and /usr/share/tomcat5.5.
> I suppose the Debian packagers have their very good and smart reasons for
> doing this, but it doesn't make searching config files easier.
They do. On Linux, for example, see the FileSystem Standard or
whatever it's called now.
On a production system, /usr might be mounted read-only, so you can't
keep log files or scratch stuff (like auto-expanded .war files) there.
/usr might not even be physically connected to the box; you might have
racks of machines all mounting a common /usr image from some NFS
server. /usr is a great place to put stuff which is changed only by
replacing the whole file when the system is not available to end
users, like executables and JARs.
Since each host may require different settings, configuration data
(like server.xml and context descriptor files) go in /etc so they can
be customized per-host.
Stuff that has to be writable should be in /var, which had better be
mounted read-write or nearly every program on the box will break.
/var is the place for state data or scratch storage -- stuff created
at runtime or, if we must, empty structured files built by the
installation process. Things just copied from the install kit don't
belong here.
If log files are hidden away outside of /var/log, the sysadmin will
mutter something unprintable and either move or symlink them there.
/var/log might be on its own volume, so that applications won't fail
when they go to write scratch files and find that the logs have eaten
up all the available space. If /var/log fills up, we lose a few data
that have a 1:10000 chance of being interesting; if /var fills up, we
lose customers because nothing works for them.
So, that's why some people insist on separating files that have
different lifetime, scope, and access requirements.
--
Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.
Re: request for simplistic Tomcat 5.5 log config
Posted by André Warnier <aw...@ice-sa.com>.
Mark Thomas wrote:
>
> André Warnier wrote:
>> (This is Linux Debian Etch, with Tomcat5.5 out of the box, standard
>> apt-get install.)
>
> Without knowing if/how 5.5.x has been mangled by the packaging process
> it is going to be difficult to help you. The packaging process tends to
> play all sorts of games with file locations and default configurations.
Yes, it mangles quite a bit. Tomcat5.5 is split (as files and links)
between /etc/tomcat5.5, /var/lib/tomcat5.5, and /usr/share/tomcat5.5.
I suppose the Debian packagers have their very good and smart reasons
for doing this, but it doesn't make searching config files easier.
> If you use a packaged version rather than the standard tar you limit the
> pool of people able to help to those running the same package as you.
Understood. But there must be some logic as to where log settings for
given hosts or applications are defined, no ?
>
> If you can, switch to the standard tar.gz from one of the Apache mirrors.
That I can't, or my main system maintainer would be very unhappy.
Now, again, I see the following files in the /var/log/tomcat5.5
directory (that at least is easy, it seems to be the only location for
logfiles) :
catalina.out
catalina_2008-06-04.log
catalina.2008-06-04.log
localhost.2008-06-04.log
admin.2008-06-04.log
host-manager.2008-06-04.log
manager.2008-06-04.log
To take the issue one little bit at a time :
1) I would like to know for instance, in which configuration file(s) one
would be likely to find out where it says to create 2 logfiles, one
named "catalina_2008-06-04.log" and one named "catalina.2008-06-04.log",
and how to join them into a single file maybe ?
They contain different things :
catalina_xxxxx.log tends to contain this kind of info :
SessionId=AD335A46F14779A900FFB73B2CBC66A4
MaxTimeOut = 6120
SessionId=AD335A46F14779A900FFB73B2CBC66A4
SessionId=AD335A46F14779A900FFB73B2CBC66A4
while cataline.xxxx.log tends to contain this kind of stuff :
Jun 3, 2008 1:17:58 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8180
Jun 3, 2008 1:17:59 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jun 3, 2008 1:18:03 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8180
Jun 3, 2008 1:18:03 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime
03-Jun-2008 13:18:14 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
2) admin, host-manager and manager are applications.
If they each produce an individual logfile, I would imagine that it is
defined somewhere that they should.
I have followed the path /var/lib/tomcat5.5/conf/Catalina/localhost, and
in that directory I find 3 files :
admin.xml
host-manager.xml
manager.xml
All 3 files contain a <Context> element, but only in admin.xml was there
a <Logger> element. I commented it out.
Then I stop Tomcat, delete all logfiles in /var/log/tomcat5.5, restart
Tomcat, and presto, all files re-appear *including admin.2008-06-05.log*
?? where does it come from ? And what was the <Logger> element doing
before I commented it out ?
In the other 2 files, there is no <Logger>. So why do these apps then
still produce their own logfiles ?
For example, if I consider the "manager" application, and it has no
Logger defined in it's "context" file
/var/lib/tomcat5.5/conf/Catalina/localhost/manager.xml, then where else
could it be defined ?
Thanks in advance,
André
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: request for simplistic Tomcat 5.5 log config
Posted by Mark Thomas <ma...@apache.org>.
André Warnier wrote:
> (This is Linux Debian Etch, with Tomcat5.5 out of the box, standard
> apt-get install.)
Without knowing if/how 5.5.x has been mangled by the packaging process it
is going to be difficult to help you. The packaging process tends to play
all sorts of games with file locations and default configurations. If you
use a packaged version rather than the standard tar you limit the pool of
people able to help to those running the same package as you.
If you can, switch to the standard tar.gz from one of the Apache mirrors.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org