Bug 36794 - Can't contact LDAP server (appcenter ldap.SERVER_DOWN)
Can't contact LDAP server (appcenter ldap.SERVER_DOWN)
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Florian Best
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-18 10:57 CET by Florian Best
Modified: 2015-05-28 16:49 CEST (History)
3 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, External feedback, 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-11-18 10:57:23 CET
Instead of a traceback a user friendly message could be shown.

Die Ausführung des Kommandos appcenter/query ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py", line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 316, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 460, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 282, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py", line 111, in query
    props = application.to_dict(self.package_manager, domainwide_managed, hosts)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/app_center.py", line 918, in to_dict
    ldap_object = self.get_ldap_object()
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/app_center.py", line 1260, in get_ldap_object
    lo, pos = admin_uldap.getMachineConnection()
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 75, in getMachineConnection
    lo=univention.uldap.getMachineConnection(start_tls, decode_ignorelist=decode_ignorelist, ldap_master=ldap_master)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 101, in getMachineConnection
    lo=access(host=ucr['ldap/master'], port=port, base=ucr['ldap/base'], binddn=ucr['ldap/hostdn'], bindpw=bindpw, start_tls=start_tls, decode_ignorelist=decode_ignorelist)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 177, in __init__
    self.__open(ca_certfile)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 215, in __open
    self.lo.start_tls_s()
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 884, in start_tls_s
    res = self._apply_method_s(SimpleLDAPObject.start_tls_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 865, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 839, in reconnect
    raise e
SERVER_DOWN: {'desc': "Can't contact LDAP server"}
Comment 1 Florian Best univentionstaff 2014-12-05 12:51:57 CET
We could move error handling of ldap exceptions into the UMC module error handling so that the SERVER_DOWN message from UDM is shown for every module (UVMM, AppCenter, UDM, ...).
Comment 2 Florian Best univentionstaff 2014-12-15 10:06:17 CET
Another one reported by 4.0-0 errata10 (Walle):
Die Ausführung des Kommandos apps/get ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py",
line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py",
line 316, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py",
line 460, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py",
line 282, in _fake_func
    yield function(self, *args)
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/apps/__init__.py",
line 76, in get
    return application.to_dict(self.package_manager)
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/app_center.py",
line 917, in to_dict
    ldap_object = self.get_ldap_object()
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/app_center.py",
line 1259, in get_ldap_object
    lo, pos = admin_uldap.getMachineConnection()
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 75, in
getMachineConnection
    lo=univention.uldap.getMachineConnection(start_tls,
decode_ignorelist=decode_ignorelist, ldap_master=ldap_master)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 101, in
getMachineConnection
    lo=access(host=ucr['ldap/master'], port=port, base=ucr['ldap/base'],
binddn=ucr['ldap/hostdn'], bindpw=bindpw, start_tls=start_tls,
decode_ignorelist=decode_ignorelist)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 177, in __init__
    self.__open(ca_certfile)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 215, in __open
    self.lo.start_tls_s()
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 884, in start_tls_s
    res = self._apply_method_s(SimpleLDAPObject.start_tls_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 865, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 839, in reconnect
    raise e
SERVER_DOWN: {'desc': "Can't contact LDAP server"}
Comment 3 Florian Best univentionstaff 2015-01-05 10:55:11 CET
Reported again, 4.0-0 errata17 (Walle)
Comment 4 Florian Best univentionstaff 2015-02-23 12:30:16 CET
Reported again, 4.0-1 errata84 (Walle)
Comment 5 Florian Best univentionstaff 2015-04-16 16:42:25 CEST
Reported again, 4.0-1 errata152 (Walle)
Comment 6 Florian Best univentionstaff 2015-04-17 08:46:11 CEST
Die Ausführung des Kommandos appcenter/query ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/modules/__init__.py", line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 316, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 460, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 282, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 107, in query
    hosts = util.get_all_hosts()
  File "%PY2.7%/univention/management/console/modules/appcenter/util.py", line 108, in get_all_hosts
    lo = uldap.getMachineConnection(ldap_master=False)
  File "%PY2.7%/univention/uldap.py", line 110, in getMachineConnection
    raise ldap.SERVER_DOWN, e
SERVER_DOWN: {'desc': "Can't contact LDAP server"}
Comment 7 Florian Best univentionstaff 2015-05-13 12:31:30 CEST
ldap.SERVER_DOWN is implemented in the error_handling function of the UMC server core. It shows the message which is used in UDM, too.

YAML: 2015-05-12-univention-management-console.yaml
Package: univention-management-console
Version: 7.1.63-17.859.201505131137

YAML: 2015-05-12-univention-management-console-module-udm.yaml
Package: univention-management-console-module-udm
Version: 5.1.25-66.574.201505131143
(just import the function in udm from UMC-server if possible). We can drop that block in the future completely.
Comment 8 Florian Best univentionstaff 2015-05-19 15:08:51 CEST
Reported again, 4.0-2 errata193 (Walle)
Comment 9 Florian Best univentionstaff 2015-05-26 09:43:11 CEST
Reported again, 4.0-2 errata194 (Walle)
Comment 10 Florian Best univentionstaff 2015-05-26 09:49:41 CEST
(In reply to Florian Best from comment #9)
> Reported again, 4.0-2 errata194 (Walle)
again
Comment 11 Dirk Wiesenthal univentionstaff 2015-05-26 12:39:04 CEST
Not translated. Additionally, a generic error message like should not make promises about information in log files as they may not exist. Apart from that, works fine.
Comment 12 Florian Best univentionstaff 2015-05-26 12:46:39 CEST
(In reply to Dirk Wiesenthal from comment #11)
> Not translated.
yes, missed to copy the translation. Fixed now.

> Additionally, a generic error message like should not make
> promises about information in log files as they may not exist. Apart from
> that, works fine.
Yes, this was intended for other error messages. It is commented out now and will be reused in the near future.

Package currently builds.
Comment 13 Dirk Wiesenthal univentionstaff 2015-05-27 10:13:38 CEST
OK, works fine
Comment 14 Janek Walkenhorst univentionstaff 2015-05-28 16:47:45 CEST
<http://errata.univention.de/ucs/4.0/198.html>
Comment 15 Janek Walkenhorst univentionstaff 2015-05-28 16:48:32 CEST
<http://errata.univention.de/ucs/4.0/199.html>
Comment 16 Janek Walkenhorst univentionstaff 2015-05-28 16:49:46 CEST
<http://errata.univention.de/ucs/4.0/203.html>