# Failed to load java.lang.IllegalStateException: failed to load plugin class \[org.elasticsearch.xpack.core.XPackPlugin\] and elastic serach certification

**URL:** <https://discuss.elastic.co/t/failed-to-load-java-lang-illegalstateexception-failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin-and-elastic-serach-certification/148076>\
**Category:** Elasticsearch\
**Created:** [September 11, 2018, 7:40am UTC](https://discuss.elastic.co/t/failed-to-load-java-lang-illegalstateexception-failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin-and-elastic-serach-certification/148076 "2018-09-11T07:40:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jyothi\_ca](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jyothi\_ca](https://discuss.elastic.co/u/jyothi_ca)\
**Post date:** [September 11, 2018, 7:40am UTC](https://discuss.elastic.co/t/failed-to-load-java-lang-illegalstateexception-failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin-and-elastic-serach-certification/148076/1 "2018-09-11T07:40:46Z")

</div>

Hello Everyone,

Could you please guide me w.r.t to below error message 🙂

, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.AY33SMYc, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:/var/log/elasticsearch/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch]  
[2018-09-11T01:35:05,929][ERROR][o.e.b.Bootstrap] Exception  
java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]  
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~  
... 15 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 java.util.HashMap.computeIfAbsent(HashMap.java:1127) ~[?:1.8.0\_181]  
at org.elasticsearch.xpack.core.ssl.SSLService.loadSSLConfigurations(SSLService.java:464) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.(SSLService.java:91) ~[?:?]  
at org.elasticsearch.xpack.core.XPackPlugin.(XPackPlugin.java:127) ~[?:?]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]  
at  
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/usr/share/elasticsearch/config/certs/elastic-certificates.p12" "read")  
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)  
[2018-09-11T01:35:05,940][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [SPLAWSDOPS06] 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) ~  
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.2.jar:6.2.2]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.2.jar:6.2.2]  
Caused by: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]  
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~  
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 java.util.HashMap.computeIfAbsent(HashMap.java:1127) ~[?:1.8.0\_181]  
at org.elasticsearch.xpack.core.ssl.SSLService.loadSSLConfigurations(SSLService.java:464) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.(SSLService.java:91) ~[?:?]  
at org.elasticsearch.xpack.core.XPackPlugin.(XPackPlugin.java:127) ~[?:?]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]  
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]  
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0\_181]  
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]  
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/usr/share/elasticsearch/config/certs/elastic-certificates.p12" "read")  
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0\_181]  
at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0\_181]  
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0\_181]  
at java.lang.SecurityManager.checkRead(SecurityManager.java:888) ~[?:1.8.0\_181]  
at sun.nio.fs.UnixChannelFactory.open(UnixChannelFactory.java:245) ~[?:?]  
at sun.nio.fs.UnixChannelFactory.newFileChannel(UnixChannelFactory.java:136) ~[?:?]  
at sun.nio.fs.UnixChannelFactory.newFileChannel(UnixChannelFactory.java:148) ~[?:?]  
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:212) ~ at java.util.HashMap.computeIfAbsent(HashMap.java:1127) ~[?:1.8.0\_181]  
at org.elasticsearch.xpack.core.ssl.SSLService.loadSSLConfigurations(SSLService.java:464) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.(SSLService.java:91) ~[?:?]  
at org.elasticsearch.xpack.core.XPackPlugin.(XPackPlugin.java:127) ~[?:?]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]  
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]

---

<div class="post-metadata">

**Author:** ![Albert\_Zaharovits](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/albert_zaharovits/32/24390_2.png) [@Albert\_Zaharovits](https://discuss.elastic.co/u/Albert_Zaharovits)\
**Post date:** [September 11, 2018, 7:58am UTC](https://discuss.elastic.co/t/failed-to-load-java-lang-illegalstateexception-failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin-and-elastic-serach-certification/148076/2 "2018-09-11T07:58:38Z")

</div>

Hello @jyothi_ca,

You have to move "/usr/share/elasticsearch/config/certs/elastic-certificates.p12" somewhere inside the conf directory ("-Des.path.conf=/etc/elasticsearch" in your case) and configure the cert path setting as a relative path to this dir.

HTH  
Albert

---

<div class="post-metadata">

**Author:** ![jyothi\_ca](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jyothi\_ca](https://discuss.elastic.co/u/jyothi_ca)\
**Post date:** [September 11, 2018, 9:35am UTC](https://discuss.elastic.co/t/failed-to-load-java-lang-illegalstateexception-failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin-and-elastic-serach-certification/148076/3 "2018-09-11T09:35:10Z")

</div>

we have changed path inside /ect/elasticserach/ path only certs folder and certificate we have placed , still ntoiced same error

we have noticed xpack plugins are not getting loaded and then certification issue.. both are occuring together

---

<div class="post-metadata">

**Author:** ![jyothi\_ca](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jyothi\_ca](https://discuss.elastic.co/u/jyothi_ca)\
**Post date:** [September 11, 2018, 9:46am UTC](https://discuss.elastic.co/t/failed-to-load-java-lang-illegalstateexception-failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin-and-elastic-serach-certification/148076/4 "2018-09-11T09:46:02Z")

</div>

we again added x-pack configuration setting details and restarted elastic serach service  
it is working fine .... Thank you

---

<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:** [October 9, 2018, 9:46am UTC](https://discuss.elastic.co/t/failed-to-load-java-lang-illegalstateexception-failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin-and-elastic-serach-certification/148076/5 "2018-10-09T09:46:05Z")

</div>

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