在macos上启动Elasticsearch失败

6ju8rftf  于 2022-11-22  发布在  ElasticSearch
关注(0)|答案(3)|浏览(248)

我已经安装了Elasticsearch使用brew在macos Monterey

brew install elasticsearch

但我无法启动服务

brew services start elasticsearch

brew info elasticsearch

这是日志

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)
okxuctiv

okxuctiv1#

如果您执行:

brew info elasticsearch

您将看到:
已弃用,因为它正在切换到不兼容的许可证。请改用opensearch
因此,您应该使用opensearch,即:
这是一个社区驱动的开源搜索和分析套件,源自Apache 2.0许可的Elasticsearch 7.10.2和Kibana 7.10.2。
或者,如果您想继续使用Elasticsearch,请使用official installation method for macOS,它包含一个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/

或者,您可以使用正式Docker image

6rqinv9w

6rqinv9w2#

如果你在Mac M1架构上运行elastic,根据你运行elastic的方式,你可能需要设置这个属性:

xpack.ml.enabled=- false
sqyvllje

sqyvllje3#

适用于Mac用户

系统设置〉隐私与安全〉开发人员工具
选中/添加终端,并从终端启动ElasticSearch。

相关问题