# trustAnchors parameter must be non-empty

**URL:** <https://discuss.elastic.co/t/trustanchors-parameter-must-be-non-empty/131761>\
**Category:** Logstash\
**Created:** [May 14, 2018, 2:36pm UTC](https://discuss.elastic.co/t/trustanchors-parameter-must-be-non-empty/131761 "2018-05-14T14:36:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarlacpit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarlacpit/32/22567_2.png) [@sarlacpit](https://discuss.elastic.co/u/sarlacpit)\
**Post date:** [May 14, 2018, 2:36pm UTC](https://discuss.elastic.co/t/trustanchors-parameter-must-be-non-empty/131761/1 "2018-05-14T14:36:58Z")

</div>

Hi folks,

Using Ubuntu 18:04 LTS and the Elasticstack v6.1.3 and I seem to be running in to an error starting logstash:

```
/usr/share/logstash/bin/logstash --debug --path.settings /etc/logstash
OpenSSL::X509::StoreError: setting default path failed: the trustAnchors parameter must be non-empty
  set_default_paths at org/jruby/ext/openssl/X509Store.java:186
             <main> at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/jopenssl/load.rb:26
            require at org/jruby/RubyKernel.java:955
             <main> at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/openssl.rb:1
            require at org/jruby/RubyKernel.java:955
             <main> at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/openssl.rb:1
            require at org/jruby/RubyKernel.java:955
             <main> at /usr/share/logstash/logstash-core/lib/logstash/patches/stronger_openssl_defaults.rb:1
            require at org/jruby/RubyKernel.java:955
             <main> at /usr/share/logstash/logstash-core/lib/logstash/patches/stronger_openssl_defaults.rb:2
            require at org/jruby/RubyKernel.java:955
             <main> at /usr/share/logstash/logstash-core/lib/logstash/patches.rb:1
            require at org/jruby/RubyKernel.java:955
             <main> at /usr/share/logstash/lib/bootstrap/environment.rb:66

```

Java details:

```
java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

```

Can anyone offer any help please?

Thanks

Adam

---

<div class="post-metadata">

**Author:** ![sarlacpit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarlacpit/32/22567_2.png) [@sarlacpit](https://discuss.elastic.co/u/sarlacpit)\
**Post date:** [May 14, 2018, 7:56pm UTC](https://discuss.elastic.co/t/trustanchors-parameter-must-be-non-empty/131761/2 "2018-05-14T19:56:13Z")

</div>

I may have fixed this by removing openjdk (which appeared to have not installed correctly) will confirm.

---

<div class="post-metadata">

**Author:** ![Raptorbob](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Raptorbob](https://discuss.elastic.co/u/Raptorbob)\
**Post date:** [May 14, 2018, 11:34pm UTC](https://discuss.elastic.co/t/trustanchors-parameter-must-be-non-empty/131761/3 "2018-05-14T23:34:59Z")

</div>

I'm encountering the same issue on my 18.04 install since default-jre installs an incompatible version of java. Even with openjdk-8-jre, I get this error. Looking forward to see if you have a resolution.

---

<div class="post-metadata">

**Author:** ![sarlacpit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarlacpit/32/22567_2.png) [@sarlacpit](https://discuss.elastic.co/u/sarlacpit)\
**Post date:** [May 15, 2018, 10:49am UTC](https://discuss.elastic.co/t/trustanchors-parameter-must-be-non-empty/131761/4 "2018-05-15T10:49:49Z")

</div>

Hi Raptorbob,

Here is an output of my history, but doing this fixed it... Hopefully it'll work for you. I'd back up /usr/lib/jvm/\* before removing it though...

```
  208 dpkg --list | grep ii | grep java
  209 dpkg --list | grep ii | grep jdk # Get a list of install jdk packages
  210 dpkg --purge openjdk-11-jre-headless ca-certificates-java java-common libatk-wrapper-java libatk-wrapper-java-jni
  211 rm -rf /usr/lib/jvm/*
  212 dpkg --list | grep ii | grep java
  214 apt autoremove
  215 apt autoclean
  216 apt purge
  217 sudo reboot
  218 apt install openjdk-8-jdk

```

I hope this helps

---

<div class="post-metadata">

**Author:** ![pushock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pushock/32/31768_2.png) [@pushock](https://discuss.elastic.co/u/pushock)\
**Post date:** [May 31, 2018, 7:29am UTC](https://discuss.elastic.co/t/trustanchors-parameter-must-be-non-empty/131761/5 "2018-05-31T07:29:29Z")

</div>

I have fixed this issue by removing java certificates and updating them:

```
sudo rm /etc/ssl/certs/java/cacerts 
sudo update-ca-certificates -f
```

---

<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:** [June 28, 2018, 7:29am UTC](https://discuss.elastic.co/t/trustanchors-parameter-must-be-non-empty/131761/6 "2018-06-28T07:29:31Z")

</div>

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