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

TypeError: ssl_wrap_socket_with_ocsp() got an unexpected keyword argument 'key_password' #4526

Closed
maximecharron opened this issue Jan 7, 2020 · 4 comments · Fixed by #4567

Comments

@maximecharron
Copy link

Using the preview docker image and deploying with the setup script, I'm hitting the following error when trying to execute a query against a Prometheus Data Source:

[2020-01-07 18:30:31,789][PID:26][WARNING][root] Unexpected error while running query:
Traceback (most recent call last):
  File "/app/redash/tasks/queries/execution.py", line 160, in run
    data, error = query_runner.run_query(annotated_query, self.user)
  File "/app/redash/query_runner/prometheus.py", line 139, in run_query
    response = requests.get(api_endpoint, params=payload)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect
    ssl_context=context,
TypeError: ssl_wrap_socket_with_ocsp() got an unexpected keyword argument 'key_password'

Downgrading requests to 2.21.0 fixes the issue.

@stevebuckingham
Copy link
Contributor

I've fixed this my incrementing the snowflake connector and the pyopenssl library. I did this as part of extending Redshift functionality (as boto hit the SSL error) and this is in my open PR. #4532

@phdowling
Copy link

Seeing this for Kibana as well

@phdowling
Copy link

phdowling commented Jan 14, 2020

Also on JSON data source - even after downgrading requests to 2.21.0 (which makes Kibana work again)
Edit: my mistake, I only rebuilt server and worker, not celery-worker

@arikfr
Copy link
Member

arikfr commented Jan 20, 2020

Downgrading requests is not enough, you should also upgrade snowflake-python-connector to 2.1.3 (see #4567).

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.

4 participants