Also I found this unanswered post by someone who did some invesigation into the log4j
code
**snip**
This issue happens when two threads are running and using log4j.
I checked the code in DailyRollingFileAppender
boolean result = file.renameTo(target);
if(result) {
LogLog.debug(fileName + " - > "+ scheduledFilename);
} else {
LogLog.error( "Failed to rename [ "+fileName+ "] to [ "+scheduledFilename+ "]. ");
}
as list above, i don 't think it 's security issue. if so, the
File.renameTo() will throw a SecurityException, and the code cannot run to
'Failed to rename... '
Anybody has idea on this issue?
I 'm using log4j-1.2.8, JDK1.4.2_03-b02, Windows 2000 Professional
**snip**
We use 1.2.8, 1.4.2_04 and W2K.
Cheers, ADC
-----Original Message-----
From: Allistair Crossley
Sent: 21 May 2004 09:35
To: Log4J Users List
Subject: RE: log4j:ERROR Failed to rename [../logs/performance.log] to
[../logs/performance.log.2004-05-04].
We have a test and a production server. They are configured identically. The test
server does not experience this log4j:ERROR Failed to rename [../logs/iq2/rar.log] to
[../logs/iq2/rar.log.2004-05-20]. problem. Nor do we ever call LogManager.shutdown and
have never needed to....needless to say the test tomcat is restarted quite a lot.
Last night I stopped the production server, redeployed the web application and killed
all Java processes. Yet still this problem occurs. I even created a new directory
into which the log files are stored and set permissions on that folder to be fully
writeable.
I have used the handle tools to determine nothing other than multiple entries to the
log files seem to be present in the tomcat process.
I don't think this is an IS problem personally but I also cannot think why this
reoccurs even after killing all Java processes.
Regards
-----Original Message-----
From: Ceki G�lc� [mailto:[EMAIL PROTECTED]
Sent: 20 May 2004 17:21
To: Log4J Users List
Subject: RE: log4j:ERROR Failed to rename [../logs/performance.log] to
[../logs/performance.log.2004-05-04].
When your web-application is recycled or shutdown make sure to call the
o.a.log4j.LogManager.shutdown method.
At 05:46 PM 5/20/2004, you wrote:
>Brilliant. However, for this particular issue it does nothing but tell me >the Java
>process owns it which I suspected ;)
>
>It would appear that log files appear more than once for the 1 java
>process though which could be the problem.
>
>:(
>
>----------------------------------------
>java.exe pid: 1612 NT AUTHORITY\SYSTEM
>
> 8ac: File D:\jakarta-tomcat-5.0.19\logs\publishing.log
> 8c8: File D:\jakarta-tomcat-5.0.19\logs\admin.log
> 8cc: File D:\jakarta-tomcat-5.0.19\logs\email.log
> 8d0: File D:\jakarta-tomcat-5.0.19\logs\holidayform.log
> 8d4: File D:\jakarta-tomcat-5.0.19\logs\performance.log
> 8d8: File D:\jakarta-tomcat-5.0.19\logs\content-access.log
> 8dc: File D:\jakarta-tomcat-5.0.19\logs\rar.log
> 8e0: File D:\jakarta-tomcat-5.0.19\logs\application.log
> 8e4: File D:\jakarta-tomcat-5.0.19\logs\authentication.log
> 8e8: File D:\jakarta-tomcat-5.0.19\logs\search.log
> 8ec: File D:\jakarta-tomcat-5.0.19\logs\search-access.log
> 8f0: File D:\jakarta-tomcat-5.0.19\logs\action.log
> 968: File D:\jakarta-tomcat-5.0.19\logs\publishing.log
> 96c: File D:\jakarta-tomcat-5.0.19\logs\admin.log
> 970: File D:\jakarta-tomcat-5.0.19\logs\email.log
> 974: File D:\jakarta-tomcat-5.0.19\logs\holidayform.log
> 978: File D:\jakarta-tomcat-5.0.19\logs\performance.log
> 97c: File D:\jakarta-tomcat-5.0.19\logs\content-access.log
> 980: File D:\jakarta-tomcat-5.0.19\logs\rar.log
> 984: File D:\jakarta-tomcat-5.0.19\logs\application.log
> 988: File D:\jakarta-tomcat-5.0.19\logs\authentication.log
> 98c: File D:\jakarta-tomcat-5.0.19\logs\search.log
> 990: File D:\jakarta-tomcat-5.0.19\logs\search-access.log
> 994: File D:\jakarta-tomcat-5.0.19\logs\action.log
> e48:
> File D:\jakarta-tomcat-5.0.19\logs\localhost_log.2004-05-20.txt
> ea8: File D:\jakarta-tomcat-5.0.19\webapps\iq\WEB-INF\lib\mail.jar
> ed8: File D:\jakarta-tomcat-5.0.19\logs\authentication.log
> 1024: File D:\jakarta-tomcat-5.0.19\logs\email.log
> 1034: File D:\jakarta-tomcat-5.0.19\logs\application.log
> 103c: File D:\jakarta-tomcat-5.0.19\logs\search.log
> 1050: File D:\jakarta-tomcat-5.0.19\logs\holidayform.log
> 105c: File D:\jakarta-tomcat-5.0.19\logs\action.log
> 1060: File D:\jakarta-tomcat-5.0.19\logs\performance.log
> 106c: File D:\jakarta-tomcat-5.0.19\logs\publishing.log
> 1074: File D:\jakarta-tomcat-5.0.19\logs\content-access.log
> 1088: File D:\jakarta-tomcat-5.0.19\logs\search-access.log
> 108c: File D:\jakarta-tomcat-5.0.19\logs\admin.log
> 1090: File D:\jakarta-tomcat-5.0.19\logs\rar.log
>
>-----Original Message-----
>From: Ferenc Toth [mailto:[EMAIL PROTECTED]
>Sent: 20 May 2004 16:27
>To: Log4J Users List
>Subject: RE: log4j:ERROR Failed to rename [../logs/performance.log] to
>[../logs/performance.log.2004-05-04].
>
>
> > From: Allistair Crossley [mailto:[EMAIL PROTECTED]
> >
> > Hello,
> >
> > Yes we are Windows 2000 (not my fault ;), I would rather
> > Linux) however be impressed that I have convinced the
> > internet ASP team to switch to J2EE.
> >
> > I don't suppose you know of how to look for what process
> > could be holding the files? This is nice and easy in UNIX of
> > course ;) I have tried restarts of Tomcat but the locks are
> > not released, nor can I even think why locks would be on
> > these files .. it happens on all 9 logs.
>
>http://www.sysinternals.com/ntw2k/freeware/handle.shtml
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
><FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
>-------------------------------------------------------
>QAS Ltd.
>Developers of QuickAddress Software
><a href="http://www.qas.com">www.qas.com</a>
>Registered in England: No 2582055
>Registered in Australia: No 082 851 474
>-------------------------------------------------------
></FONT>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
--
Ceki G�lc�
For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]