安装elasticsearch分词器ik报错FileSystemException:elasticsearch/plugins/elasticsearch-analysis-ik解决方案

安装elasticsearch分词器ik报错:Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/plugins/elasticsearch-analysis-ik-7.4.2.zip/plugin-descriptor.properties: Not a directory 解决方案

  • 问题背景
  • 解决方案
  • 总结
  • Lyric: 仔细听 几个半音 有点拉丁 有点热情

解决方案)

问题背景

在安装elasticsearch的分词器ik的时候报错:
容器里面查询

elasticsearch-plugin list
elasticsearch-analysis-ik-7.4.2.zip
Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/plugins/elasticsearch-analysis-ik-7.4.2.zip/plugin-descriptor.properties: Not a directory
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:374)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:425)
	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
	at java.base/java.nio.file.Files.newInputStream(Files.java:159)
	at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:156)
	at org.elasticsearch.plugins.ListPluginsCommand.printPlugin(ListPluginsCommand.java:66)
	at org.elasticsearch.plugins.ListPluginsCommand.execute(ListPluginsCommand.java:60)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:77)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
	at org.elasticsearch.cli.Command.main(Command.java:90)
	at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)

解决方案

从报错看出elasticsearch-analysis-ik-7.4.2.zip: Not a directory,这个安装包不是一个文件夹,elasticsearch的plugins下面只能放着的是一个个文件夹插件,所以把elasticsearch-analysis-ik-7.4.2.zip删除就可以了

rm -rf elasticsearch-analysis-ik-7.4.2.zip

总结

多看报错信息




作为程序员第 202 篇文章,每次写一句歌词记录一下,看看人生有几首歌的时间,wahahaha …

Lyric: 仔细听 几个半音 有点拉丁 有点热情

你可能感兴趣的:(elasticsearch,搜索引擎,大数据)