Elasticsearch doesn't work!

I am having difficulties using Elasticsearch. I am on Linux and I have installed Elasticsearch 8.2.

I have modified my elasticsearch.yml and here is what it contains:

cluster.name: elasticsearch-prod
node.name: myserver
path.data: /db/appli/data/elasticsearch
path.logs: /db/appli/logs/elasticsearch
network.host: myserver
http.port: 9206
transport.port: 9306
discovery.seed_hosts: ["myserver:9306"]
xpack.security.enabled: false

When I launch my application, there are no issues. I can enter the following command:

curl -X GET "http://myserver:9206/"

and I get the result:

{
  "name" : "myserver",
  "cluster_name" : "elasticsearch-prod",
  "cluster_uuid" : "_na_",
  "version" : {
    "number" : "8.2.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "b174af62dd9f4ac4d25875e9381ffe2b9282c5",
    "build_date" : "2022-04-20T10:35:10.180408517Z",
    "build_snapshot" : false,
    "lucene_version" : "9.1.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

But if I want to enter data into Elasticsearch, I can't. This command doesn't work:

curl -X POST "http://myserver:9206/my-index/_doc" -H 'Content-Type: application/json' -d '{"name": "John Doe", "age": 30, "city": "New York"}'

So I check the status of my Elasticsearch with:

curl -X GET "http://myserver:9206/_cat/health?v"

and I get:

{"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503}

Do you have any ideas, please?

This version is coming up on 2 years old, you're missing out on a lot of improvements by using such an old version.

I expect this means you have a discovery problem, see this troubleshooting guide for help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.