glassfish
  1. glassfish
  2. GLASSFISH-4439

Log rotation + deletion of old logs not working

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 9.1peur1
    • Fix Version/s: None
    • Component/s: logging
    • Labels:
      None
    • 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)


        Activity

        Hide
        jthoennes added a comment -

        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.

        Show
        jthoennes added a comment - 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.
        Hide
        sanandal added a comment -

        "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."

        Show
        sanandal added a comment - "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."
        Hide
        harpreet added a comment -

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

        Show
        harpreet added a comment - This is a non default scenario. Marking it for 9.2.

          People

          • Assignee:
            dpatil
            Reporter:
            hdahl
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: