# Ingest-attachment not found

**URL:** <https://discuss.elastic.co/t/ingest-attachment-not-found/322150>\
**Category:** Elasticsearch\
**Created:** [December 29, 2022, 11:31am UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150 "2022-12-29T11:31:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhatCouldGoWrong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatcouldgowrong/32/115347_2.png) [@WhatCouldGoWrong](https://discuss.elastic.co/u/WhatCouldGoWrong)\
**Post date:** [December 29, 2022, 11:31am UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/1 "2022-12-29T11:31:30Z")

</div>

Hi,

I'm trying to install the ingest-attachment (using elasticsearch-plugin install ingest-attachment). I'm behind a proxy, so I use this line:

> sudo CLI\_JAVA\_OPTS="-Dhttp.proxyHost=192.168.0.1 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=192.168.0.1 -Dhttps.proxyPort=8080" ./elasticsearch-plugin install ingest-attachment

But this doesn't work (_Exception in thread "main" java.net.ConnectException: Connection timed out_). So I added --verbose, which shows me the attempt to download this file:  
[https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-linux-x86\_64-7.10.2.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-linux-x86_64-7.10.2.zip)

Checking this address in my browser or via wget shows: this file doesn't seem to exist.

Ho can I install ingest-attachment on Ubuntu 20.04.5 LTS anyway?

Best regards,

---

<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:** [December 29, 2022, 12:22pm UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/2 "2022-12-29T12:22:29Z")

</div>

Please upgrade your Elasticsearch version. At least to 7.17.8 but better to 8.5.3.

---

<div class="post-metadata">

**Author:** ![WhatCouldGoWrong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatcouldgowrong/32/115347_2.png) [@WhatCouldGoWrong](https://discuss.elastic.co/u/WhatCouldGoWrong)\
**Post date:** [December 29, 2022, 12:33pm UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/3 "2022-12-29T12:33:38Z")

</div>

Sorry, my bad. I did an upgrade. Now it tries to download this file here:  
[https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-linux-x86\_64-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-linux-x86_64-7.17.8.zip)  
If I try to download this file via browser, nothing happens. A download via wget also fails.

---

<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:** [December 29, 2022, 12:49pm UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/4 "2022-12-29T12:49:57Z")

</div>

Interesting.

Try something like:

```auto
sudo CLI_JAVA_OPTS="-Dhttp.proxyHost=192.168.0.1 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=192.168.0.1 -Dhttps.proxyPort=8080" ./elasticsearch-plugin install https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip

```

Does this work?

---

<div class="post-metadata">

**Author:** ![WhatCouldGoWrong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatcouldgowrong/32/115347_2.png) [@WhatCouldGoWrong](https://discuss.elastic.co/u/WhatCouldGoWrong)\
**Post date:** [December 29, 2022, 1:10pm UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/5 "2022-12-29T13:10:14Z")

</div>

> [@dadoonet](#):
>
> `sudo CLI_JAVA_OPTS="-Dhttp.proxyHost=192.168.0.1 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=192.168.0.1 -Dhttps.proxyPort=8080" ./elasticsearch-plugin install https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip`

Thank you. Halfway there. Still an error:

> -\> Failed installing [https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip)  
> Exception in thread "main" java.net.ConnectException: Connection timed out

But If I enter the address provided in my browser or use it with wget, the file gets downloaded. **So the address is correct**.

Here is the whole error-message:

> -\> Installing [https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip)  
> -\> Downloading [https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip)  
> -\> Failed installing [https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip)  
> -\> Rolling back [https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip)  
> -\> Rolled back [https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip)  
> Exception in thread "main" java.net.ConnectException: Connection timed out  
> at java.base/sun.nio.ch.Net.connect0(Native Method)  
> at java.base/sun.nio.ch.Net.connect(Net.java:579)  
> at java.base/sun.nio.ch.Net.connect(Net.java:568)  
> at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:576)  
> at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)  
> at java.base/java.net.Socket.connect(Socket.java:666)  
> at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)  
> at java.base/sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:181)  
> at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)  
> at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:531)  
> at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:636)  
> at java.base/sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264)  
> at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:378)  
> at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)  
> at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1241)  
> at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1127)  
> at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)  
> at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1661)  
> at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1585)  
> at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)  
> at org.elasticsearch.plugins.cli.InstallPluginAction.downloadZip(InstallPluginAction.java:478)  
> at org.elasticsearch.plugins.cli.InstallPluginAction.download(InstallPluginAction.java:342)  
> at org.elasticsearch.plugins.cli.InstallPluginAction.execute(InstallPluginAction.java:242)  
> at org.elasticsearch.plugins.cli.InstallPluginCommand.execute(InstallPluginCommand.java:88)  
> at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)  
> at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)  
> at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)  
> at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)  
> at org.elasticsearch.cli.Command.main(Command.java:77)  
> at org.elasticsearch.plugins.cli.PluginCli.main(PluginCli.java:36)

