I am trying to bind my public ip on Elasticsearch but it does not working. however, it is working ok while doing curl from localhost, but giving connection timed out on browser.
I read almost every article here in community as well as stack overflow but non of them helped address this issue. My elasticsearch.yml file is as follows. Can anyone help ?
======================== 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: aws-elastic
------------------------------------ Node ------------------------------------
Use a descriptive name for the node:
node.name: aws-node
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 -----------------------------------
Set the bind address to a specific IP (IPv4 or IPv6):
network.host: "0.0.0.0"
Set a custom port for HTTP:
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: ["172.31.15.53"]
For more information, consult the discovery and cluster formation module documentation.
---------------------------------- Gateway -----------------------------------
Block initial recovery after a full cluster restart until N nodes are started:
#gateway.recover_after_nodes: 3
For more information, consult the gateway module documentation.
---------------------------------- Various -----------------------------------
Require explicit names when deleting indices:
#action.destructive_requires_name: true
Following is my log output
[2020-09-11T15:38:14,244][INFO ][o.e.e.NodeEnvironment ] [aws-node] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [31.5gb], net total_space [33.8gb], types [ext4]
[2020-09-11T15:38:14,245][INFO ][o.e.e.NodeEnvironment ] [aws-node] heap size [1gb], compressed ordinary object pointers [true]
[2020-09-11T15:38:14,324][INFO ][o.e.n.Node ] [aws-node] node name [aws-node], node ID [GkYwmSeDQ5S8p-_STKhK0g], cluster name [aws-elastic]
[2020-09-11T15:38:18,049][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [aws-node] [controller/23414] [Main.cc@114] controller (64 bit): Version 7.9.1 (Build 6ed2566ba11bb5) Copyright (c) 2020 Elasticsearch BV
[2020-09-11T15:38:18,913][INFO ][o.e.x.s.a.s.FileRolesStore] [aws-node] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2020-09-11T15:38:20,037][INFO ][o.e.d.DiscoveryModule ] [aws-node] using discovery type [zen] and seed hosts providers [settings]
[2020-09-11T15:38:20,505][WARN ][o.e.g.DanglingIndicesState] [aws-node] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
[2020-09-11T15:38:20,948][INFO ][o.e.n.Node ] [aws-node] initialized
[2020-09-11T15:38:20,948][INFO ][o.e.n.Node ] [aws-node] starting ...
[2020-09-11T15:38:21,081][INFO ][o.e.t.TransportService ] [aws-node] publish_address {172.31.15.53:9300}, bound_addresses {[::]:9300}
[2020-09-11T15:38:21,501][INFO ][o.e.b.BootstrapChecks ] [aws-node] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2020-09-11T15:38:21,536][INFO ][o.e.c.c.Coordinator ] [aws-node] cluster UUID [8nED9dpUQb6gOSOyepDqZQ]
[2020-09-11T15:38:21,720][INFO ][o.e.c.s.MasterService ] [aws-node] elected-as-master ([1] nodes joined)[{aws-node}{GkYwmSeDQ5S8p-_STKhK0g}{h74TrcL3QfSaVHuPPk3UXA}{172.31.15.53}{172.31.15.53:9300}{dilmrt}{ml.machine_memory=8369885184, xpack.installed=true, transform.node=true, ml.max_open_jobs=20} elect leader, BECOME_MASTER_TASK, FINISH_ELECTION], term: 12, version: 65, delta: master node changed {previous , current [{aws-node}{GkYwmSeDQ5S8p-_STKhK0g}{h74TrcL3QfSaVHuPPk3UXA}{172.31.15.53}{172.31.15.53:9300}{dilmrt}{ml.machine_memory=8369885184, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}]}
[2020-09-11T15:38:21,808][INFO ][o.e.c.s.ClusterApplierService] [aws-node] master node changed {previous , current [{aws-node}{GkYwmSeDQ5S8p-_STKhK0g}{h74TrcL3QfSaVHuPPk3UXA}{172.31.15.53}{172.31.15.53:9300}{dilmrt}{ml.machine_memory=8369885184, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}]}, term: 12, version: 65, reason: Publication{term=12, version=65}
[2020-09-11T15:38:21,856][INFO ][o.e.h.AbstractHttpServerTransport] [aws-node] publish_address {172.31.15.53:9200}, bound_addresses {[::]:9200}
[2020-09-11T15:38:21,857][INFO ][o.e.n.Node ] [aws-node] started
[2020-09-11T15:38:22,076][INFO ][o.e.l.LicenseService ] [aws-node] license [ef716b16-b4a2-44f0-b6b9-6565980d79b5] mode [basic] - valid
[2020-09-11T15:38:22,079][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [aws-node] Active license is now [BASIC]; Security is disabled
[2020-09-11T15:38:22,091][INFO ][o.e.g.GatewayService ] [aws-node] recovered [0] indices into cluster_state