How do I enable remote access/request in Elasticsearch 2.0?

前端 未结 12 785
醉酒成梦
醉酒成梦 2020-12-22 22:09

Starting from v2.0 Elasticsearch is listening only on localhost by default, but I\'d like to make request outside localhost.

For example, a request like this is allo

12条回答
  •  无人及你
    2020-12-22 23:02

    By default http transport and internal elasticsearch transport only listens to localhost. If you want to access Elasticsearch from the host other than localhost then try adding following configurations in config/elasticsearch.yml.

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

    Here, network.host as 0.0.0.0 allow access from any host within the network.

提交回复
热议问题