elastic/logstash

Issue: setting default path failed: No password supplied for PKCS#12 KeyStore.

Closed this issue · 4 comments

Hey guys!

I'm trying to setup logstash with lumberjack. However, when I'm trying to run it I get following error:

root@log1:/etc/logstash/conf.d# sudo -u logstash /opt/logstash/bin/logstash -f 01-logstash.conf 
Java HotSpot(TM) 64-Bit Server VM warning: The UseParNewGC flag is deprecated and will likely be removed in a future release
The error reported is: 
  setting default path failed: No password supplied for PKCS#12 KeyStore.

This is my logstash configuration file

input {
  lumberjack {
    port => 5000
    type => "logs"
    ssl_certificate => "/etc/ssl/log1.pub"
    ssl_key => "/etc/ssl/log1.key"
  }
}

This is how I've generated my cert and key:

openssl req -x509 -newkey rsa:2048 -keyout /etc/ssl/log1.key -out /etc/ssl/log1.pub -nodes -days 365

Versions:

  • logstash 1.5.2
  • java 1.9.0-ea
  • new ubuntu installation 15.04

Any idea what is going on? Is this bug? Perhaps it is also worth mentioning that -t flag for testing configuration file gave me Configuration OK.

Cheers!

I have picked Java 1.8. and everything seems to be working,.. To pick java 1.8 on ubuntu first install it and then do this...

sudo update-alternatives --config javac
sudo update-alternatives --config java

Thanks for the feedback @otobrglez. We haven't tested on java 1.9 yet

acs commented

I am having the same issue but just starting the tool, without any config at all.

(acs@dellx) ~/devel/elastic/logstash/logstash-1.5.4 $ bin/logstash
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
Java HotSpot(TM) 64-Bit Server VM warning: The UseParNewGC flag is deprecated and will likely be removed in a future release
...
OpenSSL::X509::StoreError: setting default path failed: No password supplied for PKCS#12 KeyStore.
  set_default_paths at org/jruby/ext/openssl/X509Store.java:185
             (root) at /home/acs/devel/elastic/logstash/logstash-1.5.4/vendor/jruby/lib/ruby/shared/jopenssl/load.rb:22

The same problem in Ubuntu 15.04 64 bits using different versions of Java:

/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-9-oracle/bin/java

@otobrglez your java 1.8 that works is from Oracle or from OpenJDK?

It is hard to find this problem in Google so it seems to be pretty specific to a concrete configuration and using JRuby.

Same issue here, why is this closed?