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

[BUG] 2.1.0 is failing against Managed OpenSearch #278

Closed
dblock opened this issue Jan 23, 2023 · 0 comments · Fixed by #279
Closed

[BUG] 2.1.0 is failing against Managed OpenSearch #278

dblock opened this issue Jan 23, 2023 · 0 comments · Fixed by #279
Labels
bug Something isn't working

Comments

@dblock
Copy link
Member

dblock commented Jan 23, 2023

What is the bug?

I upgraded opensearch-py to 2.1.0 from 2.0.1.

How can one reproduce the bug?

Upgrade https://github.com/dblock/opensearch-python-client-demo to 2.1.0. Starts failing.

$ pipenv run python example.py
opensearch: 1.3.2
Traceback (most recent call last):
  File "/Users/dblock/source/dblock/opensearch-python-client-demo/example.py", line 46, in <module>
    client.index(index=index, body=document, id='1', refresh=True)
  File "/Users/dblock/.local/share/virtualenvs/opensearch-python-client-demo-ejYmDdj0/lib/python3.11/site-packages/opensearchpy/client/utils.py", line 178, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dblock/.local/share/virtualenvs/opensearch-python-client-demo-ejYmDdj0/lib/python3.11/site-packages/opensearchpy/client/__init__.py", line 355, in index
    return self.transport.perform_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dblock/.local/share/virtualenvs/opensearch-python-client-demo-ejYmDdj0/lib/python3.11/site-packages/opensearchpy/transport.py", line 408, in perform_request
    raise e
  File "/Users/dblock/.local/share/virtualenvs/opensearch-python-client-demo-ejYmDdj0/lib/python3.11/site-packages/opensearchpy/transport.py", line 369, in perform_request
    status, headers_response, data = connection.perform_request(
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dblock/.local/share/virtualenvs/opensearch-python-client-demo-ejYmDdj0/lib/python3.11/site-packages/opensearchpy/connection/http_requests.py", line 219, in perform_request
    self._raise_error(
  File "/Users/dblock/.local/share/virtualenvs/opensearch-python-client-demo-ejYmDdj0/lib/python3.11/site-packages/opensearchpy/connection/base.py", line 301, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
opensearchpy.exceptions.AuthorizationException: AuthorizationException(403, '{"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.\\n\\nThe Canonical String for this request should have been\\n\'PUT\\n/movies/_doc/1\\nrefresh=true\\nhost:search-dblock-test-opensearch-13-ndeeeijq6ei747szqcfcnp4z5q.us-west-2.es.amazonaws.com\\nx-amz-date:20230123T221754Z\\nx-amz-security-token:...\'\\n"}')
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

Successfully merging a pull request may close this issue.

2 participants