Elasticsearch 외부접속 허용
Posted by Albert 802Day 16Hour 50Min 29Sec ago [2023-02-07]
처음 설치후 localhost:9200에서는 잘 확인되지만
다른 pc에서 접속시도시 페이지 접속되지않는다.
외부접속 허용하면 되는데 방법은 아래와같다.
1. sudo vi /etc/elasticsearch/elasticsearch.yml
/9200 으로 아래 내용을 찾는다
====================================
'network.host: 192.168.0.1
'network.host: localhost
network.host: 0.0.0.0
'
' 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.
'
추가로 아래 cluster.initial_master_nodes: ["node-1", "node-2"] 주석해제
1.network.host: 0.0.0.0, 2.http.port: 9200 3.cluster.initial_master_nodes: ["node-1", "node-2"]
sudo systemctl stop elasticsearch
sudo systemctl start elasticsearch