Airgapped install of plugin fails trying to access artifacts.elastic.co

Hello,

I'm trying to install a plugin behind an airgapped environment.
The environment has access to a private RubyGems-repository located in Artifactory.

I'm getting this error:

 > [config 4/5] RUN logstash-plugin install logstash-output-opensearch:
0.276 Using bundled JDK: /usr/share/logstash/jdk
68.14 ERROR: Something went wrong when installing logstash-output-opensearch, message: Failed to open TCP connection to artifacts.elastic.co:443 (execution expired)

To update the Gemfile I'm using the following:

sed -i 's/source .*/source "https:\/\/artifactory.corp.com:8443\/artifactory\/rubygems\/"/' Gemfile

What is artifacts.elastic.co:443 needed for?

I't was my understanding from reading these that the only access needed for an offline install is a RubyGems-repository?

Offline Plugin Management | Logstash Reference [8.13] | Elastic
Private Gem Repositories | Logstash Reference [8.13] | Elastic

When searching the docker-image i find the following reference in: lib/pluginmanager/pack_fetch_strategy/repository.rb

DEFAULT_PACK_URL = "https://artifacts.elastic.co/downloads/logstash-plugins"

Best Regards
Sebastian Thörn

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance. See What is OpenSearch and the OpenSearch Dashboard? | Elastic for more details.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

To install a logstash plugin on a machine without internet you need to follow the offline plugin management link you shared.

You will need to generate the offline package on a machine with internet, then transfer the zip file to the machine without internet and install using this zip file.

Hello,
thanks for the quick response.

In the doc it says:

This procedure requires a staging machine running Logstash that has access to a public or private Rubygems server. The staging machine downloads and packages all the files and dependencies required for offline installation.

I have a access to a private RubyGems-repository that work fine for regular gems.

  1. Make sure all the plugins that you want to package are installed on the staging server and that the staging server can access the Internet.

Is this referring to other sites?

It does not mention anything about artifacts.elastic.co:443
What is this used for?

Best Regards
Sebastian Thörn

@leandrojmp
I now also tried to install the file logstash-output-opensearch-2.0.2-java.gem and it still seems to need access to artifacts.elastic.co

 > [config 7/8] RUN logstash-plugin install /tmp/dist/logstash-output-opensearch-2.0.2-java.gem:
0.533 Using bundled JDK: /usr/share/logstash/jdk
71.82 ERROR: Something went wrong when installing /tmp/dist/logstash-output-opensearch-2.0.2-java.gem, message: Failed to open TCP connection to artifacts.elastic.co:443 (execution expired)

What is needed from artifacts.elastic.co?
Are there any additional resources from the internet that is needed?

Best Regards
Sebastian Thörn

It seems like logstash-plugin tries to look for the file at artifacts.elastic.co as default, even if you provide a local path.

Adding the environment-variable LOGSTASH_PACK_URL to something fixes the issue.

LOGSTASH_PACK_URL=http://localhost:1234

This method handles the configuration: repository.rb at main · elastic/logstash (github.com)

Best Regards
Sebastian Thörn