**Since the download via wget works: can I somehow install it manually?**  
Like so:

> cd ~  
> wget [https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip)  
> cd /usr/share/elasticsearch/bin  
> sudo ./elasticsearch-plugin install ~/ingest-attachment-7.17.8.zip

This doesn't work yet:

> sudo ./elasticsearch-plugin install ~/ingest-attachment-7.17.8.zip  
> -\> Installing /home/myusername/ingest-attachment-7.17.8.zip  
> -\> Failed installing /home/myusername/ingest-attachment-7.17.8.zip  
> -\> Rolling back /home/myusername/ingest-attachment-7.17.8.zip  
> -\> Rolled back /home/myusername/ingest-attachment-7.17.8.zip  
> A tool for managing installed elasticsearch plugins
> 
> Non-option arguments:  
> command
> 
> Option Description
> 
> * * *
> 
> -E Configure a setting  
> -h, --help Show help  
> -s, --silent Show minimal output  
> -v, --verbose Show verbose output
> 
> ERROR: Unknown plugin /home/myusername/ingest-attachment-7.17.8.zip

---

<div class="post-metadata">

**Author:** ![WhatCouldGoWrong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatcouldgowrong/32/115347_2.png) [@WhatCouldGoWrong](https://discuss.elastic.co/u/WhatCouldGoWrong)\
**Post date:** [December 29, 2022, 1:29pm UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/6 "2022-12-29T13:29:08Z")

</div>

I tried to cheat and uploaded the zip-file on an internal webserver. After that, I ran:

> sudo ./elasticsearch-plugin install [https://mywordpressserver/wp-content/uploads/2022/12/ingest-attachment-7.17.8.zip](https://mywordpressserver/wp-content/uploads/2022/12/ingest-attachment-7.17.8.zip)

But it gave me:

> Exception in thread "main" java.net.UnknownHostException: mywordpressserver

---

<div class="post-metadata">

**Author:** ![WhatCouldGoWrong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatcouldgowrong/32/115347_2.png) [@WhatCouldGoWrong](https://discuss.elastic.co/u/WhatCouldGoWrong)\
**Post date:** [December 29, 2022, 2:38pm UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/7 "2022-12-29T14:38:44Z")

</div>

> [@WhatCouldGoWrong](#):
>
> Exception in thread "main" java.net.UnknownHostException: mywordpressserver

Another attempt with ip-address (sudo ./elasticsearch-plugin install [https://192.168.100.1/wp-content/uploads/2022/12/ingest-attachment-7.17.8.zip](https://192.168.100.1/wp-content/uploads/2022/12/ingest-attachment-7.17.8.zip)) comes to:

> Exception in thread "main" javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I have a valid domain-certificate with san-attributes (which means the ip-address is included), but I guess I would have to introduce my certificate authorities to the local java instance.

**And actually I wouldn't want to cheat like this but install it in a proper way. Downloading via wget and installing it manually would still be acceptable though.**

---

<div class="post-metadata">

**Author:** ![WhatCouldGoWrong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatcouldgowrong/32/115347_2.png) [@WhatCouldGoWrong](https://discuss.elastic.co/u/WhatCouldGoWrong)\
**Post date:** [December 29, 2022, 2:53pm UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/8 "2022-12-29T14:53:08Z")

</div>

Figured it out (using a pre-downloaded file):

> cd ~  
> wget [https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.17.8.zip)  
> cd /usr/share/elasticsearch/bin  
> sudo ./elasticsearch-plugin install file:///home/myusername/ingest-attachment-7.17.8.zip  
> sudo systemctl restart elasticsearch

Works now.  
Syntax for using local files during an installation is file:///path/to/file, not just the path/filename.

Best Regards,

PS: still no idea, why the setup wouldn't use my proxy...

---

<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:** [January 26, 2023, 2:53pm UTC](https://discuss.elastic.co/t/ingest-attachment-not-found/322150/9 "2023-01-26T14:53:36Z")

</div>

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