I've installed Elasticsearch using brew on macos Monterey
brew install elasticsearch
But I can't start the service
brew services start elasticsearch
brew info elasticsearch
This are the log
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
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:82)
CodePudding user response:
If you run:
brew info elasticsearch
You will see:
Deprecated because it is switching to an incompatible license. Check out
opensearch
instead!
So you should either use opensearch, which is:
a community-driven, open source search and analytics suite derived from Apache 2.0 licensed Elasticsearch 7.10.2 & Kibana 7.10.2.
or if you want to stay with Elasticsearch use the official installation method for macOS which consists of using a tar.gz:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.2-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.2-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-8.1.2-linux-x86_64.tar.gz.sha512
tar -xzf elasticsearch-8.1.2-linux-x86_64.tar.gz
cd elasticsearch-8.1.2/
alternatively you can use an official Docker image.