0

elasticsearch的版本为5.5.1,下载的zip包解压后,在mac上运行bin/elasticsearch后,报错如下:

[2017-08-12T22:09:46,437][INFO ][o.e.n.Node               ] [] initializing ...
[2017-08-12T22:09:46,495][INFO ][o.e.e.NodeEnvironment    ] [oM-PaQN] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [93.4gb], net total_space [464.7gb], spins? [unknown], types [hfs]
[2017-08-12T22:09:46,496][INFO ][o.e.e.NodeEnvironment    ] [oM-PaQN] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-08-12T22:09:46,497][INFO ][o.e.n.Node               ] node name [oM-PaQN] derived from node ID [oM-PaQNLTCOGi-IxCubSDw]; set [node.name] to override
[2017-08-12T22:09:46,497][INFO ][o.e.n.Node               ] version[5.5.1], pid[30585], build[19c13d0/2017-07-18T20:44:24.823Z], OS[Mac OS X/10.12.5/x86_64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_102/25.102-b14]
[2017-08-12T22:09:46,498][INFO ][o.e.n.Node               ] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/Users/nasuf/Project/elasticsearch-5.5.1]
[2017-08-12T22:09:46,508][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to initialize modules
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.5.1.jar:5.5.1]
Caused by: java.lang.IllegalStateException: Unable to initialize modules
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:123) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.node.Node.<init>(Node.java:312) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.node.Node.<init>(Node.java:244) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:232) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:232) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:351) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.5.1.jar:5.5.1]
    ... 6 more
Caused by: java.nio.file.FileSystemException: /Users/nasuf/Project/elasticsearch-5.5.1/modules/.DS_Store/plugin-descriptor.properties: Not a directory
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[?:?]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:?]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:?]
    at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:?]
    at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_102]
    at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0_102]
    at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[?:1.8.0_102]
    at java.nio.file.Files.newInputStream(Files.java:152) ~[?:1.8.0_102]
    at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:114) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.plugins.PluginsService.getModuleBundles(PluginsService.java:273) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:117) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.node.Node.<init>(Node.java:312) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.node.Node.<init>(Node.java:244) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:232) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:232) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:351) ~[elasticsearch-5.5.1.jar:5.5.1]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.5.1.jar:5.5.1]
    ... 6 more

我查看了/modules/.DS_Store这是一个文件,不是目录。
请问应该如何处理这个问题呢?谢谢啦

4个回答

0

已采纳

我是在mac下安装的。
find ./elasticsearch-5.6.1 -name .DS_Store
rm ./elasticsearch-5.6.1//.DS_Store
rm ./elasticsearch-5.6.1//plugins/.DS_Store

找到.DS_Store文件,删掉重启就可以了

0

https://github.com/elastic/el...
这应该是开发者的锅,他们在gitignore中没有包括.DS_Store 建议升级5.5.2

0

我下载的5.5.2 ,mac版也会有这个问题?咋解决

0

我也遇到这个问题,你把modules下的.DS_Store这个文件删除,就可以启动了

撰写答案