Bug 44477 - MemcachedError in Self-Service not handled
MemcachedError in Self-Service not handled
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Self Service
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-0-errata
Assigned To: Daniel Tröder
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-27 12:14 CEST by Florian Best
Modified: 2017-11-15 17:27 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.343
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017042221000336, 2017051221000479
Bug group (optional): External feedback
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 2017-04-27 12:14:58 CEST
Version: 4.2-0 errata0 (Lesum)

Execution of command 'passwordreset/get_contact' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 249, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/passwordreset/__init__.py", line 83, in _decorator
    return func(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/passwordreset/__init__.py", line 130, in _decorated
    total_limit_reached, total_max_wait = _check_limits(self.memcache, self.total_limits)
  File "%PY2.7%/univention/management/console/modules/passwordreset/__init__.py", line 112, in _check_limits
    count = memcache.incr(key)
MemcachedError: 1 keys failed
Comment 1 Daniel Tröder univentionstaff 2017-04-28 11:40:16 CEST
Need to know on what server role this was installed on and have the
installation/updater and the join log.

Very likely this was from a pre-release test installation.
Comment 2 Florian Best univentionstaff 2017-04-28 12:00:49 CEST
Role: domaincontroller_master

(In reply to Daniel Tröder from comment #1)
> Very likely this was from a pre-release test installation.
No, it was reported yesterday.
Comment 3 Daniel Tröder univentionstaff 2017-04-28 12:11:11 CEST
The NotFound exception is catched.
I had this error only in the situation where the self-service memcache instance wasn't running - it was actually a connection error.
That was fixed by r78602 on 2017-04-03 in univention-self-service (2.0.16-2).
Comment 4 Tobias Birkefeld univentionstaff 2017-05-12 16:08:59 CEST
Same error here at two different setups.

First setup:
UCS: 4.2-0 errata15
App Center compatibility: 4
Installed: nagios=3.5 radius=4.0 self-service=2.0 ucsschool=4.2 v1


Second setup:
UCS: 4.2-0 errata10
App Center compatibility: 4
Installed: mailserver=11 self-service=2.0

Both systems are fresh installed with UCS 4.2. No special configuration. Installed self-service in UMC app center.

Access to both system for debug is available.
Comment 6 Daniel Tröder univentionstaff 2017-05-16 11:44:41 CEST
Thanks for the test system. The memcached service was indeed not running.

r79360: fix memcached command line
r79362: advisory

Package: univention-self-service
Version: 2.0.16-5A~4.2.0.201705161137
Branch: ucs_4.2-0
Scope: errata4.2-0
Comment 7 Florian Best univentionstaff 2017-05-16 11:52:12 CEST
memcached should not run as root! Please use the memcached user instead.
http://dustin.sallings.org/2010/08/08/memcached-security.html#please-please-do-not-run-as-root
Comment 8 Daniel Tröder univentionstaff 2017-05-16 12:13:25 CEST
r79363: start correct memcached instance, use self-service-umc user for memcache instance
r79364: update advisory

univention-self-service 2.0.16-6A~4.2.0.201705161209
Comment 9 Florian Best univentionstaff 2017-05-16 18:26:59 CEST
OK: upgrading works very good!
REOPEN: The exception catching is not working:

>>> pylibmc.ConnectionError.mro()
[<class '_pylibmc.ConnectionError'>, <class '_pylibmc.MemcachedError'>, <type 'exceptions.Exception'>, <type 'exceptions.BaseException'>, <type 'object'>]
>>> pylibmc.Error.mro()
[<class '_pylibmc.MemcachedError'>, <type 'exceptions.Exception'>, <type 'exceptions.BaseException'>, <type 'object'>]

I still get the following traceback:
Die Ausführung des Kommandos passwordreset/get_contact ist fehlgeschlagen:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 249, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 83, in _decorator
    return func(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 133, in _decorated
    total_limit_reached, total_max_wait = _check_limits(self.memcache, self.total_limits)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 112, in _check_limits
    count = memcache.incr(key)
ConnectionError: 1 keys failed
Comment 10 Florian Best univentionstaff 2017-05-16 18:28:50 CEST
Ah you don't mask the error but only log something. The logging is not necessary as the traceback is logged which contains all the infos.
Comment 11 Daniel Tröder univentionstaff 2017-05-17 12:03:35 CEST
I was certain I once had coaxed more information from libmemcache, but I cannot reproduce it. I probably confused it with a postgres error.

r79390: remove unnecessary logging
r79391: update advisory
-> 2.0.16-7A~4.2.0.201705171158
Comment 12 Florian Best univentionstaff 2017-05-17 14:41:32 CEST
OK: error handling
OK: YAML
Comment 13 Janek Walkenhorst univentionstaff 2017-05-24 10:48:01 CEST
<http://errata.software-univention.de/ucs/4.2/25.html>