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

Endi Sukma Dewata edewata at redhat.com
Tue Apr 7 14:29:39 UTC 2015


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.

https://fedorahosted.org/pki/ticket/1293

-- 
Endi S. Dewata
-------------- next part --------------
From e6bb7a085bcf7c3d8a348edd31f4c4696fb23cf9 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.

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.

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

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..103c62d3e37ba49f5a4446c1723f59645632b485 100644
--- a/base/server/cmscore/src/com/netscape/cmscore/dbs/DBSubsystem.java
+++ b/base/server/cmscore/src/com/netscape/cmscore/dbs/DBSubsystem.java
@@ -648,21 +648,33 @@ public class DBSubsystem implements IDBSubsystem {
 
         try {
             mLdapConnFactory.init(tmpConfig);
+
         } catch (ELdapServerDownException e) {
-            CMS.debug(e);
-            if (CMS.isPreOpMode())
+            if (CMS.isPreOpMode()) {
+                CMS.debug("Ignoring error during pre-op: " + e);
                 return;
+            }
+
+            CMS.debug(e);
             throw new EDBNotAvailException(
                     CMS.getUserMessage("CMS_DBS_INTERNAL_DIR_UNAVAILABLE"));
+
         } catch (ELdapException e) {
-            CMS.debug(e);
-            if (CMS.isPreOpMode())
+            if (CMS.isPreOpMode()) {
+                CMS.debug("Ignoring error during pre-op: " + e);
                 return;
+            }
+
+            CMS.debug(e);
             throw new EDBException(CMS.getUserMessage("CMS_DBS_INTERNAL_DIR_ERROR", e.toString()));
+
         } catch (EBaseException e) {
-            CMS.debug(e);
-            if (CMS.isPreOpMode())
+            if (CMS.isPreOpMode()) {
+                CMS.debug("Ignoring error during pre-op: " + e);
                 return;
+            }
+
+            CMS.debug(e);
             throw e;
         }
 
-- 
1.9.3



More information about the Pki-devel mailing list