1

i'm trying to install xpack on a ELK-Stack. I will do this with 3 Dockerfiles. At this moment my Dockerfile look like this:

# 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

Every time, when I build the Dockerfile to an image, the Build Process stops here:

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

I think the install-process can't find the /x-pack-5.5.2.zip/plugin-descriptor.properties file.

The ZIP-structure look like this:

x-pack-5.5.2.zip

  • elasticsearch -content
  • Kibana -content
  • logstash -content

Does someone know a good Tutorial for this?

TheLegend31
  • 51
  • 2
  • 11

3 Answers3

1

I think this should install xpack plugin

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

xpack requires a licence, basic licence is free

M Ashraful A
  • 627
  • 6
  • 13
  • I tried this and I get the same stacktrace. I install xpack from the local ZIP, because our Proxy is tricky in my company.. I get the "latest" Version from elasticsearch from our own docker repository and the latest version of ES is 5.5.2. – TheLegend31 Oct 09 '17 at 08:39
  • i think since xpack have licence it will try to connect with elasctic – M Ashraful A Oct 09 '17 at 08:56
  • but they have a tutorial for this on their website, which describe an installation with the local ZIP: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/installing-xpack-es.html – TheLegend31 Oct 09 '17 at 09:05
1

Elastic's official Docker images already contain X-Pack in 5.x. Just pick the right image from https://www.docker.elastic.co.

xeraa
  • 10,456
  • 3
  • 33
  • 66
  • Thanks for u answer. My docker-deamon is behind a proxy and I'm not allowed to download the images directly from the hub. We have our own Repository and there aren't the newest images. But thank you for your answer! I will keep that. – TheLegend31 Oct 12 '17 at 11:52
1

I solved the problem:

In my question above you can see that i add the zip to the /usr/share/elasticsearch/plugins. The problem is, that elastics. can't open the zip from this directory.

My solution: Add the zip in a new or other directory and start the build-process again. In my case I added the zip in /usr/share/elasticsearch.

Greetings TheLegend31

TheLegend31
  • 51
  • 2
  • 11