Ingest-attachment not found

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

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,

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

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
If I try to download this file via browser, nothing happens. A download via wget also fails.

Interesting.

Try something like:

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?

Thank you. Halfway there. Still an error:

-> Failed installing 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
-> Downloading 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
-> Rolling back 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
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
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

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

But it gave me:

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) 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.

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
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...

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