Telnet on 9200 doesn't work elasticsearch

Hi ,

I am not able to telnet on the machine having elasticsearch is running using the hostname/ipaddr, while the telnet through localhost is working fine.

telnet localhost 9200
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> quit

telnet xyz 9200
Trying 172.23.16.19...
telnet: connect to address 172.23.16.19: Connection refused

Here is my elasticsearch conf file:

cluster.name: abc
node.name: xyz
path.data: /servers/scratch03/ES_DATA
path.logs: /var/log/elasticsearch

By default Elasticsearch only listens to localhost, you need to change that and you will be ok.

Change network.host that is.

You might see some errors then. If so, please read https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html

Thanks the following settings work:

transport.host: localhost
transport.tcp.port: 9300
http.port: 9200
network.host: 0.0.0.0

These are the defaults, there's not a lot of value in setting them like this.