Can't install x-pack for logstash 6.0

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!

What java version are you running?

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)

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

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.

Thank you Tim!

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

Any idea?

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:

 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:

  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.

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