Ingest-attachment cannot be installed

Hi, when installing the ingest-attachment I get an error:

testuser@testvm:/usr/share/opensearch-1.0.0/bin$ sudo -u opensearch ./opensearch-plugin install ingest-attachment
→ Installing ingest-attachment
→ Downloading ingest-attachment from opensearch
→ Failed installing ingest-attachment
→ Rolling back ingest-attachment
→ Rolled back ingest-attachment
Exception in thread “main” java.io.IOException: Server returned HTTP response code: 403 for URL: https://artifacts.opensearch.org/releases/plugins/ingest-attachment/1.0.0/ingest-attachment-1.0.0.zip
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1932)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1528)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
at org.opensearch.plugins.InstallPluginCommand.downloadZip(InstallPluginCommand.java:438)
at org.opensearch.plugins.InstallPluginCommand.downloadAndValidate(InstallPluginCommand.java:515)
at org.opensearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:306)
at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:260)
at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:237)
at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:99)
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)
at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)
at org.opensearch.cli.Command.main(Command.java:103)
at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
testuser@testvm:/usr/share/opensearch-1.0.0/bin$

Is the problem know and how canI solve it?

Even when I try to connect to
https://artifacts.opensearch.org/
then I get an error message back …

1 Like

I believe this is a known issue that is currently being worked on.

So version 1.0 is released, but when installing its not allowed to install needed plugins to replace elasticsearch?

It should have been available the moment 1.0 was public but looks like there was an oversight. There is a pending request with the team that manages this part of the downloads - I’ll update when I know more or have a public place where the issue is being tracked.

You can track this issue here:

https://github.com/opensearch-project/opensearch-build/issues/86

Hi!

Similar issue here:

-> Installing ingest-attachment                                                                                                          
-> Downloading ingest-attachment from opensearch                                                                                         
[=================================================] 100%??                                                                               
-> Failed installing ingest-attachment                                                                                                   
-> Rolling back ingest-attachment                                                                                                        
-> Rolled back ingest-attachment                                                                                                         
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://artifacts.opensearch.org/release
s/plugins/ingest-attachment/1.0.0/ingest-attachment-1.0.0.zip.asc                                                                        
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1932)                            
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1528)                             
        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)                   
        at java.base/java.net.URL.openStream(URL.java:1167)                                                                              
        at org.opensearch.plugins.InstallPluginCommand.urlOpenStream(InstallPluginCommand.java:482)                                      
        at org.opensearch.plugins.InstallPluginCommand.verifySignature(InstallPluginCommand.java:622)                                    
        at org.opensearch.plugins.InstallPluginCommand.downloadAndValidate(InstallPluginCommand.java:600)                                
        at org.opensearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:306)                                           
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:260)                                            
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:237)                                            
        at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:99)                                           
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)                                                         
        at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)                                                                
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)                                                         
        at org.opensearch.cli.Command.main(Command.java:103)                                                                             
        at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)

I workaround it by downloading the file from https://artifacts.opensearch.org/release
s/plugins/ingest-attachment/1.0.0/ingest-attachment-1.0.0.zip and running:

bin/opensearch-plugin install file:///home/david/ingest-searchandmatchskills-7.10.0-0.0.1.zip
1 Like

I think this is a known issue now, to be fixed in 1.1.0

I might be missing something but I have just run the latest docker image (opensearchproject/opensearch:latest) and it doens’t seem to come with ingest-attachment installed?

Doing a PUT to _ingest/pipeline/attachment

I get a:

{
  error: {
    root_cause: [ [Object] ],
    type: 'parse_exception',
    reason: 'No processor type exists with name [attachment]',
    processor_type: 'attachment'
  },
  status: 400
}

Then i went to check if the instance had the plugin, and it doesn’t:

$ bin/opensearch-plugin list
opensearch-alerting
opensearch-anomaly-detection
opensearch-asynchronous-search
opensearch-cross-cluster-replication
opensearch-index-management
opensearch-job-scheduler
opensearch-knn
opensearch-observability
opensearch-performance-analyzer
opensearch-reports-scheduler
opensearch-security
opensearch-sql

I think it is included but not installed.

1 Like

Right!
I installed it with $ bin/opensearch-plugin install ingest-attachment
And now running $ bin/opensearch-plugin list shows it installed.

I did a $ docker-compose down and $ docker-compose up thinking it should be enough to restart opensearch, as mentioned in documentation that you should restart it after installing a plugin.

But that still didn’t get it to work.
I still get a 'No processor type exists with name [attachment]' and doing GET /_cat/plugins does not return ingest-attachment. :sweat:

I see that docker down/up definitely resets the installed plugins because after doing it, ingest-attachment is no longer listed with $ bin/opensearch-plugin list.

Ok i figured it out, i needed to actually create a custom docker image with the plugin installed.
For reference:

Dockerfile:

FROM opensearchproject/opensearch:latest
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch ingest-attachment

Change docker-compose.yml, from:

opensearch-node1:
  image: opensearchproject/opensearch-dashboards:latest

to:

opensearch-node1:
  build: . # points to ./Dockerfile
1 Like

Great stuff! Glad you got it working.

1 Like

@rui Hey, only 1.5 years later or so…

Did you have any issues with the dreaded 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 error with this custom image?

When I’m trying to build the custom image like this, it gives me that error.