You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Paries <rt...@gmail.com> on 2006/02/11 07:21:40 UTC

A question about log rotation

Hello,

I have a tomcat apache-tomcat-5.5.15 running on RH9

i am having this wierd problem. I think it is log rotation

I start getting exceptions in the catalina.out that it can not access
a log file .

"permission denied"

I have tomcat running as user  apache.

But when the logs are rotated, they are create by root,

what rotates the logs and where do change the settings.

Thanks
Randy

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


java.lang.Object cannot be resolved

Posted by Sebastian Funk <se...@gmail.com>.
Hi,

I wrote some servlets a few weeks ago and didn't change them. On the  
server itself I update serveral things. Now, when I try compile the  
source-code, I get that error:

	1. ERROR in Familie.java
	(at line 1)
         	import java.lang.Object;
        	^
	The type java.lang.Object cannot be resolved. It is indirectly  
referenced from required .class files

the same source code worked fine for weeks. I don't use any IDE's  
like Eclipse.

Greetings,
Sebastian Funk

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


Re: A question about log rotation

Posted by Rhino <rh...@sympatico.ca>.
I had a similar issue on a Mandrake system running tomcat 4.1.24 a couple of 
years back. I resolved it eventually and wrote a bit of documentation for 
myself and the Linux sysadmin for our system. It was not intended for use by 
anyone but us so it may not explain things sufficiently clearly but it's a 
start. If you need any clarification on this points in my document, feel 
free to ask. I don't guarantee a clear answer since I'm far from being an 
expert, but if I can't help, maybe someone else on this list can.

I don't know if this information is applicable for RH9 but since they are 
both Linux, I have my fingers crossed.

=================================================================
Logrotate and logs:

/etc/logrotate.conf controls the logrotate program. This file sets the basic
parameters of the program, e.g. how many weeks worth of backlogs to keep and
whether to use compression. It also identifies the directory for the 
logrotate
control files; in the case of our server the relevant line says 'include
/etc/logrotate.d' (excluding the apostrophes).

The full contents of /etc/logrotate.conf on our server is:

# see "man logrotate" for details

# rotate log files weekly

weekly

# keep 4 weeks worth of backlogs

rotate 4

# create new (empty) log files after rotating old ones

create

# uncomment this if you want your log files compressed

compress

# RPM packages drop log rotation information into this directory

include /etc/logrotate.d

# no packages own lastlog or wtmp -- we'll rotate them here

/var/log/wtmp {

monthly

create 0664 root utmp

rotate 1

}

/var/log/lastlog {

monthly

rotate 1

}

# system-specific logs may be configured here




The logrotate directory, /etc/logrotate.d in the case of our server, has one
file for each package handled by logrotate. For instance, on our server,
directory /etc/logrotate.d has a file for Tomcat, another for MySQL, another
for cron, etc. Within each of these files are specific instructions about
what to do about the logs generated by the facility. For example,
/etc/logrotate.d/tomcat4 contains instructions about the tomcat logs.

The full contents of the file for the tomcat package on our server,
/etc/logrotate.d/tomcat4, is as follows:

/var/tomcat4/logs/*.txt {

copytruncate

weekly

rotate 4

nocompress

missingok

}

/var/tomcat4/logs/catalina.out {

copytruncate

weekly

rotate 4

nocompress

missingok

}

To uncompress a log file that has been compressed by logrotate, use
'gunzip'. For example, to uncompress a file called
localhost_log.2004-05-08.text.24.gz, use:

gunzip localhost_log.2004-05-08.text.24.gz

This yields the file:

localhost_log.2004-05-08.txt.24

To uncompress *all* files in a given directory, use this command while
positioned in the directory:

gunzip *

The "real" position of the logs directory is /var/log/tomcat4. Since "real"
paths should be used in a 'find' command if at all possible (as opposed to
using symbolic links), real paths are used in the following commands.

The following command will find all empty files in the tomcat logs
directory, assuming that the user executing the command has sufficient
authority to read the logs directory, and print their names:

find /var/log/tomcat4 -size 0 -name '*' -print

finds every empty file in the /var/tomcat4/logs directory displays the
file's particulars.

The following command will delete those same empty files if the user has
sufficient authority over the /var/log/tomcat4 directory:

find /var/log/tomcat4 -size 0 -name '*' -exec -rm {} \;

=================================================================

I hope this helps you.

--
Rhino

----- Original Message ----- 
From: "Randy Paries" <rt...@gmail.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Saturday, February 11, 2006 1:21 AM
Subject: A question about log rotation


Hello,

I have a tomcat apache-tomcat-5.5.15 running on RH9

i am having this wierd problem. I think it is log rotation

I start getting exceptions in the catalina.out that it can not access
a log file .

"permission denied"

I have tomcat running as user  apache.

But when the logs are rotated, they are create by root,

what rotates the logs and where do change the settings.

Thanks
Randy

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


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 10/02/2006




-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 10/02/2006


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