İçin ElasticSearch 7.8 ve yukarı
Tek düğümde olup olmadığınızı kontrol edin. aşağıdaki satırı ekle
cluster.initial_master_nodes: node-1
Elasticsearch sunucusuna başka bir bilgisayardan veya uygulamadan erişmek için, düğümün sunucusunda aşağıdaki değişiklikleri yapın. C:\ProgramData\Elastic\Elasticsearch\config\elasticsearch.yml file:
Aşağıdaki satırları ekleyin
network.host: ["0.0.0.0", 127.0.0.1", "[::1]"]
network.bind_host: 0.0.0.0
network.publish_host: 0.0.0.0
http.host: 0.0.0.0
Bir süre CORS'u etkinleştirmeniz gerekebilir
http.cors.enabled : true
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length
İşte tam yml dosyam
bootstrap.memory_lock: false
cluster.name: elasticsearch
http.port: 9200
node.data: true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1
cluster.initial_master_nodes: node-1
node.name: ITDEV
path.data: C:\ProgramData\Elastic\Elasticsearch\data
path.logs: C:\ProgramData\Elastic\Elasticsearch\logs
transport.tcp.port: 9300
xpack.license.self_generated.type: basic
xpack.security.enabled: false
network.host: ["0.0.0.0", 127.0.0.1", "[::1]"]
network.bind_host: 0.0.0.0
network.publish_host: 0.0.0.0
http.host: 0.0.0.0
http.cors.enabled : true
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length