Unexpected HTTP Error (503) when running Elasticsearch tools

Need help on how to resolve issue at Elasticsearch tools not working
All permissions on $ES_HOME using command ls -ltr :

[root@localhost bin]# ls -ltr
total 3204
-rwxr-xr-x. 1 root root     353 Jul 19 21:46 elasticsearch-users
-rwxr-xr-x. 1 root root     353 Jul 19 21:46 elasticsearch-syskeygen
-rwxr-xr-x. 1 root root 3188532 Jul 19 21:46 elasticsearch-sql-cli-8.9.0.jar
-rwxr-xr-x. 1 root root     403 Jul 19 21:46 elasticsearch-sql-cli
-rwxr-xr-x. 1 root root     353 Jul 19 21:46 elasticsearch-setup-passwords
-rwxr-xr-x. 1 root root     353 Jul 19 21:46 elasticsearch-service-tokens
-rwxr-xr-x. 1 root root     353 Jul 19 21:46 elasticsearch-saml-metadata
-rwxr-xr-x. 1 root root     353 Jul 19 21:46 elasticsearch-reset-password
-rwxr-xr-x. 1 root root     376 Jul 19 21:46 elasticsearch-reconfigure-node
-rwxr-xr-x. 1 root root     352 Jul 19 21:46 elasticsearch-croneval
-rwxr-xr-x. 1 root root     353 Jul 19 21:46 elasticsearch-create-enrollment-token
-rwxr-xr-x. 1 root root     376 Jul 19 21:46 elasticsearch-certutil
-rwxr-xr-x. 1 root root     376 Jul 19 21:46 elasticsearch-certgen
-rwxr-xr-x. 1 root root     332 Jul 19 21:47 systemd-entrypoint
-rwxr-xr-x. 1 root root      55 Jul 19 21:50 elasticsearch-shard
-rwxr-xr-x. 1 root root     172 Jul 19 21:50 elasticsearch-plugin
-rwxr-xr-x. 1 root root      55 Jul 19 21:50 elasticsearch-node
-rwxr-xr-x. 1 root root      87 Jul 19 21:50 elasticsearch-keystore
-rwxr-xr-x. 1 root root      84 Jul 19 21:50 elasticsearch-geoip
-rwxr-xr-x. 1 root root    2595 Jul 19 21:50 elasticsearch-env-from-file
-rwxr-xr-x. 1 root root    2340 Jul 19 21:50 elasticsearch-env
-rwxr-xr-x. 1 root root     674 Jul 19 21:50 elasticsearch-cli
-rwxr-xr-x. 1 root root     101 Jul 19 21:50 elasticsearch

Everytime I tried to run any of the tools, it throws an error output:

ERROR: Failed to determine the health of the cluster. Unexpected http status [503]

Couldn't seem to post the necessary files, so here's the log after the tool's execution:

