# Elasticsearch doesn't start anymore after x-pack settings

**URL:** <https://discuss.elastic.co/t/elasticsearch-doesnt-start-anymore-after-x-pack-settings/119200>\
**Category:** Elasticsearch\
**Created:** [February 9, 2018, 9:40am UTC](https://discuss.elastic.co/t/elasticsearch-doesnt-start-anymore-after-x-pack-settings/119200 "2018-02-09T09:40:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyl](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@dyl](https://discuss.elastic.co/u/dyl)\
**Post date:** [February 9, 2018, 9:40am UTC](https://discuss.elastic.co/t/elasticsearch-doesnt-start-anymore-after-x-pack-settings/119200/1 "2018-02-09T09:40:11Z")

</div>

Hello, I try to install X-pack in Elasticsearch following this link : [Configure TLS | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls.html)

When I add these 5 lines (See photo) to my elasticsearch.yml configuration file, elasticsearch crashes when it restarts (see photo). If I uncomment these lines, it works properly

elasticsearch.yml :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/1/b16030d4e3a277a12b1b9f24c25ee541cfbc7ffa.png)

service fail to load :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/4/f443fd18bb56b8d5471597df28a4088b96849100.png)

I don't understand this issue because I think I did the right thing :

> bin/x-pack/certutil ca  
> output file : elastic-stack-ca.p12  
> password for this file : test

> bin/x-pack/certutil cert --ca elastic-stack-ca.p12  
> desired output file : cert.p12  
> password for this file : test

And i've finally copyed elastic-stack-ca.p12 and cert.p12 into /etc/elasticsearch/certs.

...

This is the issue on elasticsearch log :

> [2018-02-09T10:24:07,081][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]  
> org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]  
> at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-6.2.0.jar:6.2.0]  
> at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.0.jar:6.2.0]  
> ...  
> **Caused by** : java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]  
> at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:543) ~[elasticsearch-6.2.0.jar:6.2.0]  
> at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:485) ~[elasticsearch-6.2.0.jar:6.2.0]  
> ...  
> ... 6 more  
> **Caused by** : java.lang.reflect.InvocationTargetException  
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]  
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]  
> ...  
> ... 6 more  
> **Caused by** : org.elasticsearch.ElasticsearchException: failed to initialize a TrustManagerFactory  
> at org.elasticsearch.xpack.core.ssl.StoreTrustConfig.createTrustManager(StoreTrustConfig.java:72) ~[?:?]  
> at org.elasticsearch.xpack.core.ssl.SSLService.createSslContext(SSLService.java:412) ~[?:?]  
> at org.elasticsearch.xpack.core.ssl.SSLService.loadSSLConfigurations(SSLService.java:448) ~[?:?]  
> ...  
> ... 6 more  
> **Caused by** : java.nio.file. **AccessDeniedException: /etc/elasticsearch/certs/cert.p12**  
> at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:?]  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:?]  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:?]  
> at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:?]  
> ....

Someone could help me ?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [February 9, 2018, 11:07am UTC](https://discuss.elastic.co/t/elasticsearch-doesnt-start-anymore-after-x-pack-settings/119200/2 "2018-02-09T11:07:40Z")

</div>

Moved to the x-pack forum

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [February 9, 2018, 11:25am UTC](https://discuss.elastic.co/t/elasticsearch-doesnt-start-anymore-after-x-pack-settings/119200/3 "2018-02-09T11:25:15Z")

</div>

Please provide configuration files and log messages as text, not screenshots.

What are the permissions on the `/etc/elasticsearch/certs/cert.p12` file?

---

<div class="post-metadata">

**Author:** ![dyl](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@dyl](https://discuss.elastic.co/u/dyl)\
**Post date:** [February 9, 2018, 2:53pm UTC](https://discuss.elastic.co/t/elasticsearch-doesnt-start-anymore-after-x-pack-settings/119200/4 "2018-02-09T14:53:45Z")

</div>

I just add chown 666 and it's good ! thx u 😃

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 12, 2018, 8:53am UTC](https://discuss.elastic.co/t/elasticsearch-doesnt-start-anymore-after-x-pack-settings/119200/5 "2018-02-12T08:53:41Z")

</div>

great you got it working!

you should probably not make it writable for everyone, though. Or even readable, and just allow the elasticsearch user to read it!

---

<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:** [March 12, 2018, 8:53am UTC](https://discuss.elastic.co/t/elasticsearch-doesnt-start-anymore-after-x-pack-settings/119200/6 "2018-03-12T08:53:45Z")

</div>

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