# Can not be updated Lostash plugin if it is via a proxy

**URL:** https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334
**Category:** Logstash
**Created:** [January 30, 2019, 10:48am UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334 "2019-01-30T10:48:02Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![taku333](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taku333/32/40375_2.png) [@taku333](https://discuss.elastic.co/u/taku333)
#### Post date: [January 30, 2019, 10:48am UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334/1 "2019-01-30T10:48:02Z")

</div>

I try Logstash update 6.5.4 → 6.6.0.(Via proxy)  
The following error message will fail and fail.

ErrorMessage

```auto
Error Bundler::HTTPError, retrying 1/10
Could not fetch specs from https://rubygems.org/

```

But It will succeed if it does not go through the proxy.

Check the following and both 「HTTPS\_PROXY=http://」and 「HTTP\_PROXY=http://」 settings are done.  
[https://www.elastic.co/guide/en/logstash/current/working-with-plugins.html](https://www.elastic.co/guide/en/logstash/current/working-with-plugins.html)

Also, Elasticsearch has successfully updated plugins via a similar proxy.

Is there any procedure or mistake?

---

<div class="post-metadata">

### Author: ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)
#### Post date: [January 30, 2019, 11:45am UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334/2 "2019-01-30T11:45:02Z")

</div>

Is there a question here?

---

<div class="post-metadata">

### Author: ![taku333](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taku333/32/40375_2.png) [@taku333](https://discuss.elastic.co/u/taku333)
#### Post date: [January 30, 2019, 12:30pm UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334/3 "2019-01-30T12:30:07Z")

</div>

@pjanzen  
Thanks!  
Oh！I forgot to write.  
「Is there any procedure or mistake?」add

---

<div class="post-metadata">

### Author: ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)
#### Post date: [January 30, 2019, 12:36pm UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334/4 "2019-01-30T12:36:24Z")

</div>

Hi,

I am unsure what you mean here but I'll give it a go anyway.

Assuming your using linux, you open a terminal and you type:

```
export http_proxy=<your proxy server>
export https_proxy=<your proxy server>

```

That should be enough to connect to the outside world.  
_ **Please notice the lowercase of http\_proxy and https\_proxy.** _

In the same terminal you execute your upgrade commands.

I hope this helps,  
Paul.

---

<div class="post-metadata">

### Author: ![taku333](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taku333/32/40375_2.png) [@taku333](https://discuss.elastic.co/u/taku333)
#### Post date: [January 31, 2019, 2:27am UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334/5 "2019-01-31T02:27:36Z")

</div>

Thanks!!

I have all 4 combinations setup, http\_proxy, https\_proxy, HTTP\_PROXY, HTTPS\_PROXY.  
But Update failed.  
I can do curl/wget properly with the proxy.........

I also found a question of a similar event.

> [@Log stash plugin update failed with connection error](https://discuss.elastic.co/t/log-stash-plugin-update-failed-with-connection-error/34675):
>
> I have setup proxy and I can do curl/wget properly with the proxy. I have got both http and https proxy setup. I have also exported them to both lowercase and uppercase, e.g. https\_proxy and HTTPS\_PROXY. But still trying to update plugin fails: $ bin/plugin update logstash-input-beats ERROR: Updated Aborted, message: Connection refused - Connection refused Install works file. Is there a way to manually download the updates locally and install it?

It seems like a problem not solved here as well.

I have confirmed that the procedure is not wrong, so I will check the proxy settings.

---

<div class="post-metadata">

### Author: ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)
#### Post date: [January 31, 2019, 6:19am UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334/6 "2019-01-31T06:19:38Z")

</div>

You can try the following, edit the file

> /usr/share/logstash/bin/logstash-plugin

and where the line says export JRUBY append the following

> -J-Dhttp.proxyHost=\<proxy.server\> -J-Dhttp.proxyPort=\<proxy.port\>

That could work as well..

---

<div class="post-metadata">

### Author: ![taku333](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taku333/32/40375_2.png) [@taku333](https://discuss.elastic.co/u/taku333)
#### Post date: [February 1, 2019, 1:27am UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334/7 "2019-02-01T01:27:20Z")

</div>

@pjanzen  
Thank you very much！！！  
Once export to JRUBY\_OPTS, it succeeded.

This problem was solved. 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: [March 1, 2019, 1:27am UTC](https://discuss.elastic.co/t/can-not-be-updated-lostash-plugin-if-it-is-via-a-proxy/166334/8 "2019-03-01T01:27:26Z")

</div>

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