[2023-08-07T16:11:47,174][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9300], node [null], requesting [false] discovery result: [][127.0.0.1:9300] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9300: Connection refused: /127.0.0.1:9300: Connection refused
[2023-08-07T16:11:47,174][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9305], node [null], requesting [false] discovery result: [][127.0.0.1:9305] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9305: Connection refused: /127.0.0.1:9305: Connection refused
[2023-08-07T16:11:47,174][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9302], node [null], requesting [false] discovery result: [][127.0.0.1:9302] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9302: Connection refused: /127.0.0.1:9302: Connection refused
[2023-08-07T16:11:47,174][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9303], node [null], requesting [false] discovery result: [][127.0.0.1:9303] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9303: Connection refused: /127.0.0.1:9303: Connection refused
[2023-08-07T16:11:47,174][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9301], node [null], requesting [false] discovery result: [][[::1]:9301] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9301: Connection refused: /[0:0:0:0:0:0:0:1]:9301: Connection refused
[2023-08-07T16:11:47,174][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9304], node [null], requesting [false] discovery result: [][[::1]:9304] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9304: Connection refused: /[0:0:0:0:0:0:0:1]:9304: Connection refused
[2023-08-07T16:11:47,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9305], node [null], requesting [false] discovery result: [][[::1]:9305] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9305: Connection refused: /[0:0:0:0:0:0:0:1]:9305: Connection refused
[2023-08-07T16:11:47,174][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9300], node [null], requesting [false] discovery result: [][[::1]:9300] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9300: Connection refused: /[0:0:0:0:0:0:0:1]:9300: Connection refused
[2023-08-07T16:11:47,179][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9301], node [null], requesting [false] discovery result: [][127.0.0.1:9301] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9301: Connection refused: /127.0.0.1:9301: Connection refused
[2023-08-07T16:11:47,179][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9302], node [null], requesting [false] discovery result: [][[::1]:9302] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9302: Connection refused: /[0:0:0:0:0:0:0:1]:9302: Connection refused
[2023-08-07T16:11:47,179][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9303], node [null], requesting [false] discovery result: [][[::1]:9303] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9303: Connection refused: /[0:0:0:0:0:0:0:1]:9303: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9305], node [null], requesting [false] discovery result: [][127.0.0.1:9305] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9305: Connection refused: /127.0.0.1:9305: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9303], node [null], requesting [false] discovery result: [][[::1]:9303] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9303: Connection refused: /[0:0:0:0:0:0:0:1]:9303: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9304], node [null], requesting [false] discovery result: [][[::1]:9304] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9304: Connection refused: /[0:0:0:0:0:0:0:1]:9304: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9304], node [null], requesting [false] discovery result: [][127.0.0.1:9304] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9304: Connection refused: /127.0.0.1:9304: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9302], node [null], requesting [false] discovery result: [][127.0.0.1:9302] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9302: Connection refused: /127.0.0.1:9302: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9303], node [null], requesting [false] discovery result: [][127.0.0.1:9303] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9303: Connection refused: /127.0.0.1:9303: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9301], node [null], requesting [false] discovery result: [][[::1]:9301] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9301: Connection refused: /[0:0:0:0:0:0:0:1]:9301: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9305], node [null], requesting [false] discovery result: [][[::1]:9305] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9305: Connection refused: /[0:0:0:0:0:0:0:1]:9305: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9302], node [null], requesting [false] discovery result: [][[::1]:9302] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9302: Connection refused: /[0:0:0:0:0:0:0:1]:9302: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9300], node [null], requesting [false] discovery result: [][127.0.0.1:9300] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9300: Connection refused: /127.0.0.1:9300: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [[::1]:9300], node [null], requesting [false] discovery result: [][[::1]:9300] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:9300: Connection refused: /[0:0:0:0:0:0:0:1]:9300: Connection refused
[2023-08-07T16:11:48,175][WARN ][o.e.d.PeerFinder         ] [elastic1] address [127.0.0.1:9301], node [null], requesting [false] discovery result: [][127.0.0.1:9301] connect_exception: Failed execution: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9301: Connection refused: /127.0.0.1:9301: Connection refused
[2023-08-07T16:11:48,634][WARN ][o.e.c.c.ClusterFormationFailureHelper] [elastic1] master not discovered yet, this node has not previously joined a bootstrapped cluster, and this node must discover master-eligible nodes [localhost] to bootstrap a cluster: have discovered [{elastic1}{JN2IzEqQRiyN_n-7lrVfiA}{V4F2tm9HQ0SlSycupdpfaA}{elastic1}{192.168.239.135}{192.168.239.135:9300}{cdfhilmrstw}{8.9.0}]; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{elastic1}{JN2IzEqQRiyN_n-7lrVfiA}{V4F2tm9HQ0SlSycupdpfaA}{elastic1}{192.168.239.135}{192.168.239.135:9300}{cdfhilmrstw}{8.9.0}] from last-known cluster state; node term 0, last-accepted version 0 in term 0; for troubleshooting guidance, see https://www.elastic.co/guide/en/elasticsearch/reference/8.9/discovery-troubleshooting.html

Here's my elasticsearch.yml configuration in $ES_CONF:

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: elastic1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 192.168.239.135
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically      
# generated to configure Elasticsearch security features on 04-08-2023 16:25:40
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["localhost"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

Some notes about the .yml config: I changed the node-name to elastic1 and network.host to my own ip address. That's it, No other changes

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