Univention Bugzilla – Bug 34244
display error message instead of traceback when connection to LDAP server fails
Last modified: 2014-08-27 10:46:13 CEST
We received multiple tracebacks that the LDAP Server can not be contacted. Instead of a traceback a meaningful message should be shown. The exception could be catched in the module loading of UMC. LDAP_ConnectionError: Opening LDAP connection failed: {'desc': "Can't contact LDAP server"}
Received again: Traceback: The init function of the module has failed: LDAP_ConnectionError: Opening LDAP connection failed: {'desc': "Can't contact LDAP server"} Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/modserver.py", line 228, in handle self.__handler.init() File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 85, in init self.settings = UDM_Settings() File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 842, in __init__ self.read() File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 845, in read self._read_directories() File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 150, in wrapper_func raise LDAP_ConnectionError( 'Opening LDAP connection failed: %s' % str( e ) ) LDAP_ConnectionError: Opening LDAP connection failed: {'desc': "Can't contact LDAP server"}
What do you think about this error message: The LDAP-Server is currently not reachable. To solve this problem please make sure the domaincontroller master is online and restart the LDAP service (slapd). If the problem persists make sure all software updates are installed. Hints about the cause can also be found in the following log files: * /var/log/univention/management-console-module-udm.log * /var/log/…(where are slapd logfiles?)
(In reply to Florian Best from comment #2) > What do you think about this error message: > > The LDAP-Server is currently not reachable. Maybe "Cannot connect to LDAP-Service"? see below > To solve this problem please make sure the domaincontroller master is online > and restart the LDAP service (slapd). "domaincontroller master is online" -> UMC-UDM is only installed on DC Master and DC Backup. Good chances that this error message came from the DC Master which is also "the LDAP server" -> We need another message for the master "restart the LDAP service (slapd)" -> How? Note: Doing this in UMC-module may not show the hints needed to solve the situation. We could point to the module and show the command > If the problem persists make sure all software updates are installed. ucr get update/available -> Only show hint (but a bit "harsher") in this case > Hints about the cause can also be found in the following log files: > * /var/log/univention/management-console-module-udm.log > * /var/log/…(where are slapd logfiles?) slapd logs to /var/log/syslog. But not here: ucr get ldap/debug/level # => 0
The adapted error message has been implemented depending on the UCR variables. univention-management-console-module-udm (4.0.97-31) I tested the error message for methods which are executed in a thread and the ones which aren't. UMC doesn't provide an error handling for errors which occur in threads so the module specific handling was adapted.
Error message isa bit plain, but Okay YAML: Ok
*** Bug 34995 has been marked as a duplicate of this bug. ***
http://errata.univention.de/ucs/3.2/159.html
http://errata.univention.de/ucs/3.2/169.html
We received also the following remark: der Fehler tritt auf, wenn das Dateisystem voll ist (zu viele Logdateien). Man kann sich dann nicht mehr bei der UMC anmelden, da der Fehler unten auftritt.