Elasticsearch Check Elasticsearch Version

By Opster Team

Updated: Jan 28, 2024

| 2 min read

Checking Elasticsearch Version

When working with Elasticsearch, it’s essential to know the version you’re using, as different versions may have different features, APIs, and configurations. In this article, we’ll discuss how to check the Elasticsearch version using various methods.

If you want to learn more about the concept of Elasticsearch version and what is it used for, check out this guide. To learn how to upgrade versions in Elasticsearch, read this guide.

Methods to check Elasticsearch version

Method 1: Using the REST API

You can check the Elasticsearch version by sending a GET request to the cluster’s root endpoint. Here’s an example using the `curl` command:

bash
curl -X GET "http://localhost:9200"

The response will include the version number:

`json
{
"name" : "node-1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "abcd1234",
"version" : {
    "number" : "7.17.3",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "5ad023604c8d7416c9eb6c0eadb62b14e766caff",
    "build_date" : "2022-04-19T08:11:19.070913226Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"

},
"tagline" : "You Know, for Search"
}

In this example, the Elasticsearch version is `7.17.3`.

Method 2: Checking the Log Files

Elasticsearch logs the version number during startup. You can find the version in the log files, typically located in the `logs` directory within the Elasticsearch installation folder. Look for a line similar to the following:

[2023-04-22T22:00:00,000][INFO ][o.e.n.Node ] [node-1] version[7.17.3.0], pid[12345], build[default/tar/abcdef123456/2021-09-22T21:37:37.881534Z], OS[Linux/5.4.0-81-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/11.0.11/11.0.11+9]

In this log entry, the Elasticsearch version is `7.17.3`.

Method 3: Using the Elasticsearch Command Line

If you have access to the Elasticsearch installation directory, you can use the `elasticsearch` command with the `–version` flag to check the version:

`bash
./bin/elasticsearch --version

The output will display the version number:

Version: 7.17.3, Build: default/tar/abcdef123456/2021-09-22T21:37:37.881534Z, JVM: 11.0.11

In this example, the Elasticsearch version is `7.17.3`.

Conclusion

Checking the Elasticsearch version is crucial for ensuring compatibility and understanding the available features. You can use any of the methods mentioned above to determine the version of your Elasticsearch cluster.

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?


Related log errors to this ES concept


Successfully loaded all snapshot s version information for from snapshot metadata
Creating template with version
Upgrading index template for from version to version
Failed to set last accepted state with version
Failing %s failed to commit cluster state version %s
Could not apply transport version for nodes to cluster state
Failed to read transport version info from node
Error processing handshake version version received on channel closing channel
Ignoring master because the version is lower than the minimum compatible version
Incompatible cluster state version - resending complete cluster state
Unexpected error while processing cluster state version
Incoming last accepted version

< Page: 3 of 5 >