Bug 38730 - appcenter init fails: [Errno 104] Connection reset by peer
appcenter init fails: [Errno 104] Connection reset by peer
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.0-x
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-19 11:10 CEST by Florian Best
Modified: 2019-01-03 07:23 CET (History)
1 user (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: 2016102621000061
Bug group (optional): Error handling, 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 2015-06-19 11:10:37 CEST
We received the following traceback, 4.0-2 errata193 (Walle).
It occurs when opening the appcenter. The univention-updater makes a HTTP request to our repository but the socket connection is not accepted by the repository server.

We should handle socket.error in the updater.

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/protocol/modserver.py", line 266, in handle
    self.__handler.init()
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 89, in init
    self.uu = UniventionUpdater(False)
  File "%PY2.7%/univention/updater/tools.py", line 571, in __init__
    self.ucr_reinit()
  File "%PY2.7%/univention/updater/tools.py", line 633, in ucr_reinit
    assert self.server.access('/univention-repository/')
  File "%PY2.7%/univention/updater/tools.py", line 443, in access
    res = UCSHttpServer.opener.open(req, timeout=self.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 1211, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1034, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline()
  File "/usr/lib/python2.7/socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2015-06-19 11:32:25 CEST
(In reply to Florian Best from comment #0)
> We received the following traceback, 4.0-2 errata193 (Walle).
> It occurs when opening the appcenter. The univention-updater makes a HTTP
> request to our repository but the socket connection is not accepted by the
> repository server.

The TCP connection has been established successfully. Later on, the appcenter receives a TCP RST (reset) package ("Connection reset by peer") and the TCP connection is terminated.

There may be several reasons for this. Some of them are described in Bug 36044.

Possible reason in this case: 
a TCP keep alive package has been sent to the repo server, but the repo server already dropped the TCP connection before and answered with a RST package. This may be caused by temporary routing issues.
Comment 2 Florian Best univentionstaff 2015-07-20 09:50:20 CEST
Reported again, 4.0-2 errata240 (Walle)
Comment 3 Florian Best univentionstaff 2015-07-20 09:52:10 CEST
(In reply to Florian Best from comment #2)
> Reported again, 4.0-2 errata240 (Walle)
Twice from different UUID's.
Comment 4 Florian Best univentionstaff 2016-10-28 12:11:36 CEST
Reported again, 4.1-3 errata293 (Vahr)

Execution of command 'appcenter/query' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 283, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 182, in query
    self.update_applications()
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 196, in update_applications
    update.call_safe()
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 175, in call_safe
    return cls.call(**kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 183, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 189, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/update.py", line 77, in main
    self._download_supra_files()
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 65, in _func
    return func(*args, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/update.py", line 149, in _download_supra_files
    _download_supra_file('categories.ini', version_specific=False)
  File "%PY2.7%/univention/appcenter/actions/update.py", line 133, in _download_supra_file
    response = urlopen(request)
  File "%PY2.7%/univention/appcenter/utils.py", line 250, 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 "%PY2.7%/univention/appcenter/utils.py", line 237, in https_open
    return self.do_open(HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1072, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 408, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 366, in _read_status
    line = self.fp.readline()
  File "/usr/lib/python2.7/socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
  File "/usr/lib/python2.7/ssl.py", line 241, in recv
    return self.read(buflen)
  File "/usr/lib/python2.7/ssl.py", line 160, in read
    return self._sslobj.read(len)
error: [Errno 104] Connection reset by peer
Comment 5 Stefan Gohmann univentionstaff 2019-01-03 07:23:37 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.