Issue Summary

We’re unable to access Athena data source in redash. When I try to create a query, I got the error “Schema refresh failed”. Then I went to check the data source and tried test connection - it gives me an error as “Connection Test Failed: [('asn1 encoding routines', 'asn1_item_embed_d2i', 'field missing')]”.

The same error messages are in the redash logs as well.

    [2019-04-29 11:43:37,913][PID:12429][INFO][botocore.vendored.requests.packages.urllib3.connectionpool] Starting new HTTPS connection (1): athena.ap-south-1.amazonaws.com
[2019-04-29 11:43:37,987][PID:12429][INFO][botocore.vendored.requests.packages.urllib3.connectionpool] Starting new HTTP connection (1): 52.222.178.134
[2019-04-29 11:43:38,245][PID:12429][INFO][botocore.vendored.requests.packages.urllib3.connectionpool] Starting new HTTP connection (1): 52.222.178.36
[2019-04-29 11:43:38,493][PID:12429][INFO][botocore.vendored.requests.packages.urllib3.connectionpool] Starting new HTTP connection (1): 52.222.178.10
[2019-04-29 11:43:38,762][PID:12429][ERROR][pyathena.common] Failed to execute query.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pyathena/common.py", line 165, in _execute
    **request)
  File "/usr/local/lib/python2.7/dist-packages/pyathena/util.py", line 45, in retry_api_call
    return retry(func, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tenacity/__init__.py", line 275, in call
    start_time=start_time)
  File "/usr/local/lib/python2.7/dist-packages/tenacity/__init__.py", line 236, in iter
    return fut.result()
  File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 422, in result
    return self.__get_result()
  File "/usr/local/lib/python2.7/dist-packages/tenacity/__init__.py", line 278, in call
    result = fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 314, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 599, in _make_api_call
    operation_model, request_dict)
  File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 143, in make_request
    return self._send_request(request_dict, operation_model)
  File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 172, in _send_request
    success_response, exception):
  File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 265, in _needs_retry
    caught_exception=caught_exception, request_dict=request_dict)
  File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 227, in emit
    return self._emit(event_name, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 210, in _emit
    response = handler(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 183, in __call__
    if self._checker(attempts, response, caught_exception):
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 251, in __call__
    caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 269, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 317, in __call__
    caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 223, in __call__
    attempt_number, caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
Error: [('asn1 encoding routines', 'asn1_item_embed_d2i', 'field missing')]

I verified the user credentials and access, etc. This used to work in the past. Not sure since when this stopped working.

Technical details:

  • Redash Version: redash.7.0.0.b17535
  • Browser/OS: ubuntu
  • How did you install Redash: custom deployment