# Plugin installation failing

**URL:** <https://discuss.elastic.co/t/plugin-installation-failing/118270>\
**Category:** Elasticsearch\
**Created:** [February 2, 2018, 6:50pm UTC](https://discuss.elastic.co/t/plugin-installation-failing/118270 "2018-02-02T18:50:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankshad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankshad/32/11031_2.png) [@frankshad](https://discuss.elastic.co/u/frankshad)\
**Post date:** [February 2, 2018, 6:50pm UTC](https://discuss.elastic.co/t/plugin-installation-failing/118270/1 "2018-02-02T18:50:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [February 2, 2018, 7:09pm UTC](https://discuss.elastic.co/t/plugin-installation-failing/118270/2 "2018-02-02T19:09:05Z")

</div>

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:

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

```

---

<div class="post-metadata">

**Author:** ![frankshad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankshad/32/11031_2.png) [@frankshad](https://discuss.elastic.co/u/frankshad)\
**Post date:** [February 2, 2018, 7:30pm UTC](https://discuss.elastic.co/t/plugin-installation-failing/118270/3 "2018-02-02T19:30:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 2, 2018, 7:36pm UTC](https://discuss.elastic.co/t/plugin-installation-failing/118270/4 "2018-02-02T19:36:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![frankshad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankshad/32/11031_2.png) [@frankshad](https://discuss.elastic.co/u/frankshad)\
**Post date:** [February 2, 2018, 7:41pm UTC](https://discuss.elastic.co/t/plugin-installation-failing/118270/5 "2018-02-02T19:41:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [February 2, 2018, 7:52pm UTC](https://discuss.elastic.co/t/plugin-installation-failing/118270/6 "2018-02-02T19:52:17Z")

</div>

> [@frankshad](#):
>
> but it just says:
> 
> Downloading ingest-attachment from elastic

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 2, 2018, 7:52pm UTC](https://discuss.elastic.co/t/plugin-installation-failing/118270/7 "2018-03-02T19:52:22Z")

</div>

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