glassfish
  1. glassfish
  2. GLASSFISH-15805

Log Viewer: stale log file displayed after rotating server.log with SSH node

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1_b40
    • Fix Version/s: 3.1_b41
    • Component/s: logging
    • Labels:
      None

      Description

      Steps to reproduce:

      1. Create a remote SSH node and an instance underneath.
      2. Start the instance.
      3. Launch the Log Viewer from instance's page and note the last record; close it.
      4. Click on Rotate Log button for the instance.
      5. Launch the Log Viewer again and note that the same log file is displayed, with the same records and time stamps. You will see that the rotated log file can also be viewed and is exactly the same. Close the viewer.

      I also tried the following to see if the view would refresh:
      6. Deploy an application to the instance.
      7. Launch the Log Viewer - still the stale entries are displayed for server.log and the new message about deployment is not visible. Even after clicking "next" (Records after ?? button), no new records are displayed.

      Tried the above on two different setups, windows and solaris, with the same results. Restarting server instance did not refresh the view either.

        Activity

        Hide
        sirajg added a comment -

        How bad is its impact? (Severity)
        Moderate

        How often does it happen? (Frequency)
        When viewing log files for a remote instance.

        How much effort is required to fix it? (Cost)
        Minimal

        What is the risk of fixing it? (Risk)
        Minor

        Does a work around for the issue exist? Can the workaround be reasonably employed by the end user?
        No workaround.

        If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes?
        Yes.

        Diffs :

        — src/main/java/org/glassfish/admingui/common/handlers/LogViewHandlers.java (revision 44796)
        +++ src/main/java/org/glassfish/admingui/common/handlers/LogViewHandlers.java (working copy)
        @@ -228,6 +228,7 @@
        notNullStringPut(attMap, "anySearch", anySearch);
        notNullStringPut(attMap, "logLevel", logLevel);
        notNullStringPut(attMap, "instanceName", instanceName);
        + notNullStringPut(attMap, "logFileRefresh", "true");
        if (moduleList != null)

        { attMap.put("listOfModules", moduleList); }

        The above change will make logging backend refresh log file every time. This is not an ideal fix. For 3.2, issue http://java.net/jira/browse/GLASSFISH-15849 has been filed to make logging backend smarter.

        Show
        sirajg added a comment - How bad is its impact? (Severity) Moderate How often does it happen? (Frequency) When viewing log files for a remote instance. How much effort is required to fix it? (Cost) Minimal What is the risk of fixing it? (Risk) Minor Does a work around for the issue exist? Can the workaround be reasonably employed by the end user? No workaround. If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes? Yes. Diffs : — src/main/java/org/glassfish/admingui/common/handlers/LogViewHandlers.java (revision 44796) +++ src/main/java/org/glassfish/admingui/common/handlers/LogViewHandlers.java (working copy) @@ -228,6 +228,7 @@ notNullStringPut(attMap, "anySearch", anySearch); notNullStringPut(attMap, "logLevel", logLevel); notNullStringPut(attMap, "instanceName", instanceName); + notNullStringPut(attMap, "logFileRefresh", "true"); if (moduleList != null) { attMap.put("listOfModules", moduleList); } The above change will make logging backend refresh log file every time. This is not an ideal fix. For 3.2, issue http://java.net/jira/browse/GLASSFISH-15849 has been filed to make logging backend smarter.
        Hide
        Anissa Lam added a comment -

        change looks fine. thanks.

        Show
        Anissa Lam added a comment - change looks fine. thanks.
        Hide
        Chris Kasso added a comment -

        Approved for RC2.

        Show
        Chris Kasso added a comment - Approved for RC2.
        Hide
        sirajg added a comment -

        Revision on branch : 44914
        Revision on trunk : 44916

        Show
        sirajg added a comment - Revision on branch : 44914 Revision on trunk : 44916
        Hide
        lidiam added a comment -

        Verified in promoted build b43.

        Show
        lidiam added a comment - Verified in promoted build b43.

          People

          • Assignee:
            sirajg
            Reporter:
            lidiam
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved: