Plugin installation failing


(David Earl) #1

Hi, I'm trying to install the ingest-attachment plugin on an IPv6 only machine (it's actually a Raspberry Pi, so ARM processor, but I don't think that's the issue).

It hangs for ages and then says
Exception in thread "main" java.net.ConnectException: Connection timed out

I'm guessing the plugin installer (possibly Java jre) goes for a IPv4 connection by default; if so that would presumably be a bug.

However, if I knew where to get the .zip file for the plugin from I could install it from a file, but I can't see where the files come from. How can I find out? Can anyone tell me here?

Alternatively I have successfully installed it on another machine which does have IPv4. Can I just take the files in /usr/share/elasticsearch/plugins/ingest-attachment and put them in the same place on the new machine? Or is there more to it than that?

Thanks


(Ryan Ernst) #2

If you run the plugin command with -v you should see a message like Retrieving zip from SOMEURL.

Can I just take the files in /usr/share/elasticsearch/plugins/ingest-attachment and put them in the same place

This is not recommended. There is indeed more to it.

As to why it fails, elasticsearch just uses plan old URL in java to access the zip. So it is the jvm ipv4/6 handling that may be the problem. You could try adding the following to your jvm.options to force ipv6 only:

-Djava.net.preferIPv4Stack=false
-Djava.net.preferIPv6Addresses=true

(David Earl) #3

Thanks, that did indeed solve the problem. I did:

ES_JAVA_OPTS="-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true" bin/elasticsearch-plugin install ingest-attachment

and it worked. So that does indeed suggest there's a problem that could do with fixing (cURL, for example, does not have this problem; given the Java options fixes it, I guess this is a fundamental problem in the Java JRE, but I imagine you could work round it).

I did try -v earlier (I had to do it on the machine that does work, there's a chicken-and-egg problem on the one that hangs), but it just says:

Downloading ingest-attachment from elastic

which doesn't give the full URL.

Anyway, I have an installed plugin now, thank you.


(David Pilato) #4

The download link is also in the documentation : https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-attachment.html


(David Earl) #5

Ah, so it is. I was looking at the documentation for how to install plugins, rather than the specific plugin. That's very useful to know for future plugins, thank you.


(Ryan Ernst) #6

This is the "normal" level output. Right after that, when run with -v should be a message of the form I mentioned above. We print this out before we even create the URL object and try to stream the zip, so it should print regardless of whether the connection will hang.


(system) #7

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