From 42cada4594ee34d570f90385d5994fea1e4741b4 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Jun 10 2008 02:13:54 +0000 Subject: When an LDAP connection fails, display the host one is trying to connect to. 450111 --- diff --git a/ipa-server/ipaserver/krbinstance.py b/ipa-server/ipaserver/krbinstance.py index 7ad03e1..deea4a6 100644 --- a/ipa-server/ipaserver/krbinstance.py +++ b/ipa-server/ipaserver/krbinstance.py @@ -110,8 +110,8 @@ class KrbInstance(service.Service): try: self.conn = ipaldap.IPAdmin(self.fqdn) self.conn.do_simple_bind(bindpw=self.admin_password) - except ipaerror.exception_for(ipaerror.LDAP_DATABASE_ERROR), e: - logging.critical("Could not connect to DS") + except Exception, e: + logging.critical("Could not connect to the Directory Server on %s" % self.fqdn) raise e self.backup_state("running", self.is_running()) @@ -245,6 +245,8 @@ class KrbInstance(service.Service): #except LDAPError, e: # logging.critical("Error during SASL mapping removal: %s" % str(e)) except Exception, e: + logging.critical("Could not connect to the Directory Server on %s" % self.fqdn) + raise e print type(e) print dir(e) raise e