# Plugin installation behind authenticated proxy is not working in Logstash version 5.5.0

**URL:** <https://discuss.elastic.co/t/plugin-installation-behind-authenticated-proxy-is-not-working-in-logstash-version-5-5-0/94632>\
**Category:** Logstash\
**Created:** [July 26, 2017, 11:54am UTC](https://discuss.elastic.co/t/plugin-installation-behind-authenticated-proxy-is-not-working-in-logstash-version-5-5-0/94632 "2017-07-26T11:54:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkpatel](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@lkpatel](https://discuss.elastic.co/u/lkpatel)\
**Post date:** [July 26, 2017, 11:54am UTC](https://discuss.elastic.co/t/plugin-installation-behind-authenticated-proxy-is-not-working-in-logstash-version-5-5-0/94632/1 "2017-07-26T11:54:42Z")

</div>

Hi all,

I am trying to install logstash-filter-plugin behind authenticated proxy and failed to do so. So far I have used following methods

```
Setting environment variable HTTP[S]_PROXY does not work with following error
Command :
JARS_SKIP='true' DEBUG=1 /usr/share/logstash/bin/logstash-plugin install logstash-filter-translate
Error:
URI::InvalidURIError: bad URI(is not URI?): http://user:password@proxy.com:8080
split at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/uri/common.rb:176
parse at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/uri/common.rb:210
parse at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/uri/common.rb:747
URI at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/uri/common.rb:994
extract_proxy_values_from_uri at /usr/share/logstash/lib/pluginmanager/proxy_support.rb:47
configure_proxy at /usr/share/logstash/lib/pluginmanager/proxy_support.rb:69
(root) at /usr/share/logstash/lib/pluginmanager/main.rb:26

```

2a. Using Jruby J-Dhttp proxy settings is also not working  
Command :  
JARS\_SKIP='true' JRUBY\_OPTS='-J-Dhttps.proxyHost=user:password@proxy.com -J-Dhttps.proxyPort=8080 -J-Dhttp.proxyHost=user:password:proxy.com -J-Dhttp.proxyPort=8080' DEBUG=1 /usr/share/logstash/bin/logstash-plugin install logstash-filter-translate  
Error :  
DEBUG: exec /usr/share/logstash/vendor/jruby/bin/jruby /usr/share/logstash/lib/pluginmanager/main.rb install logstash-filter-translate  
Looking if package named: logstash-filter-translate exists at [https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-translate/logstash-filter-translate-5.5.0.zip](https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-translate/logstash-filter-translate-5.5.0.zip)  
Network error, skipping Elastic pack, exception: initialize: name or service not known  
Validating logstash-filter-translate  
Unable to download data from [https://rubygems.org](https://rubygems.org) - SocketError: initialize: name or service not known ([https://rubygems.org/latest\_specs.4.8.gz](https://rubygems.org/latest_specs.4.8.gz))  
ERROR: Installation aborted, verification failed for logstash-filter-translate

On further diagnosis, I found that installer is sending a DNS query for "user:password@proxy.com" which is obviously failing due to malformed query.

2b. Command :  
JARS\_SKIP='true' JRUBY\_OPTS='-J-Dhttps.proxyHost=[proxy.com](http://proxy.com) -J-Dhttps.proxyPort=8080 -J-Dhttps.proxyUser=user -J-Dhttps.proxyPassword=password -J-Dhttp.proxyHost=[proxy.com](http://proxy.com) -J-Dhttp.proxyPort=8080 -J-Dhttp.proxyUser=user -J-Dhttp.proxyPassword=password' DEBUG=1 /usr/share/logstash/bin/logstash-plugin install logstash-filter-translate  
Error:  
DEBUG: exec /usr/share/logstash/vendor/jruby/bin/jruby /usr/share/logstash/lib/pluginmanager/main.rb install logstash-filter-translate  
Looking if package named: logstash-filter-translate exists at [https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-translate/logstash-filter-translate-5.5.0.zip](https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-translate/logstash-filter-translate-5.5.0.zip)  
Net::HTTPServerException: 407 "Proxy Authentication Required"  
error! at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:2641  
value at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:2650  
connect at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:796  
do\_start at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:756  
start at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:745  
start at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/net/http.rb:557  
start at /usr/share/logstash/lib/pluginmanager/utils/http\_client.rb:13  
remote\_file\_exist? at /usr/share/logstash/lib/pluginmanager/utils/http\_client.rb:31  
get\_installer\_for at /usr/share/logstash/lib/pluginmanager/pack\_fetch\_strategy/repository.rb:32  
create at /usr/share/logstash/lib/pluginmanager/install\_strategy\_factory.rb:18  
each at org/jruby/RubyArray.java:1613  
create at /usr/share/logstash/lib/pluginmanager/install\_strategy\_factory.rb:17  
execute at /usr/share/logstash/lib/pluginmanager/install.rb:30  
run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67  
execute at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11  
run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67  
run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132  
(root) at /usr/share/logstash/lib/pluginmanager/main.rb:48

Somehow, in this scenario it is not taking username and password settings.  
I tried older version too with no luck. Please guide me where I am wrong.

Thanks and Regards  
Lalit

---

<div class="post-metadata">

**Author:** ![lkpatel](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@lkpatel](https://discuss.elastic.co/u/lkpatel)\
**Post date:** [July 27, 2017, 6:55am UTC](https://discuss.elastic.co/t/plugin-installation-behind-authenticated-proxy-is-not-working-in-logstash-version-5-5-0/94632/2 "2017-07-27T06:55:36Z")

</div>

A kind of dirty hack, I provided proxy username and password directly into file vendor/jruby/lib/ruby/1.9/net/http.rb and got problem solved. In process learned ruby a little bit  
Thanks and Regards  
Lalit

---

<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:** [August 24, 2017, 6:56am UTC](https://discuss.elastic.co/t/plugin-installation-behind-authenticated-proxy-is-not-working-in-logstash-version-5-5-0/94632/3 "2017-08-24T06:56:02Z")

</div>

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