# Trying to install X-Pack in my linux machine having a java based error

**URL:** https://discuss.elastic.co/t/trying-to-install-x-pack-in-my-linux-machine-having-a-java-based-error/134397
**Category:** Elasticsearch
**Created:** [June 4, 2018, 9:40am UTC](https://discuss.elastic.co/t/trying-to-install-x-pack-in-my-linux-machine-having-a-java-based-error/134397 "2018-06-04T09:40:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ashan1991](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ashan1991](https://discuss.elastic.co/u/ashan1991)
#### Post date: [June 4, 2018, 9:40am UTC](https://discuss.elastic.co/t/trying-to-install-x-pack-in-my-linux-machine-having-a-java-based-error/134397/1 "2018-06-04T09:40:34Z")

</div>

Hello everyone. I'm trying to install X-Pack on my machine, but seem like I'm having this Java-based issue. Any help would be much appreciated.

/elasticsearch-plugin install x-packException in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty  
at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:214)  
at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1974)  
at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1926)  
at java.base/sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1909)  
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1436)  
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)  
at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)  
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)  
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:163)  
at org.elasticsearch.plugins.InstallPluginCommand.urlExists(InstallPluginCommand.java:306)  
at org.elasticsearch.plugins.InstallPluginCommand.getElasticUrl(InstallPluginCommand.java:273)  
at org.elasticsearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:229)  
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:221)  
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:212)  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)  
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:75)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)  
at org.elasticsearch.cli.Command.main(Command.java:90)  
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:48)  
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty  
at java.base/sun.security.validator.PKIXValidator.(PKIXValidator.java:89)  
at java.base/sun.security.validator.Validator.getInstance(Validator.java:181)  
at java.base/sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:330)  
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:180)  
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:192)  
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:133)  
at java.base/sun.security.ssl.ClientHandshaker.checkServerCerts(ClientHandshaker.java:1947)  
at java.base/sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1777)  
at java.base/sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:264)  
at java.base/sun.security.ssl.Handshaker.processLoop(Handshaker.java:1098)  
at java.base/sun.security.ssl.Handshaker.processRecord(Handshaker.java:1026)  
at java.base/sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1137)  
at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074)  
at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)  
at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)  
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)  
... 15 more  
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty  
at java.base/java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)  
at java.base/java.security.cert.PKIXParameters.(PKIXParameters.java:120)  
at java.base/java.security.cert.PKIXBuilderParameters.(PKIXBuilderParameters.java:104)  
at java.base/sun.security.validator.PKIXValidator.(PKIXValidator.java:86)  
... 30 more

Thanks

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [June 4, 2018, 9:51am UTC](https://discuss.elastic.co/t/trying-to-install-x-pack-in-my-linux-machine-having-a-java-based-error/134397/2 "2018-06-04T09:51:55Z")

</div>

Hi Ashan,

It sounds like your Java installation is corrupt. Having no information or context on the specifics of your OS, we can't offer very specific suggestions. I would start by purging and reinstalling Java for your OS. If the problem persists, please share more information regarding your OS and the Java version.

---

<div class="post-metadata">

### Author: ![ashan1991](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ashan1991](https://discuss.elastic.co/u/ashan1991)
#### Post date: [June 4, 2018, 10:23am UTC](https://discuss.elastic.co/t/trying-to-install-x-pack-in-my-linux-machine-having-a-java-based-error/134397/3 "2018-06-04T10:23:56Z")

</div>

Thank you very much for the support. I have a Ubuntu MATE 18.04 LTS running on 4 nodes. I am actually trying to learning the Elastic Stack and X-Pack before moving in to my production installations.

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [June 4, 2018, 10:31am UTC](https://discuss.elastic.co/t/trying-to-install-x-pack-in-my-linux-machine-having-a-java-based-error/134397/4 "2018-06-04T10:31:32Z")

</div>

My suggestion still stands.

> [@ikakavas](#):
>
> I would start by purging and reinstalling Java for your OS.

You can look [here](https://linuxconfig.org/how-to-install-java-on-ubuntu-18-04-bionic-beaver-linux) for instance

---

<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: [July 2, 2018, 10:31am UTC](https://discuss.elastic.co/t/trying-to-install-x-pack-in-my-linux-machine-having-a-java-based-error/134397/5 "2018-07-02T10:31:33Z")

</div>

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