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

**URL:** <https://discuss.elastic.co/t/airgapped-install-of-plugin-fails-trying-to-access-artifacts-elastic-co/356781>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [April 4, 2024, 1:28pm UTC](https://discuss.elastic.co/t/airgapped-install-of-plugin-fails-trying-to-access-artifacts-elastic-co/356781 "2024-04-04T13:28:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SebastianThorn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastianthorn/32/133281_2.png) [@SebastianThorn](https://discuss.elastic.co/u/SebastianThorn)\
**Post date:** [April 4, 2024, 1:28pm UTC](https://discuss.elastic.co/t/airgapped-install-of-plugin-fails-trying-to-access-artifacts-elastic-co/356781/1 "2024-04-04T13:28:27Z")

</div>

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:

```auto
 > [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:

```bash
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](https://www.elastic.co/guide/en/logstash/current/offline-plugins.html)  
[Private Gem Repositories | Logstash Reference [8.13] | Elastic](https://www.elastic.co/guide/en/logstash/current/private-rubygem.html)

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

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

```

Best Regards  
Sebastian Thörn

---

<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:** [April 4, 2024, 1:28pm UTC](https://discuss.elastic.co/t/airgapped-install-of-plugin-fails-trying-to-access-artifacts-elastic-co/356781/2 "2024-04-04T13:28:27Z")

</div>

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](https://www.elastic.co/elasticsearch/opensearch) 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: )

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 4, 2024, 1:40pm UTC](https://discuss.elastic.co/t/airgapped-install-of-plugin-fails-trying-to-access-artifacts-elastic-co/356781/3 "2024-04-04T13:40:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SebastianThorn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastianthorn/32/133281_2.png) [@SebastianThorn](https://discuss.elastic.co/u/SebastianThorn)\
**Post date:** [April 4, 2024, 1:58pm UTC](https://discuss.elastic.co/t/airgapped-install-of-plugin-fails-trying-to-access-artifacts-elastic-co/356781/4 "2024-04-04T13:58:00Z")

</div>

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](https://www.elastic.co/guide/en/logstash/current/private-rubygem.html) 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

---

<div class="post-metadata">

**Author:** ![SebastianThorn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastianthorn/32/133281_2.png) [@SebastianThorn](https://discuss.elastic.co/u/SebastianThorn)\
**Post date:** [April 5, 2024, 8:30am UTC](https://discuss.elastic.co/t/airgapped-install-of-plugin-fails-trying-to-access-artifacts-elastic-co/356781/5 "2024-04-05T08:30:57Z")

</div>

@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`

```bash
 > [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

---

<div class="post-metadata">

**Author:** ![SebastianThorn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastianthorn/32/133281_2.png) [@SebastianThorn](https://discuss.elastic.co/u/SebastianThorn)\
**Post date:** [April 5, 2024, 10:25am UTC](https://discuss.elastic.co/t/airgapped-install-of-plugin-fails-trying-to-access-artifacts-elastic-co/356781/6 "2024-04-05T10:25:56Z")

</div>

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.

```bash
LOGSTASH_PACK_URL=http://localhost:1234

```

This method handles the configuration: [repository.rb at main · elastic/logstash (github.com)](https://github.com/elastic/logstash/blob/main/lib/pluginmanager/pack_fetch_strategy/repository.rb#L33-L36)

Best Regards  
Sebastian Thörn
