Oct 26 14:09:31 uffizi python3[16259]: [2016-10-26 14:09:31,108: ERROR/MainProcess] Task swh.loader.git.tasks.ReaderGitRepository[a9df82ad-802f-4271-8c49-73d8ed4e4746] raised unexpected: UnboundLocalError("local variable 'err' referenced before assignment",) Oct 26 14:09:31 uffizi python3[16259]: Traceback (most recent call last): Oct 26 14:09:31 uffizi python3[16259]: File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 240, in trace_task Oct 26 14:09:31 uffizi python3[16259]: R = retval = fun(*args, **kwargs) Oct 26 14:09:31 uffizi python3[16259]: File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 437, in __protected_call__ Oct 26 14:09:31 uffizi python3[16259]: return self.run(*args, **kwargs) Oct 26 14:09:31 uffizi python3[16259]: File "/usr/lib/python3/dist-packages/swh/loader/git/tasks.py", line 53, in run Oct 26 14:09:31 uffizi python3[16259]: return loader.load(repo_url) Oct 26 14:09:31 uffizi python3[16259]: File "/usr/lib/python3/dist-packages/swh/loader/git/reader.py", line 157, in load Oct 26 14:09:31 uffizi python3[16259]: self.fetch_data() Oct 26 14:09:31 uffizi python3[16259]: File "/usr/lib/python3/dist-packages/swh/loader/git/updater.py", line 303, in fetch_data Oct 26 14:09:31 uffizi python3[16259]: do_progress) Oct 26 14:09:31 uffizi python3[16259]: File "/usr/lib/python3/dist-packages/swh/loader/git/updater.py", line 232, in fetch_pack_from_origin Oct 26 14:09:31 uffizi python3[16259]: progress=do_activity) Oct 26 14:09:31 uffizi python3[16259]: File "/usr/lib/python3/dist-packages/dulwich/client.py", line 555, in fetch_pack Oct 26 14:09:31 uffizi python3[16259]: proto, can_read = self._connect(b'upload-pack', path) Oct 26 14:09:31 uffizi python3[16259]: File "/usr/lib/python3/dist-packages/dulwich/client.py", line 643, in _connect Oct 26 14:09:31 uffizi python3[16259]: raise err Oct 26 14:09:31 uffizi python3[16259]: UnboundLocalError: local variable 'err' referenced before assignment The message is not so clear but the code references (dulwich/client.py around line 643): ``` err = socket.error("no address found for %s" % self._host) for (family, socktype, proto, canonname, sockaddr) in sockaddrs: s = socket.socket(family, socktype, proto) s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) try: s.connect(sockaddr) break except socket.error as err: if s is not None: s.close() s = None if s is None: raise err ``` So when trying to raise the 'err' variable, it's when s is None and s is None when the socket opening somehow fails. I don't grok why err is not defined since it is (maybe the try except which overrides it). So it must be environment related (firewall or something). Will try in another worker. Issues: https://github.com/jelmer/dulwich/issues/459 PR: https://github.com/jelmer/dulwich/issues/460 Well, an issue in dulwich was making unclear the reason. Fixing the code in dulwich, made the error clear. github.com was not resolved in uffizi (it is now).