DCOR-dev / DCOR-Aid

GUI for managing data on DCOR
https://dcor.mpl.mpg.de
GNU General Public License v3.0
1 stars 2 forks source link

handle ConnectionRefused errors on startup #34

Closed paulmueller closed 3 years ago

paulmueller commented 3 years ago
Unhandled exception in DCOR-Aid version 0.7.0:
Traceback (most recent call last):
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
    raise err
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fbf81061700>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='dcor-dev.mpl.mpg.de', port=443): Max retries exceeded with url: /api/3/action/package_show?id=05c2f825-2482-4f9b-b8a5-456a41e44157 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fbf81061700>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/paul/repos/DCOR-Aid/dcoraid/__main__.py", line 58, in <module>
    main()
  File "/home/paul/repos/DCOR-Aid/dcoraid/__main__.py", line 49, in main
    window = DCORAid()
  File "/home/paul/repos/DCOR-Aid/dcoraid/gui/main.py", line 72, in __init__
    uic.loadUi(path_ui, self)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/__init__.py", line 238, in loadUi
    return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/Loader/loader.py", line 66, in loadUi
    return self.parse(filename, resource_suffix)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 1037, in parse
    actor(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 828, in createUserInterface
    self.traverseWidgetTree(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 273, in createWidget
    self.traverseWidgetTree(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 503, in createLayout
    self.traverseWidgetTree(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 546, in handleItem
    self.traverseWidgetTree(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 273, in createWidget
    self.traverseWidgetTree(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 273, in createWidget
    self.traverseWidgetTree(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 503, in createLayout
    self.traverseWidgetTree(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 546, in handleItem
    self.traverseWidgetTree(elem)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree
    handler(self, child)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 264, in createWidget
    self.stack.push(self.setupObject(widget_class, parent, elem))
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/uiparser.py", line 228, in setupObject
    obj = self.factory.createQObject(clsname, name, args, is_attribute)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/objcreator.py", line 118, in createQObject
    return self._cpolicy.instantiate(factory, *args, **kwargs)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/PyQt5/uic/Loader/qobjectcreator.py", line 137, in instantiate
    return clsObject(*ctor_args)
  File "/home/paul/repos/DCOR-Aid/dcoraid/gui/upload/widget_upload.py", line 55, in __init__
    self.jobs = UploadQueue(api=get_ckan_api(),
  File "/home/paul/repos/DCOR-Aid/dcoraid/upload/queue.py", line 115, in __init__
    uj = self.jobs_eternal.summon_job(dataset_id,
  File "/home/paul/repos/DCOR-Aid/dcoraid/upload/queue.py", line 83, in summon_job
    upload_job = load_task(path=pin, api=api, cache_dir=cache_dir)
  File "/home/paul/repos/DCOR-Aid/dcoraid/upload/task.py", line 250, in load_task
    uj = UploadJob.from_upload_job_state(uj_state, api=api,
  File "/home/paul/repos/DCOR-Aid/dcoraid/upload/job.py", line 135, in from_upload_job_state
    return UploadJob(api=api, cache_dir=cache_dir, **uj_state)
  File "/home/paul/repos/DCOR-Aid/dcoraid/upload/job.py", line 66, in __init__
    self.api.get("package_show", id=self.dataset_id)
  File "/home/paul/repos/DCOR-Aid/dcoraid/api/ckan_api.py", line 118, in get
    req = requests.get(url_call,
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/home/paul/repos/DCOR-Aid/.env/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='dcor-dev.mpl.mpg.de', port=443): Max retries exceeded with url: /api/3/action/package_show?id=05c2f825-2482-4f9b-b8a5-456a41e44157 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fbf81061700>: Failed to establish a new connection: [Errno 111] Connection refused'))