Bug 35678 - tracebacks when appcenter server is unreachable / no internet connection
tracebacks when appcenter server is unreachable / no internet connection
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Florian Best
Dirk Wiesenthal
:
: 36712 38384 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-21 12:19 CEST by Florian Best
Modified: 2016-07-04 15:16 CEST (History)
5 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):
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-08-21 12:19:18 CEST
trying to uninstall a app:
Die Ausführung des Kommandos appcenter/invoke_dry_run ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 218, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/__init__.py", line 159, in invoke_dry_run
    self.invoke(request)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 178, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/__init__.py", line 211, in invoke
    forbidden, warnings = application.check_invokation(function, self.package_manager)
AttributeError: 'NoneType' object has no attribute 'check_invokation'

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

buying an app:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 218, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 305, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 432, in _response
    for res in function(self, iterator, *nones):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 271, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/__init__.py", line 304, in buy
    application = Application.find(application)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/app_center.py", line 522, in find
    for application in cls.all():
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/app_center.py", line 726, in all
    cls._get_category_translations(fake=not localize)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/app_center.py", line 536, in _get_category_translations
    fp = urlopen(url)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/util.py", line 126, in urlopen
    return urllib2.urlopen(request, timeout=60)
  File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 1192, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.6/urllib2.py", line 1159, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno -2] Der Name oder der Dienst ist nicht bekannt>

app search:
Uncaught TypeError: Cannot read property 'query' of undefined dojo.js:2
_11b2._renderQuery dojo.js:2
_11b2._setQuery dojo.js:2
_11cb.set dojo.js:2
declare._setAppQueryAttr AppCenterPage.js:243
_7df.set dojo.js:2
declare.filterApplications AppCenterPage.js:239
(anonymous function) dojo.js:2
_3d9.(anonymous function)._3de dojo.js:2
(anonymous function) dojo.js:2
(anonymous function) dojo.js:2
(anonymous function)
Comment 1 Stefan Gohmann univentionstaff 2015-01-29 14:26:09 CET
Another example: Ticket #2014120421000333

We should give hints what to do.
Comment 2 Dirk Wiesenthal univentionstaff 2015-04-08 10:52:06 CEST
Should be fixed with Bug#35175. Have a look at the first traceback, though.
Comment 3 Dirk Wiesenthal univentionstaff 2015-04-08 10:58:57 CEST
(In reply to Dirk Wiesenthal from comment #2)
> Should be fixed with Bug#35175. Have a look at the first traceback, though.

I meant Bug#35614. It is another method, but the explanations can be reused
Comment 4 Florian Best univentionstaff 2015-05-13 15:41:06 CEST
Die Ausf\u00fchrung des Kommandos appcenter/get ist fehlgeschlagen:
Another traceback:

Traceback (most recent call last):
  File &quot;/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py&quot;, line 207, in _decorated
    return function(self, request, *args, **kwargs)
  File &quot;/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py&quot;, line 81, in _decorated
    return func(self, request, *a, **kwargs)
  File &quot;/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py&quot;, line 188, in _response
    return function(self, request)
  File &quot;/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py&quot;, line 316, in _response
    result = _multi_response(self, request)
  File &quot;/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py&quot;, line 460, in _response
    return list(function(self, iterator, *nones))
  File &quot;/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py&quot;, line 282, in _fake_func
    yield function(self, *args)
  File &quot;/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py&quot;, line 203, in get
    raise umcm.UMC_CommandError(_('Could not find an application for %s') % (application,))
AttributeError: 'NoneType' object has no attribute 'to_dict'
Comment 5 Florian Best univentionstaff 2015-05-13 15:42:16 CEST
curl 'http://10.200.27.70/umcp/command/appcenter/get' -H 'Content-Type: application/json' -H 'Cookie: UMCSessionId=XXX' --data-binary '{"options":{"application":"auralis"}}' --compressed | python -m json.tool
Comment 6 Florian Best univentionstaff 2015-05-13 16:33:56 CEST
(In reply to Florian Best from comment #0)
> trying to uninstall a app:
> Die Ausführung des Kommandos appcenter/invoke_dry_run ist fehlgeschlagen:
> 
> Traceback (most recent call last):
>   File
> "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.
> py", line 218, in execute
>     func( request )
>   File
> "/usr/lib/pymodules/python2.6/univention/management/console/modules/
> appcenter/__init__.py", line 159, in invoke_dry_run
>     self.invoke(request)
>   File
> "/usr/lib/pymodules/python2.6/univention/management/console/modules/
> decorators.py", line 178, in _response
>     return function(self, request)
>   File
> "/usr/lib/pymodules/python2.6/univention/management/console/modules/
> appcenter/__init__.py", line 211, in invoke
>     forbidden, warnings = application.check_invokation(function,
> self.package_manager)
> AttributeError: 'NoneType' object has no attribute 'check_invokation'
> 
> Die Ausführung des Kommandos appcenter/buy ist fehlgeschlagen:
→ This has already been fixed by Dirk somewhen.
Comment 7 Florian Best univentionstaff 2015-05-13 16:57:17 CEST
(In reply to Stefan Gohmann from comment #1)
> Another example: Ticket #2014120421000333
> 
> We should give hints what to do.
TODO?: Currently the messages are better but do not include information about firewalls. → I would move this to another bug.

All of the tracebacks have been fixed (and a lot more possible errors) by a generic error handling function.

YAML: 2015-05-12-univention-management-console-module-appcenter.yaml
Package: univention-management-console-module-appcenter
Version: 4.1.20-29.356.201505131635
Comment 8 Florian Best univentionstaff 2015-05-19 15:44:55 CEST
(In reply to Stefan Gohmann from comment #1)
> Another example: Ticket #2014120421000333
> 
> We should give hints what to do.
The ticket does not really fit into this bug, nevertheless I will adjust this in another Bug. The abstract of the ticket is:
apt couldn't authenticate some packages which was caused by a proxy (which is part of a firewall)

A message how to resolve this issue should be added in case the backend reports broken packages. (It could simply be added in the javascript frontend).
Comment 9 Florian Best univentionstaff 2015-05-19 16:18:56 CEST
*** Bug 38384 has been marked as a duplicate of this bug. ***
Comment 10 Dirk Wiesenthal univentionstaff 2015-05-26 13:32:12 CEST
YAML: OK
Code: OK
Comment 11 Janek Walkenhorst univentionstaff 2015-05-28 16:49:51 CEST
<http://errata.univention.de/ucs/4.0/203.html>
Comment 12 Dirk Wiesenthal univentionstaff 2015-06-03 00:20:36 CEST
*** Bug 36712 has been marked as a duplicate of this bug. ***
Comment 13 Florian Best univentionstaff 2016-07-04 15:16:51 CEST
Version: 4.0-1 errata81 (Walle)

Execution of command 'appcenter/invoke_dry_run' has failed:

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/appcenter/__init__.py", line 180, in invoke_dry_run
    self.invoke(request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 188, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 206, in invoke
    application = Application.find(application_id)
  File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 524, in find
    for application in cls.all():
  File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 745, in all
    cls._get_category_translations(fake=not localize)
  File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 538, in _get_category_translations
    fp = urlopen(url)
  File "%PY2.7%/univention/management/console/modules/appcenter/util.py", line 142, in urlopen
    return urllib2.urlopen(request, timeout=60)
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 401, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 419, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1219, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1181, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>