mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

abobrov
23.21.2009 04a4b61b1604dc2f8bec5887327cd1b6a47ccf70
- [Issue 4060]  server.pid missing after stop / start sequence : make sure the server lock file stays locked til JVM exit to prevent another server process from starting while the current server process is still shutting down. in-core restarts should always have the server lock file locked due to the same JVM instance/process the lock originally belongs to still being their JVM instance/process on restart.
2 files modified
30 ■■■■■ changed files
opends/src/messages/messages/core.properties 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/DirectoryServer.java 26 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/core.properties
@@ -715,10 +715,6 @@
FATAL_ERR_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK_343=The Directory Server could \
 not acquire an exclusive lock on file %s:  %s.  This generally means that \
 another instance of this server is already running
SEVERE_WARN_CANNOT_RELEASE_EXCLUSIVE_SERVER_LOCK_344=An error occurred while \
 attempting to release the exclusive server lock held on file %s:  %s.  This \
 lock should be automatically cleaned when the Directory Server process exits, \
 so no additional action should be necessary
INFO_ERROR_CATEGORY_TASK_345=task
MILD_ERR_MODIFY_ATTR_IS_NO_USER_MOD_346=Entry %s cannot be modified because \
 the modification attempted to update attribute %s which is defined as \
opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -8314,8 +8314,6 @@
            logError(message);
            // FIXME -- Do we need to send an admin alert?
          }
          serverLocked = false;
        }
        catch (Exception e2)
        {
@@ -8346,30 +8344,6 @@
      ec.finalizeEntryCache();
    }
    // Release the exclusive lock for the Directory Server process.
    String lockFile = LockFileManager.getServerLockFileName();
    try
    {
      StringBuilder failureReason = new StringBuilder();
      if (! LockFileManager.releaseLock(lockFile, failureReason))
      {
        message = WARN_CANNOT_RELEASE_EXCLUSIVE_SERVER_LOCK.get(
            lockFile, String.valueOf(failureReason));
        logError(message);
      }
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      message = WARN_CANNOT_RELEASE_EXCLUSIVE_SERVER_LOCK.get(
          lockFile, stackTraceToSingleLineString(e));
      logError(message);
    }
    // Deregister all workflows.
    WorkflowImpl.deregisterAllOnShutdown();