Cannot upgrade to Elasticsearch 8.12.1 directly from 7.12.0

Hi All,

I'm trying to install ELK stack in QA environment but get the error below with Elasticsearch:

'java.lang.IllegalStateException: cannot upgrade a node from version [7.12.0] directly to version [8.12.1], upgrade to version [7.17.0] first.'

All other components (Filebeat, Logstash, Kibana) are ok.

Kind regards,

Justin

That is correct. You need to upgrade to version 7.17 before going to version 8.X.

1 Like

Christian was faster :innocent:, follow the link.

Hi Christian,

Thanks for the quick response. Do I have to install 7.17.0 on Elasticsearch only or I have to change the other component versions also i.e Filebeat, Logstash, Kibana.

Thanks.

You need to upgrade Elasticsearch and Kibana as that will allow you to run the migration assistant in Kibana and identify any potential issues that need to be addressed before you can go to version 8.X.

Hi Christian,

I'm trying to upgrade to elasticsearch to version 7.17 as per your suggestion but get the error below:

"systemd-entrypoint[27173]: Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore
systemd-entrypoint[27173]: Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore"

I also noticed this warning while installing it:

"warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.402.b06-1.el7_9.x86_64/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Exception in thread "main" java.lang.IllegalStateException: The Elasticsearch keystore [/etc/elasticsearch/elasticsearch.keystore] format is too new. Are you trying to downgrade? You should delete and recreate it in order to downgrade"

I managed to install & configure Filebeat & Logstash to version 7.17 both are working well.

Kind regards,

Justin

Hi Christian,

I'm trying to upgrade to elasticsearch to version 7.17 as per your suggestion but get the error below:

"systemd-entrypoint[27173]: Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore
systemd-entrypoint[27173]: Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore"

I also noticed this warning while installing it:

"warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.402.b06-1.el7_9.x86_64/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Exception in thread "main" java.lang.IllegalStateException: The Elasticsearch keystore [/etc/elasticsearch/elasticsearch.keystore] format is too new. Are you trying to downgrade? You should delete and recreate it in order to downgrade"

I managed to install & configure Filebeat & Logstash to version 7.17 both are working well.

Kind regards,

Justin

org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore

The permissions are not ok. Should be: own:root group: elasticsearch please check it.

Also JDK version is not OK.

Hi Rio,

We changed the permissions and install the correct java version (java-11) and now we get the error below:

data path [/var/lib/elasticsearch] is not compatible with Elasticsearch v7.17.18, perhaps it has already been upgraded to a later ver

Likely root cause: java.lang.IllegalStateException: [/var/lib/elasticsearch/nodes] is a file which contains [written by Elasticsearch 8.12.1 to prevent a downgrade to

Kind regards,

Justin

Hmm... might be because you try to go directly to 8.12.
I assume ES upgrade hasn't done in the first attempt, however data indices structures might be upgraded or half-upgraded during direct 8.12 migration. Now you have ES 7.17 however data/lucene structure is newer. This is my estimation based on your info.

I'm not sure are upgrading on live data, do you have backup, and how large are indices. I would tried:

  1. make backup data directory, prepare rollback scenario, and backup ES 7.17 if is possible
  2. upgrade ES to 8.12.2 and pray

If data are important, it's better to wait someone from ELK team to suggest better approach and how to find which version of data structure do you have now,which are next steps.

Hi Rios,

Thank you very much all components are now working on version 7.17.xx

One last question, I noticed my Kibana site doesn't have the login options and I can't see the option to add users whilst in the console. Any suggestions?

Regards,

1 Like

Do you have security enabled in Elasticsearch?

let me try enable it.

Hi Rios,

Please bear with me I'm new to the ELK stack.

I'm almost there but now my issue is with Filebeat giving me the error below:

2024-02-29T13:29:20.003+0200 INFO instance/beat.go:698 Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat] Hostfs Path: [/]
2024-02-29T13:29:20.004+0200 INFO instance/beat.go:706 Beat ID: d282ba17-993f-48b6-803b-dc0da89b9cc6
2024-02-29T13:29:20.004+0200 INFO instance/beat.go:391 filebeat stopped.
2024-02-29T13:29:20.007+0200 ERROR instance/beat.go:1027 Exiting: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data).

I'm not sure how to handle this any advise/guidance will be much appreciated.

Kind regards,

Justin.

Either you have another FB running either FB locked the data path.
Check does /var/lib/filebeat/filebeat.lock exist, if does rename it or delete or change the directory path in path.data in filebeat.yml

Hi Rios,

All components (Filebeat, Logstash, Elasticsearch, & Kibana) are running ok.

I'm in the integrations section in the console and selected Elasticsearch metrics (I hope this is the right option).

Do I just follow these steps:

  1. Download and install Metricbeat

  2. Edit the configuration

  3. Enable and configure the elasticsearch module

  4. Start Metricbeat and then check the status

Kind regards,

Justin

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