Starting elasticsearch: Exception in thread “main” java.lang.IllegalStateException: Could not load p

  • Post author:
  • Post category:java


启动elasticsearch的时候报了如下错误:

Starting elasticsearch: Exception in thread “main” java.lang.IllegalStateException: Could not load plugin descriptor for existing plugin [ik.tgz]. Was the plugin built before 2.0?

Likely root cause: java.nio.file.FileSystemException: /data/esplugins/ik.tgz/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)



at java.nio.file.Files.newByteChannel(Files.java:407)



at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)



at java.nio.file.Files.newInputStream(Files.java:152)



at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:87)



at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:378)



at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:128)



at org.elasticsearch.node.Node.<init>(Node.java:158)



at org.elasticsearch.node.Node.<init>(Node.java:140)



at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)



at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)



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.

[FAILED]

解决方法:

从报错信息第二行可以看出data/esplugins/ik.tgz/plugin-descriptor.properties: Not a directory,说明没找到这个文件。cd到data/esplugins/下,看到有两个文件,一个是之前下载的ik.tgz,一个是解压完的ik,系统将ik.tgz当成了需要的文件了,但这并不是一个目录,所以把ik.tgz删掉,让系统能够找到ik就可以了。



版权声明:本文为huo_shaonan原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。