一尘不染

自制软件:无法开始elasticsearch

elasticsearch

我遇到了很大的麻烦,我无法启动Elasticsearch,我需要它来本地运行Rails,请告诉我发生了什么。我以正常方式安装Elasticsearch,然后执行以下操作:

elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml

但它显示以下错误: [2015-11-01 20:36:50,574][INFO ][bootstrap] es.config is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed.

我尝试了几种其他方式来运行它,例如:

elasticsearch -f -D

但是随后出现以下错误,并且找不到解决该问题的有用方法,它似乎与文件权限有关,但不确定:

java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" ClassLoader: sun.misc.Launcher$AppClassLoader@33909752
    at org.joda.time.tz.ZoneInfoProvider.openResource(ZoneInfoProvider.java:210)
    at org.joda.time.tz.ZoneInfoProvider.<init>(ZoneInfoProvider.java:127)
    at org.joda.time.tz.ZoneInfoProvider.<init>(ZoneInfoProvider.java:86)
    at org.joda.time.DateTimeZone.getDefaultProvider(DateTimeZone.java:514)
    at org.joda.time.DateTimeZone.getProvider(DateTimeZone.java:413)
    at org.joda.time.DateTimeZone.forID(DateTimeZone.java:216)
    at org.joda.time.DateTimeZone.getDefault(DateTimeZone.java:151)
    at org.joda.time.chrono.ISOChronology.getInstance(ISOChronology.java:79)
    at org.joda.time.DateTimeUtils.getChronology(DateTimeUtils.java:266)
    at org.joda.time.format.DateTimeFormatter.selectChronology(DateTimeFormatter.java:968)
    at org.joda.time.format.DateTimeFormatter.printTo(DateTimeFormatter.java:672)
    at org.joda.time.format.DateTimeFormatter.printTo(DateTimeFormatter.java:560)
    at org.joda.time.format.DateTimeFormatter.print(DateTimeFormatter.java:644)
    at org.elasticsearch.Build.<clinit>(Build.java:51)
    at org.elasticsearch.node.Node.<init>(Node.java:135)
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
[2015-11-01 20:40:57,602][INFO ][node                     ] [Centurius] version[2.0.0], pid[22063], build[de54438/2015-10-22T08:09:48Z]
[2015-11-01 20:40:57,605][INFO ][node                     ] [Centurius] initializing ...
Exception in thread "main" java.lang.IllegalStateException: failed to load bundle [] due to jar hell
Likely root cause: java.security.AccessControlException: access denied ("java.io.FilePermission" "/usr/local/Cellar/elasticsearch/2.0.0/libexec/antlr-runtime-3.5.jar" "read")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
    at java.security.AccessController.checkPermission(AccessController.java:884)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
    at java.util.zip.ZipFile.<init>(ZipFile.java:210)
    at java.util.zip.ZipFile.<init>(ZipFile.java:149)
    at java.util.jar.JarFile.<init>(JarFile.java:166)
    at java.util.jar.JarFile.<init>(JarFile.java:103)
    at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:173)
    at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:340)
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:113)
    at org.elasticsearch.node.Node.<init>(Node.java:144)
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.

谢谢你的帮助。


阅读 439

收藏
2020-06-22

共1个答案

一尘不染

libexecElasticsearch / homebrew安装有一些更改,这就是为什么它无法启动。目前正在研究PR
#45644。直到PR被接受,您才能使用相同的公式来修复Elasticsearch的安装。

首先卸载较早/较旧的版本。然后编辑Elasticsearch的公式:

$ brew edit elasticsearch

并使用PR中的公式

然后brew install elasticsearch,它应该可以正常工作。

要启动Elasticsearch,只需执行以下操作:

$ elasticsearch

config选项不再有效。对于自定义配置,请使用path.config

$ elasticsearch --path.conf=/usr/local/opt/elasticsearch/config
2020-06-22