How to use esrally to pressure the Elastic search cluster that has been configured with search-guad plugins

i use jks file for auth.



2019-05-04 21:50:53,934 -not-actor-/PID:11475 elasticsearch WARNING GET https://xxx:9200/ [status:N/A request:0.014s]
Traceback (most recent call last):
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connection.py", line 326, in connect
    ssl_context=context)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 341, in ssl_wrap_socket
    return context.wrap_socket(sock)
  File "/usr/local/python3/lib/python3.5/ssl.py", line 385, in wrap_socket
    _context=self)
  File "/usr/local/python3/lib/python3.5/ssl.py", line 760, in __init__
    self.do_handshake()
  File "/usr/local/python3/lib/python3.5/ssl.py", line 996, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/local/python3/lib/python3.5/ssl.py", line 641, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:728)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/python3/lib/python3.5/site-packages/elasticsearch-6.2.0-py3.5.egg/elasticsearch/connection/http_urllib3.py", line 166, in perform_request
    response = self.pool.urlopen(method, url, body, retries=False, headers=request_headers, **kw)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/util/retry.py", line 333, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/connection.py", line 326, in connect
    ssl_context=context)
  File "/usr/local/python3/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 341, in ssl_wrap_socket
    return context.wrap_socket(sock)
  File "/usr/local/python3/lib/python3.5/ssl.py", line 385, in wrap_socket
    _context=self)
  File "/usr/local/python3/lib/python3.5/ssl.py", line 760, in __init__
    self.do_handshake()
  File "/usr/local/python3/lib/python3.5/ssl.py", line 996, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/local/python3/lib/python3.5/ssl.py", line 641, in do_handshake
    self._sslobj.do_handshake()
urllib3.exceptions.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:728)
2019-05-04 21:50:53,938 -not-actor-/PID:11464 esrally.racecontrol ERROR A benchmark failure has occurred
2019-05-04 21:50:53,939 -not-actor-/PID:11464 esrally.racecontrol INFO Telling benchmark actor to exit.

How do you start Rally (and which version of Rally you are using)?

HI . @cstaley

i convert jks to pem file and use it for rally test. but faced with error .
esrally 1.0.4

esrally  --target-hosts=xxx:9200  --pipeline=benchmark-only --client-options="basic_auth_user:'xxx',basic_auth_password:'xxx',use_ssl:true,verify_certs:false,ca_certs:'/root/cert.pem',client_cert:'/root/cert.pem',client_key:'/root/private.pem'" --track=nyc_taxis    --test-mode

SSL: UNKNOWN_PROTOCOL

maybe you need to allow TLSv1 in Search Guard or force Rally to use TLSv1.2 (ssl_version=ssl.PROTOCOL_TLSv1_2)
Python is troublesome when it comes to SSL. Look here https://gist.github.com/floragunncom/9319a994ae09df64b2a173128f745ed2, maybe this helps.
See also urllib3 docs: https://urllib3.readthedocs.io/en/latest/

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.