glassfish
  1. glassfish
  2. GLASSFISH-15808

Log Viewer: cannot delete instance once launched log viewer

    Details

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

      two windows machines with ssh enabled, build promoted b40

      Description

      Steps to reproduce:

      1. Create a remote, SSH node on a windows system, specifying a custom install dir, e.g. C:\as\v31 (probably not necessary).
      2. Create an instance under this node and start it.
      3. Launch Log Viewer for this instance and close it.
      4. Stop intance and attempt to delete it. The following error is displayed:

      Command succeeded with Warning
      Successfully removed instance om2 from the DAS configuration, but failed to remove the instance files from node 42 (jed-asqe-42.us.oracle.com). Command failed on node 42 (jed-asqe-42.us.oracle.com): UTIL6046: Attempt to rename C:\as\v31\glassfish3\glassfish\nodes\42\om2 to C:\as\v31\glassfish3\glassfish\nodes\42\oldinst6160770375853316950.tmp failed after 6 retries Unable to delete the instance directory: C:\as\v31\glassfish3\glassfish\nodes\42\om2 The directory still exists after trying to delete it., whackee=C:\as\v31\glassfish3\glassfish\nodes\42\om2, files in parent:C:\as\v31\glassfish3\glassfish\nodes\42\agent, C:\as\v31\glassfish3\glassfish\nodes\42\om2, , new wackee.exists=true Command _delete-instance-filesystem failed. To complete this operation run the following command locally on host jed-asqe-42.us.oracle.com from the GlassFish install location C:\as\v31\glassfish3: asadmin delete-local-instance --node 42 om2

      1. domain.xml
        27 kB
        lidiam
      2. server.log
        3 kB
        lidiam
      1. logviewer-cannot-delete-instance.JPG
        108 kB
      2. logviewer-files-after-delete.JPG
        56 kB

        Activity

        Hide
        lidiam added a comment -

        If I manually try to delete the instance directory on the remote windows host, I get permission denied error. However, I can delete server.log and then can manually delete the instance directory on the remote machine. If the Log Viewer window remains open, neither the server.log file nor the instance directory can be deleted.

        Also, if I follow the same steps creating node and instance, start it but do not launch Log Viewer, I can delete the instance from Admin Console just fine.

        Show
        lidiam added a comment - If I manually try to delete the instance directory on the remote windows host, I get permission denied error. However, I can delete server.log and then can manually delete the instance directory on the remote machine. If the Log Viewer window remains open, neither the server.log file nor the instance directory can be deleted. Also, if I follow the same steps creating node and instance, start it but do not launch Log Viewer, I can delete the instance from Admin Console just fine.
        Hide
        Anissa Lam added a comment -

        Sounds like file locking issue.
        GUI doesn't open/close any logging file. And you also mentioned that
        " 3. Launch Log Viewer for this instance and close it.
        4. Stop intance and attempt to delete it. The following error is displayed: "
        which again confirm that it is not the log viewer problem.

        Transfer to logging for evaluation.

        If i read this correctly, once you try to view the logs through the log viewer, then you can never able to delete the instance. This sounds more than a P3. upgrade to P2.

        Show
        Anissa Lam added a comment - Sounds like file locking issue. GUI doesn't open/close any logging file. And you also mentioned that " 3. Launch Log Viewer for this instance and close it. 4. Stop intance and attempt to delete it. The following error is displayed: " which again confirm that it is not the log viewer problem. Transfer to logging for evaluation. If i read this correctly, once you try to view the logs through the log viewer, then you can never able to delete the instance. This sounds more than a P3. upgrade to P2.
        Hide
        naman_mehta added a comment -

        How bad is its impact? (Severity)
        Identify why the fix needs to occur now:

        • Introduces an incompatibility
        • Likely to generate a customer support call
        • Significantly impacts the operation of a primary release driver feature
        • An in-your-face issue that will touch the majority of users

        How often does it happen? (Frequency)

        • Regular

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

        • Fix is very minor. But testing required much effort.

        What is the risk of fixing it? (Risk)

        • No Risk. I have not closed connection so need to close the connection for the same. Attached file diff for the same.

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

        • No

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

        • N/A

        How long has the bug existed in the product?

        • It is from initial stage.

        Do regression tests exist for this issue?

        • This issue reproduces with use of GUI only. When Log Viewer opens remote instance log file. So no test is here for the same.

        Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

        • No simple test is available to do the same. Needs two machines. Issue only reproducible on windows machine.
          1. Create a remote, SSH node on a windows system, specifying a custom install dir, e.g. C:\as\v31.
          2. Create an instance under this node and start it.
          3. Launch Log Viewer for this instance and close it.
          4. Stop instance and attempt to delete it.

        When will a tested fix be ready for integration?

        • immediately after approval

        File diff:
        Index: src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java
        ===================================================================
        — src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java (revision 44805)
        +++ src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java (working copy)
        @@ -107,6 +107,8 @@
        }
        out.flush();

        + sftpClient.close();
        +
        return instanceLogFile;

        Show
        naman_mehta added a comment - How bad is its impact? (Severity) Identify why the fix needs to occur now: Introduces an incompatibility Likely to generate a customer support call Significantly impacts the operation of a primary release driver feature An in-your-face issue that will touch the majority of users How often does it happen? (Frequency) Regular How much effort is required to fix it? (Cost) Fix is very minor. But testing required much effort. What is the risk of fixing it? (Risk) No Risk. I have not closed connection so need to close the connection for the same. Attached file diff for the same. Does a work around for the issue exist? Can the workaround be reasonably employed by the end user? No If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes? N/A How long has the bug existed in the product? It is from initial stage. Do regression tests exist for this issue? This issue reproduces with use of GUI only. When Log Viewer opens remote instance log file. So no test is here for the same. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? No simple test is available to do the same. Needs two machines. Issue only reproducible on windows machine. 1. Create a remote, SSH node on a windows system, specifying a custom install dir, e.g. C:\as\v31. 2. Create an instance under this node and start it. 3. Launch Log Viewer for this instance and close it. 4. Stop instance and attempt to delete it. When will a tested fix be ready for integration? immediately after approval File diff: Index: src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java =================================================================== — src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java (revision 44805) +++ src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java (working copy) @@ -107,6 +107,8 @@ } out.flush(); + sftpClient.close(); + return instanceLogFile;
        Hide
        Chris Kasso added a comment -

        Approved for RC2.

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

        Sending logging/src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java
        Transmitting file data .
        Committed revision 44945.

        Show
        naman_mehta added a comment - Sending logging/src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java Transmitting file data . Committed revision 44945.

          People

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

            Dates

            • Due:
              Created:
              Updated:
              Resolved: