# Failed to load plugin class \[org.elasticsearch.xpack.core.XPackPlugin\]

**URL:** <https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, docker\
**Created:** [February 7, 2022, 11:25pm UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531 "2022-02-07T23:25:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_Bhushan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_bhushan/32/42363_2.png) [@Ravi\_Bhushan](https://discuss.elastic.co/u/Ravi_Bhushan)\
**Post date:** [February 7, 2022, 11:25pm UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/1 "2022-02-07T23:25:37Z")

</div>

Hi All,  
I am trying to install Elasticsearch 6.8.23 Opensource version in Docker swarm. What I understand from document i that xpack is available in free version to implement node & http communication.  
Please correct me if I am wrong.

I have configured cert in pem format and coped all cert at /usr/share/Elasticsearch/config path and followed the document but getting below error:

```auto
< [2022-02-07T23:07:56,369][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [XXXXXX] 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:163) ~[elasticsearch-6.8.23.jar:6.8.23]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.8.23.jar:6.8.23]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.8.23.jar:6.8.23]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.8.23.jar:6.8.23]

at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.8.23.jar:6.8.23]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.8.23.jar:6.8.23]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.8.23.jar:6.8.23]

Caused by: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]>

then log also report error for file path
<Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config/["/usr/share/elasticsearch/config/ca.pem"]
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218) ~[?:?]
	at java.nio.file.Files.newByteChannel(Files.java:375) ~[?:?]
	at java.nio.file.Files.newByteChannel(Files.java:426) ~[?:?]
	at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420) ~[?:?]
	at java.nio.file.Files.newInputStream(Files.java:160) ~[?:?]
	at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readCertificates(CertParsingUtils.java:93) ~[?:?]
	at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readCertificates(CertParsingUtils.java:86) ~[?:?]
	at org.elasticsearch.xpack.core.ssl.PEMTrustConfig.createTrustManager(PEMTrustConfig.java:45) ~[?:?]
	at org.elasticsearch.xpack.core.ssl.SSLService.createSslContext(SSLService.java:394) ~[?:?]
	at java.util.HashMap.computeIfAbsent(HashMap.java:1224) ~[?:?]
	at org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSSLConfigurations$4(SSLService.java:448) ~[?:?]
	at java.util.HashMap.forEach(HashMap.java:1425) ~[?:?]
	at org.elasticsearch.xpack.core.ssl.SSLService.loadSSLConfigurations(SSLService.java:436) ~[?:?]>

```

Please let me know what I am missing or its not supported in free version of elastic.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 7, 2022, 11:39pm UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/2 "2022-02-07T23:39:07Z")

</div>

> [@Ravi\_Bhushan](#):
>
> What I understand from document i that xpack is available in free version to implement node & http communication.  
> Please correct me if I am wrong.

There's no open source version of 6.8.23 - [Elasticsearch 6.8.23 | Elastic](https://www.elastic.co/downloads/past-releases/elasticsearch-6-8-23). Can you please confirm what you downloaded.

> [@Ravi\_Bhushan](#):
>
> ```auto
> <Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config/["/usr/share/elasticsearch/config/ca.pem"]
> 
> ```

Are you sure you have things where you think they are?

---

<div class="post-metadata">

**Author:** ![Ravi\_Bhushan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_bhushan/32/42363_2.png) [@Ravi\_Bhushan](https://discuss.elastic.co/u/Ravi_Bhushan)\
**Post date:** [February 7, 2022, 11:48pm UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/3 "2022-02-07T23:48:08Z")

</div>

I am using this image:  
docker pull [docker.elastic.co/elasticsearch/elasticsearch:6.8.23](http://docker.elastic.co/elasticsearch/elasticsearch:6.8.23)

---

<div class="post-metadata">

**Author:** ![Ravi\_Bhushan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_bhushan/32/42363_2.png) [@Ravi\_Bhushan](https://discuss.elastic.co/u/Ravi_Bhushan)\
**Post date:** [February 7, 2022, 11:52pm UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/5 "2022-02-07T23:52:12Z")

</div>

Yes my all cert files are inside /usr/sahre/Elasticsearch/config path has proper permission for Elasticsearch user.

---

<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 8, 2022, 12:16am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/6 "2022-02-08T00:16:17Z")

</div>

> [@Ravi\_Bhushan](#):
>
> `/usr/share/elasticsearch/config/["/usr/share/elasticsearch/config/ca.pem"]`

My guess is that you've entered YAML syntax into an environment variable to configure Elasticsearch.  
That doesn't work.

I think you have something like this in your `docker-compose.yml`

```auto
- xpack.security.transport.ssl.certificate_authorities='["/usr/share/elasticsearch/config/ca.pem"]'

```

But you need

```auto
- xpack.security.transport.ssl.certificate_authorities="/usr/share/elasticsearch/config/ca.pem"

```

---

<div class="post-metadata">

**Author:** ![Ravi\_Bhushan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_bhushan/32/42363_2.png) [@Ravi\_Bhushan](https://discuss.elastic.co/u/Ravi_Bhushan)\
**Post date:** [February 8, 2022, 12:21am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/7 "2022-02-08T00:21:30Z")

</div>

let me try, I tried that but after omiting path 🙂

---

<div class="post-metadata">

**Author:** ![Ravi\_Bhushan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_bhushan/32/42363_2.png) [@Ravi\_Bhushan](https://discuss.elastic.co/u/Ravi_Bhushan)\
**Post date:** [February 8, 2022, 2:44am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/8 "2022-02-08T02:44:18Z")

</div>

Thanks I am able to resolve the issue.  
But now Elastic api is asking for credentials, Can't we use SSL communication without any type of authentication.

---

<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 8, 2022, 4:28am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/9 "2022-02-08T04:28:11Z")

</div>

> [@Ravi\_Bhushan](#):
>
> Can't we use SSL communication without any type of authentication.

SSL is part of Elasticsearch security. You cannot enable & disable them separately.  
However, you can enable anonymous access if you want.

---

<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 8, 2022, 4:28am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-core-xpackplugin/296531/10 "2022-03-08T04:28:16Z")

</div>

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