[GLASSFISH-4439] Log rotation + deletion of old logs not working Created: 17/Mar/08  Updated: 06/Jan/11

Status: Open
Project: glassfish
Component/s: logging
Affects Version/s: 9.1peur1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: hdahl Assignee: dpatil
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows XP
Platform: All


Issuezilla Id: 4,439

 Description   

Seems to be related to GLASSFISH-3905.

Scenario
1. Using option:
<jvm-options>Dcom.sun.enterprise.server.logging.max_history_files=3</jvm
options>
as detailed in: http://forums.java.net/jive/thread.jspa?threadID=33657

2. Using a non-default logging directory:
<domain ... log-root="$

{com.sun.aas.instanceRoot}/../../../../logs">
..
<log-service ...
file="${com.sun.aas.instanceRoot}

/../../../../logs/server.log"

3. At first rotation the log file falls back and is written in:

domains\domain1\logs

with an exception as below.

4. Now three empty logfiles (with date-suffixes) are created in the configured
log-directory but nothing is being written to them.

5. At next rotation the file:

domains\domain1\logs\server.log

is being overwritten.


[#|2008-03-17T15:17:55.509+0100|WARNING|sun-
appserver9.1|javax.enterprise.system.stream.err|_ThreadID=24;_ThreadName=Timer-
6;_RequestID=2b846956-3b97-4bde-8756-704eaeb333c0;|
java.io.FileNotFoundException:
C:\FordEcatNG\runtimes\applicationserver\domains\domain1
\..\..\..\..\logs\server.log (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at
com.sun.enterprise.server.logging.logviewer.backend.LogFile.getLogFileReader
(LogFile.java:281)
at
com.sun.enterprise.server.logging.logviewer.backend.LogFile.buildLogFileIndex
(LogFile.java:156)
at com.sun.enterprise.server.logging.logviewer.backend.LogFile.<init>
(LogFile.java:71)
at com.sun.enterprise.server.logging.FileandSyslogHandler$1.run
(FileandSyslogHandler.java:399)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.server.logging.FileandSyslogHandler.rotate
(FileandSyslogHandler.java:366)
at com.sun.enterprise.server.logging.FileandSyslogHandler.publish
(FileandSyslogHandler.java:505)
at java.util.logging.Logger.log(Unknown Source)
at java.util.logging.Logger.doLog(Unknown Source)
at java.util.logging.Logger.log(Unknown Source)
at
com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask
.run(AutoDeployControllerImpl.java:346)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)

#]

[#|2008-03-17T15:17:55.509+0100|WARNING|sun-
appserver9.1|javax.enterprise.system.stream.err|_ThreadID=24;_ThreadName=Timer-
6;_RequestID=2b846956-3b97-4bde-8756-704eaeb333c0;|
java.lang.NullPointerException
at
com.sun.enterprise.server.logging.logviewer.backend.LogFile.buildLogFileIndex
(LogFile.java:161)
at com.sun.enterprise.server.logging.logviewer.backend.LogFile.<init>
(LogFile.java:71)
at com.sun.enterprise.server.logging.FileandSyslogHandler$1.run
(FileandSyslogHandler.java:399)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.server.logging.FileandSyslogHandler.rotate
(FileandSyslogHandler.java:366)
at com.sun.enterprise.server.logging.FileandSyslogHandler.publish
(FileandSyslogHandler.java:505)
at java.util.logging.Logger.log(Unknown Source)
at java.util.logging.Logger.doLog(Unknown Source)
at java.util.logging.Logger.log(Unknown Source)
at
com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask
.run(AutoDeployControllerImpl.java:346)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)




 Comments   
Comment by harpreet [ 26/Mar/08 ]

This is a non default scenario. Marking it for 9.2.

Comment by sanandal [ 11/Jan/09 ]

"Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1
release whose primary release driver is SailFin.
This issue will be scrubbed after this release and will be given the right
priority for the next release."

Comment by jthoennes [ 22/Jun/09 ]

Will this be fixed for Glassfish v2.1.1? We use a non-standard log location
since we want to place all application logs into one location.

Generated at Sat Aug 29 09:02:05 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.