Transport 502 Error: Need Help Isolating Error

The command we are using is this:
esrally race --track=http_logs --target-hosts=[IP address] --pipeline=benchmark-only --report-file=es_report_E3_32gb.md --report-format=csv --kill-running-processes

The IP address is the format xxx.xxx.xxx.xxx:xxxx

The error logs we are getting is this:

[ERROR] Cannot race. Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/esrally/actor.py", line 92, in guard
    return f(self, msg, sender)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/esrally/racecontrol.py", line 110, in receiveMsg_Setup
    self.coordinator.setup(sources=msg.sources)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/esrally/racecontrol.py", line 186, in setup
    distribution_version = mechanic.cluster_distribution_version(self.cfg)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/esrally/mechanic/mechanic.py", line 280, in cluster_distribution_version
    client.wait_for_rest_layer(es)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/esrally/client.py", line 315, in wait_for_rest_layer
    raise e
  File "/home/ubuntu/.local/lib/python3.8/site-packages/esrally/client.py", line 299, in wait_for_rest_layer
    es.cluster.health(wait_for_nodes=">={}".format(expected_node_count))
  File "/home/ubuntu/.local/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 168, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/elasticsearch/client/cluster.py", line 66, in health
    return self.transport.perform_request(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 409, in perform_request
    self._do_verify_elasticsearch(headers=headers, timeout=timeout)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 598, in _do_verify_elasticsearch
    raise error
  File "/home/ubuntu/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 561, in _do_verify_elasticsearch
    _, info_headers, info_response = conn.perform_request(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 277, in perform_request
    self._raise_error(response.status, raw_data)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/elasticsearch/connection/base.py", line 330, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
elasticsearch.exceptions.TransportError: TransportError(502, '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center></center>\r\n</body>\r\n</html>\r\n')

It seems to be an issue with the server of some sort. But if we can get more insight into what this error might be and what it might be.

Thanks!

Hello and thank you for your post, welcome! It appears Rally is having trouble connecting to Elasticsearch through a reverse proxy. Can you try checking the connection to the host IP and port used in the --target-hosts parameter with an external REST client like Curl or even a web browser?

Thank you,
Jason

Hi, I think it was a personal issue where the cluster was not instantiated yet.

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