Can't install X-Pack in a offline machine if Elasticseach was installed by RPM

Hi all,

I follow this installation guide https://www.elastic.co/guide/en/elasticearch/reference/6.2/installing-xpack-es.html with Internet connection and all work fine.

But now I what to do the same with the downloading option running sudo bin/elasticsearch-plugin install file:///opt/x-pack-6.2.0.zip and throw this Exception:

Exception in thread "main" java.nio.file.NoSuchFileException: /usr/share/elasticsearch/plugins/.installing-7370119669088593600/plugin-descriptor.properties
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
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:123)
at org.elasticsearch.plugins.InstallPluginCommand.verify(InstallPluginCommand.java:532)
at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:601)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:215)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:204)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:75)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:48)

Kibana, Elastic and Logstash was all installed with RPM, but know the outgoing connection of the server was cut. Do I need to open it again or is some way to make this work?

1 Like

An offline install of 6.2 X-Pack on top of an RPM install of elasticsearch works for me on Linux. I did one a couple of hours ago. However, I do a "sudo su -" and then run all the rpm upgrades and plugin installs, rather than sudo'ing each step. I do not see why that would make a difference, though.

did you by any chance abort the plugin installation while it was being processed?

This directory should normally be removed when the installation processed is either finished or aborted, but that did not seem to happen. You can just delete that directory.

Is that behaviour reproducible if you retry to install the plugin in an offline environment?

Hello and thanks for your answers,

I install Elasticsearch, Kibana and Logstash in a machine with Internet. Then I clone the VM to another environment without Internet.

After that install the X-Pack on the first VM with Internet and work ok. Then try to install X-Pack offline I throw this exception.

@spinscale, the directory doesn't exists previews installation when I try, it try to read it or something. The plugin folder is empty before start installation.

Try also with sudo su - and have the same issue.

Hey,

can you take the cloning out of the equation and try on a regular Linux system? I was not able to reproduce this so far.

also which operating system/Linux distribution are you installing on, in order to try and reproduce better. Also did you just download the RPM or use the repository?

--Alex

Hey @spinscale,

uname -a Linux 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Operating system Linux/Centos 7.

I install all the other components using repository with yum install, not downloading it from the site.

What do you refer when you talk about a regular Linux system?, a Centos 7 looks like a regular Linux system to me.

I have the same problem. Can you please help us?

@Netanel_Malka can you also provide the exact command you typed in, plus the exact error message in a gist. That would be great. Thank you!

@matiasf I was referring to the cloning part of your description. Can we get that out of the equation, by installing parts just on an offline machine?

can you both share the output of find /usr/share/elasticsearch/ if possible, after the installation failed?

Also, just to make sure, you had more than enough space available on the disk that had mounted /usr/share?

Command:

/usr/share/elasticsearch/bin/elasticsearch-plugin install file:///root/installations/x-pack-6.2.1.zip

Error:
Gist

Hi,

Can I add a "this is happening to me too"?

Same OS - Centos 7
Same install method for Elasticsearch, kibana and logstash via RPM
Same offline install for X-Pack: bin/elasticsearch-plugin install x-pack

Adding the same error

# bin/elasticsearch-plugin install file:///root/x-pack-6.2.1.zip 
-> Downloading file:///root/x-pack-6.2.1.zip
[=================================================] 100%   
Exception in thread "main" java.nio.file.NoSuchFileException: 
/usr/share/elasticsearch/plugins/.installing-3557074685812837695/plugin-descriptor.properties
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
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:123)
at org.elasticsearch.plugins.InstallPluginCommand.verify(InstallPluginCommand.java:532)
at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:601)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:215)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:204)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:75)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:48)

just to be sure: you both are root I assume, not the elasticsearch user?

Hello @spinscale, yes it is root.

We enable the Internet connection and installation works perfect. I could make a workaround for this but I think this is some kind of issue.

hey,

I just had another user with this problem, in his example it turned out, that he had a different Elasticsearch version installed compared to the plugin he wanted to install (Elasticsearch was on 6.1, x-pack was 6.2).

Can you share the output of the following call:

find /usr/share/elasticsearch -type f

Thank you!

--Alex

1 Like

Hey @spinscale, this was the problem!

When I run 'find /usr/share/elasticsearch -type f' I found the Elasticsearch was /usr/share/elasticsearch/lib/elasticsearch-6.1.1.jar

And when I download it from the tutorial the link es https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-6.2.1.zip , when I try with https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-6.1.1.zip it works!

The error shown isn't help solving the problem.

Thanks a lot Alex.

hey,

indeed, the error message is super confusing due to internal plugin structure changes and will be fixed in the next release.

--Alex

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.