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

BC Gov Instance - Errors posting credentials #751

Closed
WadeBarnes opened this issue Jun 20, 2023 · 3 comments · Fixed by #752
Closed

BC Gov Instance - Errors posting credentials #751

WadeBarnes opened this issue Jun 20, 2023 · 3 comments · Fixed by #752

Comments

@WadeBarnes
Copy link
Member

Receiving the following errors posting credentials.

ERROR 2023-06-20 06:29:44,354 views 1 140521995925056  >>> Received duplicate for credential_id: a696c6b9-4502-4981-8f77-78b5fe021709, exch id: e0a4339d-acae-4dc0-998b-3a82c064fa8c
ERROR 2023-06-20 06:29:44,355 utils 1 140521995925056 Agent connection raised exception, raise: __init__() got an unexpected keyword argument 'method_whitelist'
ERROR 2023-06-20 06:29:44,355 views 1 140521995925056 __init__() got an unexpected keyword argument 'method_whitelist'
ERROR 2023-06-20 06:29:44,355 views 1 140521995925056 Send problem report for e0a4339d-acae-4dc0-998b-3a82c064fa8c
ERROR 2023-06-20 06:29:44,355 utils 1 140521995925056 Agent connection raised exception, raise: __init__() got an unexpected keyword argument 'method_whitelist'
ERROR 2023-06-20 06:29:44,382 log 1 140521995925056 Internal Server Error: /agentcb/topic/issue_credential/
Traceback (most recent call last):
  File "/opt/app-root/src/agent_webhooks/views.py", line 189, in handle_credentials
    return receive_credential(credential_exchange_id, credential_data)
  File "/opt/app-root/src/agent_webhooks/views.py", line 588, in receive_credential
    raise e
  File "/opt/app-root/src/agent_webhooks/views.py", line 549, in receive_credential
    resp = call_agent_with_retry(
  File "/opt/app-root/src/api/v2/utils.py", line 268, in call_agent_with_retry
    retry = Retry(
TypeError: __init__() got an unexpected keyword argument 'method_whitelist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/app-root/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/opt/app-root/lib64/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/opt/app-root/lib64/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/app-root/lib64/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/app-root/lib64/python3.9/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/views.py", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/views.py", line 465, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
    raise exc
  File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/views.py", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/opt/app-root/lib64/python3.9/site-packages/rest_framework/decorators.py", line 50, in handler
    return func(*args, **kwargs)
  File "/opt/app-root/src/agent_webhooks/views.py", line 69, in agent_callback
    response = handle_credentials(state, message)
  File "/opt/app-root/src/agent_webhooks/views.py", line 199, in handle_credentials
    resp = call_agent_with_retry(
  File "/opt/app-root/src/api/v2/utils.py", line 268, in call_agent_with_retry
    retry = Retry(
TypeError: __init__() got an unexpected keyword argument 'method_whitelist'

cc @swcurran, @esune, @amanji

@WadeBarnes
Copy link
Member Author

Currently there is a large backlog of credentials for some reason:

BC_REG : Table: event_by_corp_filing Processed: 10630604 Outstanding: 5
BC_REG :        event_by_corp_filing Process Errors: 0
BC_REG : Table: corp_history_log Processed: 8272295 Outstanding: 0
BC_REG :        corp_history_log Process Errors: 0
BC_REG : Table: credential_log Processed: 5232723 Outstanding: 9288
BC_REG :        credential_log Process Errors: 0
BCREG_LEAR : Table: event_by_corp_filing Processed: 32184 Outstanding: 2
BCREG_LEAR :        event_by_corp_filing Process Errors: 0
BCREG_LEAR : Table: corp_history_log Processed: 29472 Outstanding: 0
BCREG_LEAR :        corp_history_log Process Errors: 0
BCREG_LEAR : Table: credential_log Processed: 50682 Outstanding: 2515
BCREG_LEAR :        credential_log Process Errors: 0

@WadeBarnes
Copy link
Member Author

WadeBarnes commented Jun 20, 2023

Possible issue is method_whitelist parameter being changed to allowed_methods in urllib3. The API is using urllib3 v2.0.2.

@WadeBarnes
Copy link
Member Author

Confirmed the issue; https://urllib3.readthedocs.io/en/2.0.2/reference/urllib3.util.html#urllib3.util.Retry

In urllib3 v2.0.2 the Retry class uses allowed_methods, not method_whitelist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant