# Can't install x-pack for logstash 6.0

**URL:** <https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733>\
**Category:** Logstash\
**Created:** [October 20, 2017, 4:11pm UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733 "2017-10-20T16:11:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cornoualis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cornoualis/32/23246_2.png) [@Cornoualis](https://discuss.elastic.co/u/Cornoualis)\
**Post date:** [October 20, 2017, 4:11pm UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/1 "2017-10-20T16:11:50Z")

</div>

Hi,

I tried to install x-pack for logstash 6.0 using the command "logstash-plugin install x-pack" and I have the following errors:

```
⇒ ./logstash-plugin install x-pack                                                              
Java HotSpot(TM) 64-Bit Server VM warning: Option UseParNewGC was deprecated in version 9.0 and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.io.FilenoUtil to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of org.jruby.util.io.FilenoUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
LoadError: load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
  require at org/jruby/RubyKernel.java:955
  require at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
   <main> at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/openssl.rb:1
  require at org/jruby/RubyKernel.java:955
   (root) at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
   <main> at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
  require at org/jruby/RubyKernel.java:955
   (root) at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/security.rb:12
   <main> at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
  require at org/jruby/RubyKernel.java:955
  require at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
   <main> at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/package.rb:44
  require at org/jruby/RubyKernel.java:955
   (root) at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
   <main> at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/vendor/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59

```

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 25, 2017, 4:05am UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/2 "2017-10-25T04:05:48Z")

</div>

What java version are you running?

---

<div class="post-metadata">

**Author:** ![Cornoualis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cornoualis/32/23246_2.png) [@Cornoualis](https://discuss.elastic.co/u/Cornoualis)\
**Post date:** [October 25, 2017, 9:09am UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/3 "2017-10-25T09:09:25Z")

</div>

java -version

java version "9"  
Java(TM) SE Runtime Environment (build 9+181)  
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [October 25, 2017, 9:25am UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/4 "2017-10-25T09:25:54Z")

</div>

We do not currently support running Logstash or Elasticsearch on Java 9.

[https://www.elastic.co/support/matrix#matrix\_jvm](https://www.elastic.co/support/matrix#matrix_jvm)

Although the matrix doesn't list 6.0 yet (because it's not officially released), it will not support Java 9 in the initial release.

---

<div class="post-metadata">

**Author:** ![Cornoualis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cornoualis/32/23246_2.png) [@Cornoualis](https://discuss.elastic.co/u/Cornoualis)\
**Post date:** [October 25, 2017, 2:41pm UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/5 "2017-10-25T14:41:07Z")

</div>

Thank you Tim!

---

<div class="post-metadata">

**Author:** ![Cornoualis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cornoualis/32/23246_2.png) [@Cornoualis](https://discuss.elastic.co/u/Cornoualis)\
**Post date:** [October 30, 2017, 12:26pm UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/6 "2017-10-30T12:26:30Z")

</div>

I tried again with a lower version of java (1.8.0\_152), and now I have the following errors:

⇒ ./logstash-plugin install x-pack  
Unhandled Java exception: java.lang.NullPointerException  
java.lang.NullPointerException: null  
put at java/util/Hashtable.java:460  
setProperty at java/util/Properties.java:166  
setProperty at java/lang/System.java:796  
invoke at java/lang/reflect/Method.java:498  
invokeDirectWithExceptionHandling at org/jruby/javasupport/JavaMethod.java:468  
invokeStaticDirect at org/jruby/javasupport/JavaMethod.java:370  
apply\_env\_proxy\_settings at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/lib/pluginmanager/proxy\_support.rb:40  
configure\_proxy at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/lib/pluginmanager/proxy\_support.rb:71  
 at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/lib/pluginmanager/main.rb:26  
runInterpreter at org/jruby/Ruby.java:845  
runInterpreter at org/jruby/Ruby.java:849  
runNormally at org/jruby/Ruby.java:752  
runNormally at org/jruby/Ruby.java:765  
runFromMain at org/jruby/Ruby.java:578  
doRunFromMain at org/jruby/Main.java:417  
internalRun at org/jruby/Main.java:305  
run at org/jruby/Main.java:232  
main at org/jruby/Main.java:204

---

<div class="post-metadata">

**Author:** ![Cornoualis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cornoualis/32/23246_2.png) [@Cornoualis](https://discuss.elastic.co/u/Cornoualis)\
**Post date:** [November 8, 2017, 4:42pm UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/7 "2017-11-08T16:42:52Z")

</div>

Any idea?

---

<div class="post-metadata">

**Author:** ![jordansissel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordansissel/32/44957_2.png) [@jordansissel](https://discuss.elastic.co/u/jordansissel)\
**Post date:** [November 13, 2017, 5:25pm UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/8 "2017-11-13T17:25:13Z")

</div>

The error you get is a bug which is masking a configuration problem, based on my testing.

Recommendation: Check your environment for any `HTTP_PROXY` or `HTTPS_PROXY` (or lowercase versions, `http_proxy` and `https_proxy`) and make sure the values in these environment variables are URLs.

The problem, I believe, is that you have an environment variable that is telling Logstash to use a HTTP proxy, but the value in this variable is not valid (according to logstash).

I can reproduce your error by doing this:

```auto
 http_proxy="something" bin/logstash-plugin install x-pack

```

This passes `http_proxy="something"` as an environmet variable. Logstash expects this value `something` to be a URL. In this case, it is not a URL.

The bug which obscures the configuration error:

The stack trace indicates (to me) that this NullPointerException happens while trying to set something on a Properties object.

The first stack entry with code we control is this:

> apply\_env\_proxy\_settings at /home/cornoualis/ElasticStack6/logstash-6.0.0-rc1/lib/pluginmanager/proxy\_support.rb:5408:

This line of code is:

```auto
  java.lang.System.setProperty("#{scheme}.proxyHost", settings[:host])

```

The error you get seems to be a bug, possibly due to configuration issues. the `settings[:host]` value is `nil` (null, in Java), and this causes Java to throw this exception.

Logstash takes the `http_proxy` environment variable and parses it as a URL, which succeeds, but makes the 'host' a nil/null value. (Weird).

I'll file a bug about this, but hopefully the details I gave above about how to resolve this will help you.

---

<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:** [December 11, 2017, 5:25pm UTC](https://discuss.elastic.co/t/cant-install-x-pack-for-logstash-6-0/104733/9 "2017-12-11T17:25:14Z")

</div>

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