Logstash: Startup error Logstash (OpenSSL::X509::StoreError)

Created on 12 May 2018  路  5Comments  路  Source: elastic/logstash

I have installed Logstash and I try to run it with a command: sudo /usr/share/logstash/bin/logstash.
But I get a startup error:
[ERROR] 2018-05-12 20:54:15.228 [main] Logstash - java.lang.IllegalStateException: org.jruby.exceptions.RaiseException: (OpenSSL::X509::StoreError) setting default path failed: the
trustAnchors parameter must be non-empty.

  • Version: 6.2.4
  • Ubuntu 18.04
  • Config File:
input {
  kafka {
    bootstrap_servers = "localhost:9092"
    topics = ["cpu_metrics"]
    enable_auto_commit = "true"
    type = "cpu"
  }
}
output {
  if [type] == "cpu" {
    file {
      path => "/home/cpu/cpu.log"
    }
   }
}
P3 bug

Most helpful comment

i had the same problem and the past solution didn't work for me i found this out:
1- find the current java version using the following command

sudo update-alternatives --display java

2-you should get result like that

link currently points to /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

3-use the following command

cd  /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security

4- use the following command

ln -fs /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/cacerts

it should work now

All 5 comments

Is there a stack trace alongside that error? Can you share more of the log output?

Hello, I am having the same issue, with the same version and O.S.

$ ./logstash -e 'input { stdin { } } output { stdout {} }'
[ERROR] 2018-05-18 07:45:58.226 [main] Logstash - java.lang.IllegalStateException: org.jruby.exceptions.RaiseException: (OpenSSL::X509::StoreError) setting default path failed: the trustAnchors parameter must be non-empty

That's all, any suggestion?

Edit: Fixed with this comment: https://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty#comment87650897_50103533

I ran sudo rm /etc/ssl/certs/java/cacerts and then sudo update-ca-certificates -f and this fixed my issue in kubuntu 18.04.

@LipatovNikita check the thread.

It's unbelievable, it fixed the problem!
Thank you very much!

i had the same problem and the past solution didn't work for me i found this out:
1- find the current java version using the following command

sudo update-alternatives --display java

2-you should get result like that

link currently points to /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

3-use the following command

cd  /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security

4- use the following command

ln -fs /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/cacerts

it should work now

in windows, 10 am facing the same issue what is the resolution in windows 10?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

scheung38 picture scheung38  路  5Comments

marcinpm picture marcinpm  路  3Comments

amodakvnera picture amodakvnera  路  3Comments

dorj1234 picture dorj1234  路  3Comments

simmel picture simmel  路  4Comments