[Pki-devel] [PATCH] 562 Fixed missing port error during installation.

Endi Sukma Dewata edewata at redhat.com
Tue Apr 7 16:19:27 UTC 2015


On 4/7/2015 9:29 AM, Endi Sukma Dewata wrote:
> During installation the server generates an exception in the debug log
> due to a missing port. This exception is considered a normal behavior
> during installation since the port will be supplied at a later step, so
> the code has been changed to display a notification instead of a stack
> trace.

Patch updated to specifically ignore EPropertyNotDefined in pre-op mode.

-- 
Endi S. Dewata
-------------- next part --------------
>From 7654c6f066c9cae633f5a52949d1cad7c2acbbb8 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata at redhat.com>
Date: Tue, 7 Apr 2015 10:11:30 -0400
Subject: [PATCH] Fixed missing port error during installation.

The DBSubsystem has been modified to ignore the EPropertyNotDefined
exception in pre-op mode and only display a notification instead of
a stack trace since it's part of a normal operation. The missing
port will be supplied in a later stage of installation.

https://fedorahosted.org/pki/ticket/1293
---
 .../cmscore/src/com/netscape/cmscore/dbs/DBSubsystem.java   | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/base/server/cmscore/src/com/netscape/cmscore/dbs/DBSubsystem.java b/base/server/cmscore/src/com/netscape/cmscore/dbs/DBSubsystem.java
index 46b83547272874f64ebf5fac3b48c0136a488efd..a6133310c6a935a3de408b7106a1eba4d5e40416 100644
--- a/base/server/cmscore/src/com/netscape/cmscore/dbs/DBSubsystem.java
+++ b/base/server/cmscore/src/com/netscape/cmscore/dbs/DBSubsystem.java
@@ -35,6 +35,7 @@ import netscape.security.x509.CertificateValidity;
 
 import com.netscape.certsrv.apps.CMS;
 import com.netscape.certsrv.base.EBaseException;
+import com.netscape.certsrv.base.EPropertyNotDefined;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.ISubsystem;
 import com.netscape.certsrv.dbs.EDBException;
@@ -648,17 +649,29 @@ public class DBSubsystem implements IDBSubsystem {
 
         try {
             mLdapConnFactory.init(tmpConfig);
+
+        } catch (EPropertyNotDefined e) {
+            if (CMS.isPreOpMode()) {
+                CMS.debug("DBSubsystem: Ignore EPropertyNotDefined during pre-op: " + e);
+                return;
+            }
+
+            CMS.debug(e);
+            throw e;
+
         } catch (ELdapServerDownException e) {
             CMS.debug(e);
             if (CMS.isPreOpMode())
                 return;
             throw new EDBNotAvailException(
                     CMS.getUserMessage("CMS_DBS_INTERNAL_DIR_UNAVAILABLE"));
+
         } catch (ELdapException e) {
             CMS.debug(e);
             if (CMS.isPreOpMode())
                 return;
             throw new EDBException(CMS.getUserMessage("CMS_DBS_INTERNAL_DIR_ERROR", e.toString()));
+
         } catch (EBaseException e) {
             CMS.debug(e);
             if (CMS.isPreOpMode())
-- 
1.9.3



More information about the Pki-devel mailing list