Elasticsearch does not start

I am using the es 7.17.10 tarball from
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.10-linux-x86_64.tar.gz

The Java version I have is JDK 18

# /usr/java/latest/bin/java -version
openjdk version "18.0.2" 2022-07-19
OpenJDK Runtime Environment (build 18.0.2+9-61)
OpenJDK 64-Bit Server VM (build 18.0.2+9-61, mixed mode, sharing)

When I launch ES, I get:

# /usr/java/latest/bin/java -cp /usr/share/elasticsearch/lib/\*: org.elasticsearch.bootstrap.Elasticsearch
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
        at java.base/java.lang.System.setSecurityManager(System.java:416)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:83)

The same is true when I use the bundled JDK

# ./bin/elasticsearch
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
        at java.base/java.lang.System.setSecurityManager(System.java:416)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:83)

This is a clean setup with no existing data.
I need 7.x to help migrate data from 6.x. If I am able to get this node up, then I can migrate my data.

Any help or pointers would help.
Thanks

Hello @pan_sjan,

Welcome to the community!

It seems like this is an active bug, but there is a suggested solution there.

Perhaps this step-by-step will be helpful:

Downgrade from openjdk@18 to openjdk@17
brew uninstall --ignore-dependencies openjdk@18
brew install openjdk@17

Installing elasticsearch@6 upgrades openjdk to openjdk@18 to avoid that ignore dependencies while installing

brew install --ignore-dependencies elasticsearch@6

Make sure you don't have multiple versions of openjdk using brew list

Make sure you remove openjdk@18 otherwise ES will use 18.

Hope it helps!

Hi @pan_sjan Welcome to the community.

Exactly what OS are you on?

Thank you. JDK 17 works.

1 Like

CentOS 7.

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