Elastic Stack

7.3 elasticsearch 연결 실패 문제

구티맨 2019. 10. 14. 17:11
$ curl -XGET 127.0.0.1:9200
$ curl -XGET util.server.domain:9200

Failed to connect to localhost port 9200: Connection refused

local에서 curl 로 elasticsearch로 ip주소로 호출시 위와 같은 에러가 발생할 때가 있다. 외부에서 호출시에도 마찬가지이다.

아래와 같이 yml 파일 설정을 하면 외부나 ip주소로 접근이 가능해진다.

network.host: 0.0.0.0
cluster.initial_master_nodes: node-1

출처

https://stackoverflow.com/questions/31677563/elasticsearch-failed-to-connect-to-localhost-port-9200-connection-refused