glassfish
  1. glassfish
  2. GLASSFISH-12282

domain.xml changes not written to disk (rename problem)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_ms05
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: All

    • Issuezilla Id:
      12,282

      Description

      Occasionally on Windows, the following server.log message is seen:

      [#|2010-06-17T07:04:16.156-
      0700|SEVERE|glassfish3.1|null|_ThreadID=30;_ThreadName=Thread-1;|Could not
      rename C:\files\hudson\workspace\admin-devtests-
      v3.1\glassfishv3\glassfish\domains\domain1\config\domain.xml to
      C:\files\hudson\workspace\admin-devtests-
      v3.1\glassfishv3\glassfish\domains\domain1\config\domain.xml.bak|#]

      This is seen consistently on the hudson job for the admin devtests, if it is run
      on Windows. See http://hudson.sfbay.sun.com/job/admin-devtests-v3.1/

      This log message indicates that the memory copy of the configuration has not
      been written out correctly to the domain.xml. Future operations, such starting
      an instance that was just created will fail because these operations depend on
      the disk copy of the domain.xml being correct.

      This problem appears to be related to the way that the domain.xml is written out
      after a transaction. The domain.xml is saved from a transaction listener that
      is executed in a separate thread from where the changes to the configuration
      were made. This means that it is possible for other operations to continue,
      specifically, other operations that read (and lock) the domain.xml file, while
      the save operation is underway, thereby causing the rename failure.

        Issue Links

          Activity

          Hide
          Tom Mueller added a comment -

          The changes for locking the domain.xml file within the config code have been
          checked in. The next step in this is to make the synchronization logic also lock
          the domain.xml when it is copying it to an instance (a read lock).

          Assigning to Bill to do this.

          Show
          Tom Mueller added a comment - The changes for locking the domain.xml file within the config code have been checked in. The next step in this is to make the synchronization logic also lock the domain.xml when it is copying it to an instance (a read lock). Assigning to Bill to do this.
          Hide
          dochez added a comment -

          took it back for a few hours.
          I decided to change the lock file from the pid file to a "lockfile". Will reassign to Bill once this is checked in.

          Show
          dochez added a comment - took it back for a few hours. I decided to change the lock file from the pid file to a "lockfile". Will reassign to Bill once this is checked in.
          Hide
          dochez added a comment -

          Changed the locked file pid to lockfile. Assigning to Bill so he locks the file in read mode when
          synchronizing. After it will need to be assigned to Byron so the asadmin client does the same.

          Show
          dochez added a comment - Changed the locked file pid to lockfile. Assigning to Bill so he locks the file in read mode when synchronizing. After it will need to be assigned to Byron so the asadmin client does the same.
          Hide
          Bill Shannon added a comment -

          With the new command locking mechanism, it's not necessary to lock the domain.xml
          file during synchronization. Testing shows that this problem is no longer
          occurring.

          Show
          Bill Shannon added a comment - With the new command locking mechanism, it's not necessary to lock the domain.xml file during synchronization. Testing shows that this problem is no longer occurring.
          Hide
          cistox added a comment -

          This is not solved really,
          anyway this error appears on Windows 2008 or similar OS due to low permissions.

          It is not sufficient to be Administrator on Windows 2008, it takes to start Glassfish using the "Run as Administrator" feature and the domain.xml issue desappear.

          Roberto

          Show
          cistox added a comment - This is not solved really, anyway this error appears on Windows 2008 or similar OS due to low permissions. It is not sufficient to be Administrator on Windows 2008, it takes to start Glassfish using the "Run as Administrator" feature and the domain.xml issue desappear. Roberto

            People

            • Assignee:
              Bill Shannon
              Reporter:
              Tom Mueller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: