Univention Bugzilla – Bug 35115
UCC-Setup and UCC-Image UMC modules are not using proxy connection
Last modified: 2014-06-18 07:59:02 CEST
2014061221000375 12.06.14 11:08:17.386 MODULE ( PROCESS ) : Die Ausführung des Kommandos uccsetup/info ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, 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/uccsetup/__init__.py", line 87, in info thinclient_image, desktop_image = util.get_latest_ucc_images() File "/usr/lib/pymodules/python2.6/univention/management/console/modules/uccsetup/util.py", line 359, in get_latest_ucc_images online_images = ucc_images.get_latest_online_ucc_image() File "/usr/lib/pymodules/python2.6/ucc/images.py", line 769, in get_latest_online_ucc_image images = get_online_ucc_images() File "/usr/lib/pymodules/python2.6/ucc/images.py", line 738, in get_online_ucc_images _get_file_size(UCC_IMAGE_INDEX_FILE) # throws a HTTPException if URL does not exist File "/usr/lib/pymodules/python2.6/ucc/images.py", line 202, in _get_file_size connection.request('HEAD', parts.path) File "/usr/lib/python2.6/httplib.py", line 914, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.6/httplib.py", line 951, in _send_request self.endheaders() File "/usr/lib/python2.6/httplib.py", line 908, in endheaders self._send_output() File "/usr/lib/python2.6/httplib.py", line 780, in _send_output self.send(msg) File "/usr/lib/python2.6/httplib.py", line 739, in send self.connect() File "/usr/lib/python2.6/httplib.py", line 720, in connect self.timeout) File "/usr/lib/python2.6/socket.py", line 561, in create_connection raise error, msg error: [Errno 101] Das Netzwerk ist nicht erreichbar wget to the ucc-image-url is possible - the http proxy is corretcly set. If the customer sets an exception in the firewall for direct access to the ucc image download server, then everything works and the images are fetched via proxy connection.
How is the proxy configured? Via a transparent proxy or is it configured in the setings module of the UMC? The image module was successfully tested using a proxy
(In reply to Moritz Muehlenhoff from comment #1) > How is the proxy configured? Via a transparent proxy or is it configured in > the setings module of the UMC? > > The image module was successfully tested using a proxy He configured via ucr (proxy/http) like described in the manual -> <http://docs.univention.de/handbuch-3.2.html#computers:Konfiguration_des_Proxyzugriffs>
Created attachment 5956 [details] Patch for correct proxy handling in _get_file_size() The function _get_file_size() uses httplib which does not handle proxies. I attached a patch which corrects this behaviour by using urrlib2 and registering the proxies in urllib2. (The patch has only been lightly tested, though.)
I tested the patch successfully also with proxy authentication. So it seems to be fine.
Patch has been submitted, package is being built. ucc-image-toolkit (2.0.22-1): * Bug #35115: make sure that proxies are handled correctly when determining a file size via HEAD requests
I could successfully download the thin client image using a transparent proxy. The HEAD requests also show up in the access.log now: 1391037247.050 20 10.200.3.125 TCP_MISS/304 264 GET http://updates.software-univention.de/3.2/maintained/3.2-2/i386/Packages.gz - DIRECT/176.9.114.147 - 1391037247.070 20 10.200.3.125 TCP_MISS/304 263 GET http://updates.software-univention.de/3.2/maintained/component/3.2-2-errata/all/Packages.gz - DIRECT/176.9.114.147 - 1391037247.091 20 10.200.3.125 TCP_MISS/304 264 GET http://updates.software-univention.de/3.2/maintained/component/3.2-2-errata/i386/Packages.gz - DIRECT/176.9.114.147 - 1391037284.122 43 10.200.3.125 TCP_MISS/200 384 HEAD http://ucc-images.software-univention.de/download/ucc-images/image-index.txt - DIRECT/176.9.114.147 text/plain 1391037284.146 21 10.200.3.125 TCP_MISS/200 455 GET http://ucc-images.software-univention.de/download/ucc-images/image-index.txt - DIRECT/176.9.114.147 text/plain 1391037284.167 19 10.200.3.125 TCP_MISS/200 337 HEAD http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-thinclient-image.img.xz.spec - DIRECT/176.9.114.147 - 1391037284.205 36 10.200.3.125 TCP_MISS/200 1081 GET http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-thinclient-image.img.xz.spec - DIRECT/176.9.114.147 - 1391037284.234 21 10.200.3.125 TCP_MISS/200 337 HEAD http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-desktop-image.img.xz.spec - DIRECT/176.9.114.147 - 1391037284.262 25 10.200.3.125 TCP_MISS/200 1063 GET http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-desktop-image.img.xz.spec - DIRECT/176.9.114.147 - 1391037284.290 20 10.200.3.125 TCP_MISS/200 348 HEAD http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-thinclient-image.img.xz - DIRECT/176.9.114.147 - 1391037284.312 20 10.200.3.125 TCP_MISS/200 346 HEAD http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-thinclient-image.img.initrd - DIRECT/176.9.114.147 - 1391037284.335 20 10.200.3.125 TCP_MISS/200 368 HEAD http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-thinclient-image.img.md5 - DIRECT/176.9.114.147 application/x-md5 1391037284.356 19 10.200.3.125 TCP_MISS/200 344 HEAD http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-thinclient-image.img.kernel - DIRECT/176.9.114.147 - 1391037284.379 20 10.200.3.125 TCP_MISS/200 338 HEAD http://ucc-images.software-univention.de/download/ucc-images/95ucc-2.0-thinclient-image.img.inst - DIRECT/176.9.114.147 -
When using the proxy in the non-transparent mode (i.e. by configuring it in the "Basic settings" module, HEAD requests are passed to the proxy as well: n 1391048512.343 48 10.200.3.125 TCP_REFRESH_UNMODIFIED/200 459 GET http://ucc-images.software-univention.de/download/ucc-images/image-index.txt - DIRECT/176.9.114.147 text/plain 1391048512.391 46 10.200.3.125 TCP_REFRESH_UNMODIFIED/200 341 HEAD http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-thinclient-image.img.xz.spec - DIRECT/176.9.114.147 - 1391048512.438 45 10.200.3.125 TCP_REFRESH_UNMODIFIED/200 1085 GET http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-thinclient-image.img.xz.spec - DIRECT/176.9.114.147 - 1391048512.490 45 10.200.3.125 TCP_REFRESH_UNMODIFIED/200 341 HEAD http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-desktop-image.img.xz.spec - DIRECT/176.9.114.147 - 1391048512.537 45 10.200.3.125 TCP_REFRESH_UNMODIFIED/200 1067 GET http://ucc-images.software-univention.de/download/ucc-images/ucc-2.0-desktop-image.img.xz.spec - DIRECT/176.9.114.147 -
The updated version has been released to the App Center (2.0 rev2)