1

我正在尝试在 ELK-Stack 上安装 xpack。我将使用 3 个 Dockerfile 来执行此操作。此时我的 Dockerfile 看起来像这样:

# Orginal Image von elasticsearch laden
FROM docker.marksys.de/elasticsearch:latest
USER root

ADD ./x-pack-5.5.2.zip /usr/share/elasticsearch/plugins

RUN bin/elasticsearch-plugin install file:///usr/share/elasticsearch/plugins/x-pack-5.5.2.zip/
RUN elasticsearch

每次,当我将 Dockerfile 构建到图像时,构建过程都会在此处停止:

Exception in thread "main" java.lang.IllegalStateException: Could not load plugin descriptor for existing plugin [x-pack-5.5.2.zip]. Was the plugin built before 2.0?
    at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:334)
    at org.elasticsearch.plugins.InstallPluginCommand.jarHellCheck(InstallPluginCommand.java:518)
    at org.elasticsearch.plugins.InstallPluginCommand.verify(InstallPluginCommand.java:500)
    at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:543)
    at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:217)
    at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:201)
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
    at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
    at org.elasticsearch.cli.Command.main(Command.java:88)
    at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)
Caused by: java.nio.file.FileSystemException: /usr/share/elasticsearch/plugins/x-pack-5.5.2.zip/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:114)
    at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:331)
    ... 11 more

我认为安装过程找不到 /x-pack-5.5.2.zip/plugin-descriptor.properties 文件。

ZIP 结构如下所示:

x-pack-5.5.2.zip

  • 弹性搜索 - 内容
  • Kibana - 内容
  • logstash - 内容

有人知道这方面的好教程吗?

4

3 回答 3

1

我认为这应该安装 xpack 插件

RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install x-pack

xpack 需要许可证,基本许可证是免费的

于 2017-10-09T08:32:08.803 回答
1

Elastic 的官方 Docker 镜像在 5.x 中已经包含 X-Pack。只需从https://www.docker.elastic.co中选择正确的图像。

于 2017-10-11T00:21:18.480 回答
1

我解决了这个问题:

在我上面的问题中,您可以看到我将 zip 添加到 /usr/share/elasticsearch/plugins。问题是,那是弹性的。无法从此目录打开 zip。

我的解决方案:将 zip 添加到新目录或其他目录中,然后再次启动构建过程。就我而言,我在 /usr/share/elasticsearch 中添加了 zip。

问候 TheLegend31

于 2017-10-12T11:56:22.360 回答