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] Error connecting to secure OS cluster when using OSB on Python-3.10 and above. #252

Closed
rishabh6788 opened this issue Apr 3, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rishabh6788
Copy link
Collaborator

Describe the bug
While trying to run OSB against a remote cluster with security enabled I am getting below error:

[ERROR] Cannot execute_test. Error in test execution orchestrator (ConnectionError(Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801)) caused by: SSLError(Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801)))

This error is only encountered on machines running Python-3.10 and above.
I am able to execute OSB against secure remote cluster when running on machines with Python-3.9 and below.

To Reproduce
Set up a machine with Python 3.10 or above and run OSB benchmarking on remote cluster using following command:

opensearch-benchmark execute_test --workload=geonames --test-mode --target-hosts=10.10.10.10:9200 --pipeline=benchmark-only --client-options="use_ssl:true,verify_certs:false,basic_auth_user:'admin',basic_auth_password:'admin'"

Expected behavior
The OSB benchmark should run without throwing any error.

Logs

2023-04-03 20:22:11,457 -not-actor-/PID:74445 opensearch WARNING GET https://opens-publi-2nkfmfd5td5u-d3ceb505e4ca2889.elb.eu-west-1.amazonaws.com:443/ [status:N/A request:0.142s]
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "/opt/homebrew/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/opt/homebrew/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1062, in _create
    self._sslobj = self._context._wrap_socket(
ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801)

More Context (please complete the following information):

  • Workload(Share link for custom workloads)
  • Service(E.g OpenSearch)
  • Version (E.g. 1.0)

Additional context
Add any other context about the problem here.

@rishabh6788 rishabh6788 added bug Something isn't working untriaged labels Apr 3, 2023
@IanHoang
Copy link
Collaborator

IanHoang commented Apr 3, 2023

Will look into this

@IanHoang IanHoang removed the untriaged label Apr 3, 2023
@IanHoang IanHoang moved this from Backlog to Done in OpenSearch Engineering Effectiveness Apr 4, 2023
@IanHoang IanHoang moved this from Done to In Progress in OpenSearch Engineering Effectiveness Apr 4, 2023
@IanHoang IanHoang self-assigned this Apr 4, 2023
IanHoang pushed a commit to IanHoang/opensearch-benchmark that referenced this issue Apr 4, 2023
…clusters (opensearch-project#252)

Signed-off-by: Ian Hoang <hoangia@amazon.com>
IanHoang added a commit that referenced this issue Apr 6, 2023
…clusters (#252) (#256)

Signed-off-by: Ian Hoang <hoangia@amazon.com>
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
Development

No branches or pull requests

2 participants