ConnectionRefusedError: [Errno 111] Connection refused error while running rally for an existing elastic cluster

Hi,

I am new to rally and trying to run the benchmark for the existing cluster.

I have 3 K8's nodes (1 master,2 worker)
192.168.105.116
192.168.105.117
192.168.105.118

I have created an Elasticsearch cluster on top of k8's cluster with 3 master and 5 data nodes.

I am using the section (benchmark existing cluster) in the following link.

Tips and Tricks - Rally 2.7.1 documentation (esrally.readthedocs.io)

esrally race --track=pmc --target-hosts=192.168.105.116:9200,192.168.105.117:9200,192.168.105.118:9200 --pipeline=benchmark-only --client-options="use_ssl:true,basic_auth_user:'elastic',basic_auth_password:'XXXXX',verify_certs:false"

while running the above command, I'm getting connection refused error.

Can someone please guide me what went wrong in the command or the process that I'm following.

administrator@administrator:~/.rally$ esrally race --track=pmc --target-hosts=192.168.105.116:9200,192.168.105.117:9200,192.168.105.118:9200 --pipeline=benchmark-only --client-options="use_ssl:true,basic_auth_user:'elastic',basic_auth_password:'XXXXX',verify_certs:false"

[INFO] Race id is [b643574f-9c7e-4f9b-8ec7-16aa1911e771]
[ERROR] Cannot race. Traceback (most recent call last):
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/administrator/.local/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 251, in perform_request
response = self.pool.urlopen(
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/util/retry.py", line 525, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/packages/six.py", line 770, in reraise
raise value
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
conn.connect()
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/home/administrator/.local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f2fc796cb20>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Hello, and thank you for your interest in Rally!

In order to rule out a configuration error, can you please try the following curl commands to see if they succeed?

curl --insecure https://elastic:XXXXX@192.168.105.116:9200/
curl --insecure https://elastic:XXXXX@192.168.105.117:9200/
curl --insecure https://elastic:XXXXX@192.168.105.118:9200/

Hi @Quentin_Pradet ,

I was able to figure out on how to use the exact rally command for Elasticsearch container from outside.

esrally race --track=pmc --pipeline=benchmark-only --target-hosts=192.168.105.116:9200 --client-options="timeout:60,use_ssl:true,verify_certs:true,ca_certs:'/home/administrator/ca.crt',basic_auth_user:'elastic',basic_auth_password:'xxxxx

administrator@administrator:~$ curl --insecure https://elastic:xxxxx@192.168.105.116:9200/
{
"name" : "quickstart-es-master-0",
"cluster_name" : "quickstart",
"cluster_uuid" : "wmaV7NUORjCDIfmIRaE4rw",
"version" : {
"number" : "8.8.0",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "c01029875a091076ed42cdb3a41c10b1a9a5a20f",
"build_date" : "2023-05-23T17:16:07.179039820Z",
"build_snapshot" : false,
"lucene_version" : "9.6.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}

Currently I am facing a different issue now with SSL Verification of esrally for rally-tracks.elastic.co', can you please have a look at this post ( Max retries exceeded with url: /pmc/documents.json.bz2 SSLCertVerificationError [SSL: CERTIFICATE_VERIFY_FAILED] - Elastic Stack / Elasticsearch - Discuss the Elastic Stack)

I see that you've opened a new topic, so I'll answer there: Max retries exceeded with url: /pmc/documents.json.bz2 SSLCertVerificationError [SSL: CERTIFICATE_VERIFY_FAILED]

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