Bug 34244 - display error message instead of traceback when connection to LDAP server fails
display error message instead of traceback when connection to LDAP server fails
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2-2-errata
Assigned To: Florian Best
Dirk Wiesenthal
:
: 34995 (view as bug list)
Depends on:
Blocks: 35719
  Show dependency treegraph
 
Reported: 2014-03-04 13:28 CET by Florian Best
Modified: 2014-08-27 10:46 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-03-04 13:28:28 CET
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"}
Comment 1 Dirk Wiesenthal univentionstaff 2014-04-29 11:06:39 CEST
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"}
Comment 2 Florian Best univentionstaff 2014-07-09 09:03:37 CEST
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?)
Comment 3 Dirk Wiesenthal univentionstaff 2014-07-09 15:21:21 CEST
(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
Comment 4 Florian Best univentionstaff 2014-07-10 12:05:19 CEST
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.
Comment 5 Dirk Wiesenthal univentionstaff 2014-07-11 14:49:00 CEST
Error message isa bit plain, but Okay
YAML: Ok
Comment 6 Florian Best univentionstaff 2014-07-14 09:55:16 CEST
*** Bug 34995 has been marked as a duplicate of this bug. ***
Comment 7 Janek Walkenhorst univentionstaff 2014-08-07 17:42:36 CEST
http://errata.univention.de/ucs/3.2/159.html
Comment 8 Janek Walkenhorst univentionstaff 2014-08-07 17:47:17 CEST
http://errata.univention.de/ucs/3.2/169.html
Comment 9 Florian Best univentionstaff 2014-08-18 13:24:25 CEST
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.