Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle timeout for connecting to REMS doi #18

Closed
blankdots opened this issue Sep 29, 2021 · 2 comments
Closed

handle timeout for connecting to REMS doi #18

blankdots opened this issue Sep 29, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@blankdots
Copy link
Contributor

[2021-09-29 09:42:09][sda_orchestrator][7 MainProcess][ERROR   ] (L:72) _process_datasetID: Could not process datasetID because of: .

2021-09-29 09:42:09,600 DEBG 'complete_consumer' stdout output:
[2021-09-29 09:42:09][sda_orchestrator][7 MainProcess][ERROR   ] (L:42) handle_message: Error occurred in complete consumer: .

2021-09-29 09:42:09,671 DEBG 'complete_consumer' stdout output:
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/httpx/_exceptions.py", line 326, in map_exceptions
    yield
  File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 1497, in _send_single_request
    ext={"timeout": timeout.as_dict()},
  File "/usr/local/lib/python3.7/site-packages/httpx/_transports/default.py", line 170, in arequest
    method, url, headers=headers, stream=stream, ext=ext
  File "/usr/local/lib/python3.7/site-packages/httpcore/_async/connection_pool.py", line 219, in arequest
    method, url, headers=headers, stream=stream, ext=ext
  File "/usr/local/lib/python3.7/site-packages/httpcore/_async/connection.py", line 106, in arequest
    return await self.connection.arequest(method, url, headers, stream, ext)
  File "/usr/local/lib/python3.7/site-packages/httpcore/_async/http11.py", line 72, in arequest
    ) = await self._receive_response(timeout)
  File "/usr/local/lib/python3.7/site-packages/httpcore/_async/http11.py", line 133, in _receive_response
    event = await self._receive_event(timeout)
  File "/usr/local/lib/python3.7/site-packages/httpcore/_async/http11.py", line 172, in _receive_event
    data = await self.socket.read(self.READ_NUM_BYTES, timeout)
  File "/usr/local/lib/python3.7/site-packages/httpcore/_backends/asyncio.py", line 157, in read
    raise
  File "/usr/local/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.7/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
    raise to_exc(exc) from None
httpcore.ReadTimeout

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/utils/consumer.py", line 146, in __call__
    self.handle_message(message)
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/complete_consume.py", line 34, in handle_message
    datasetID = asyncio.run(self._process_datasetID(complete_msg["user"], complete_msg["filepath"]))
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/complete_consume.py", line 62, in _process_datasetID
    await rems.register_resource(doi_obj["dataset"])
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/utils/rems_ops.py", line 72, in register_resource
    await self._catalogue_item(form_id, resource_id, workflow_id, doi)
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/utils/rems_ops.py", line 250, in _catalogue_item
    headers=self.headers,
  File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 1547, in get
    timeout=timeout,
  File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 1362, in request
    request, auth=auth, allow_redirects=allow_redirects, timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 1401, in send
    history=[],
  File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 1438, in _send_handling_auth
    history=history,
  File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 1466, in _send_handling_redirects
    response = await self._send_single_request(request, timeout)
  File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 1497, in _send_single_request
    ext={"timeout": timeout.as_dict()},
  File "/usr/local/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.7/site-packages/httpx/_exceptions.py", line 343, in map_exceptions
    raise mapped_exc(message, **kwargs) from exc  # type: ignore
httpx.ReadTimeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/logging/__init__.py", line 1025, in emit
    msg = self.format(record)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 869, in format
    return fmt.format(record)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 608, in format
    record.message = record.getMessage()
  File "/usr/local/lib/python3.7/logging/__init__.py", line 369, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/usr/local/bin/sdacomplete", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/complete_consume.py", line 118, in main
    CONSUMER.start()
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/utils/consumer.py", line 96, in start
    channel.start_consuming(to_tuple=False)
  File "/usr/local/lib/python3.7/site-packages/amqpstorm/channel.py", line 348, in start_consuming
    auto_decode=auto_decode
  File "/usr/local/lib/python3.7/site-packages/amqpstorm/channel.py", line 317, in process_data_events
    self._consumer_callbacks[consumer_tag](message)
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/utils/consumer.py", line 149, in __call__
    self._error_message(message, f"Exception occurred: {error}")
  File "/usr/local/lib/python3.7/site-packages/sda_orchestrator/utils/consumer.py", line 140, in _error_message
    f"user: {original_message['user']}, with reason: {reason})",
    ```
@blankdots blankdots added the bug Something isn't working label Sep 29, 2021
@blankdots blankdots self-assigned this Sep 29, 2021
@blankdots blankdots changed the title handle timeout for connecting to Datacite doi handle timeout for connecting to REMS doi Sep 29, 2021
@blankdots
Copy link
Contributor Author

seems the issue is with REMS

@blankdots
Copy link
Contributor Author

handled in 915a7a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant