# Unable to perform offline upgrade of logstash plugins

**URL:** <https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881>\
**Category:** Logstash\
**Created:** [April 12, 2018, 11:23pm UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881 "2018-04-12T23:23:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwmaas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bwmaas/32/29950_2.png) [@bwmaas](https://discuss.elastic.co/u/bwmaas)\
**Post date:** [April 12, 2018, 11:23pm UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/1 "2018-04-12T23:23:03Z")

</div>

I need to upgrade the logstash-input-s3 and logstash-output-s3 plugins on an environment disconnected from the internet. The offline server is running logstash v5.2.2.

Per the instructions [here](https://www.elastic.co/guide/en/logstash/5.2/offline-plugins.html) I installed logstash v5.2.2 on a machine with an internet connection, upgraded the two plugins, and ran the suggested command:

`/usr/share/logstash/bin/logstash-plugin prepare-offline-pack logstash-input-s3 logstash-output-s3 --overwrite`

This successfully produced a ZIP file which I uploaded to the offline machine. I then ran the next command suggested in the documentation:

`/usr/share/logstash/bin/logstash-plugin install file:///tmp/logstash-offline-plugins-5.2.2.zip`

This produces an error:

```auto
ERROR: An error occured when installing the: file:///tmp/logstash-offline-plugins-5.2.2.zip, to have more information about the error add a DEBUG=1 before running the command., message: You have requested:
  stud = 0.0.23

The bundle currently has stud locked at 0.0.22.
Try running `bundle update stud`

```

The server does not have Ruby installed and is not connected to the internet. If I look in the ZIP file I can see the correct stud gem is included. I tried the same procedure with v5.6.8 in a dev environment and got similar results, albeit with different gems having trouble. What do I need to resolve this?

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 13, 2018, 6:57am UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/2 "2018-04-13T06:57:58Z")

</div>

> [@bwmaas](#):
>
> stud = 0.0.23
> 
> The bundle currently has stud locked at 0.0.22.  
> Try running `bundle update stud`

version is not ok?

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [April 13, 2018, 10:33am UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/3 "2018-04-13T10:33:55Z")

</div>

In this case the dependency called `stud` is a common dependency to many plugins.

The problem is that you are only updating 2 plugins (S3 input and S3 output) out of the list of plugins that have `stud` as a dependency, locked at 0.0.22 or 0.0.18.

In LS 5.2.2...  
Plugins holding stud at 0.0.22

```auto
logstash-input-couchdb_changes
logstash-input-exec
logstash-input-ganglia
logstash-input-gelf
logstash-input-heartbeat
logstash-input-http_poller
logstash-input-imap
logstash-input-irc
logstash-input-pipe
logstash-input-udp
logstash-input-rabbitmq
logstash-output-s3
logstash-output-rabbitmq

```

Plugins holding stud at 0.0.18

```auto
logstash-input-s3

```

The steps you need is:

1. Create an offline pack with all the above mentioned plugins in it.
2. On the offline machine, take a backup of the Logstash folder (where the Gemfile.jruby-1.9.lock file is)
3. Run the file based install as before.

If it fails report back the error message here.

---

<div class="post-metadata">

**Author:** ![bwmaas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bwmaas/32/29950_2.png) [@bwmaas](https://discuss.elastic.co/u/bwmaas)\
**Post date:** [April 13, 2018, 12:47pm UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/4 "2018-04-13T12:47:56Z")

</div>

Ran:

`bin/logstash-plugin prepare-offline-pack logstash-input-s3 logstash-output-s3 logstash-codec-plain logstash-input-couchdb_changes logstash-input-exec logstash-input-ganglia logstash-input-gelf logstash-input-heartbeat logstash-input-http_poller logstash-input-imap logstash-input-irc logstash-input-pipe logstash-input-udp logstash-input-rabbitmq logstash-output-rabbitmq --overwrite`

Note that I did _not_ upgrade the other plugins. Installing on offline machine produced same error as before.

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [April 13, 2018, 12:56pm UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/5 "2018-04-13T12:56:29Z")

</div>

OK. One last thing to try.

On the offline LS install, remove all the plugins in the offline pack then try the install as before (this is why the backup) if there is still an error, restore from backup.

The absolute last thing to do is:

1. Zip up the offline installation
2. Copy the zip file to an online machine.
3. Update the s3 input and outputs
4. Zip it up again, copy the zip file back and unzip over the old one.

The `rsync` utility might be useful to keep an online and offline installation in sync as well.

---

<div class="post-metadata">

**Author:** ![bwmaas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bwmaas/32/29950_2.png) [@bwmaas](https://discuss.elastic.co/u/bwmaas)\
**Post date:** [April 13, 2018, 12:58pm UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/6 "2018-04-13T12:58:53Z")

</div>

Thanks for all the help. I'll try this out in a couple hours.

---

<div class="post-metadata">

**Author:** ![bwmaas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bwmaas/32/29950_2.png) [@bwmaas](https://discuss.elastic.co/u/bwmaas)\
**Post date:** [April 13, 2018, 7:41pm UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/7 "2018-04-13T19:41:13Z")

</div>

Same error after uninstall. Trying the zip method.

---

<div class="post-metadata">

**Author:** ![bwmaas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bwmaas/32/29950_2.png) [@bwmaas](https://discuss.elastic.co/u/bwmaas)\
**Post date:** [April 13, 2018, 8:20pm UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/8 "2018-04-13T20:20:20Z")

</div>

Archive method seems to work. Thanks.

---

<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:** [May 11, 2018, 8:20pm UTC](https://discuss.elastic.co/t/unable-to-perform-offline-upgrade-of-logstash-plugins/127881/9 "2018-05-11T20:20:24Z")

</div>

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