Downgrade from es version 8.15.0 to 8.13.4

Hi, Is there any possibility for doing such downgrade without data loss?
I have seen this topic and this one before. but I don't have a snapshot before the 8.15.0 version and tried snapshot of 8.15.0 on elastic cluster version 8.13.4 but I get following error:

{"error":{"root_cause":[{"type":"snapshot_restore_exception","reason":"[my_backup:snapshot_1/iqQ0hbqlSlSnDe7SHZaGfQ] the snapshot was created with version [8.13.4-snapshot[8512000]] which is higher than the version of this node [8.13.0-8.13.3]"}],"type":"snapshot_restore_exception","reason":"[my_backup:snapshot_1/iqQ0hbqlSlSnDe7SHZaGfQ] the snapshot was created with version [8.13.4-snapshot[8512000]] which is higher than the version of this node [8.13.0-8.13.3]"},"status":500}

Have you tried restore the snapshot on these versions?

Elasticsearch does not support downgrades - reason is the most likely Lucene.

Elasticsearch does not support in-place downgrades, so the only ways to move to a prior version are:

  1. Restore snapshot taken in a version earlier or equal to the one restoring to
  2. Setting up a new cluster with the lower version and the reindex into this from the remote cluster with the higher version

Why do you want to downgrade?

2 Likes

Thank you for your response. I want to downgrade because spring boot's current version is not fully compatible with latest version of elasticsearch.
I will follow this reindex guide and i hope it works.

That should not be a problem.

Elasticsearch is designed so that older clients can connect to new servers (but not necessarily the reverse).
You should not have any issue using Spring Boot and the 8.13 client against an 8.15 server

@TimV
It connects to Elasticsearch 8.15 successfully, but after I upgraded to this version, the client encounters timeouts after a while. I hope downgrading the server will solve this problem.

example:

org.springframework.dao.DataAccessResourceFailureException: 30,000 milliseconds timeout on connection http-outgoing-2 [ACTIVE]
        at org.springframework.data.elasticsearch.client.elc.ElasticsearchExceptionTranslator.translateExceptionIfPossible(ElasticsearchExceptionTranslator.java:111)
        at org.springframework.data.elasticsearch.client.elc.ElasticsearchExceptionTranslator.translateException(ElasticsearchExceptionTranslator.java:65)
        at org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate.execute(ElasticsearchTemplate.java:685)
        at org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate.doIndex(ElasticsearchTemplate.java:234)
        at org.springframework.data.elasticsearch.core.AbstractElasticsearchTemplate.save(AbstractElasticsearchTemplate.java:203)

It sounds like you would be better off trying to diagnose and fix the timeout issues than trying to downgrade (which may not even solve the problem)

As Tim said, check your url connection by curl.
Might be:

  • ES service hasn't been properly started, check ES logs
  • network.host param in elasticsearch.yml
  • firewall has been activated
  • http or https setting has been changed