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

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:

< [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-6.8.23.jar:6.8.23]

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

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

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

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

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

at org.elasticsearch.bootstrap.Elasticsearch.main( ~[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( ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException( ~[?:?]
	at sun.nio.fs.UnixException.rethrowAsIOException( ~[?:?]
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel( ~[?:?]
	at java.nio.file.Files.newByteChannel( ~[?:?]
	at java.nio.file.Files.newByteChannel( ~[?:?]
	at java.nio.file.spi.FileSystemProvider.newInputStream( ~[?:?]
	at java.nio.file.Files.newInputStream( ~[?:?]
	at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readCertificates( ~[?:?]
	at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readCertificates( ~[?:?]
	at org.elasticsearch.xpack.core.ssl.PEMTrustConfig.createTrustManager( ~[?:?]
	at org.elasticsearch.xpack.core.ssl.SSLService.createSslContext( ~[?:?]
	at java.util.HashMap.computeIfAbsent( ~[?:?]
	at org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSSLConfigurations$4( ~[?:?]
	at java.util.HashMap.forEach( ~[?:?]
	at org.elasticsearch.xpack.core.ssl.SSLService.loadSSLConfigurations( ~[?:?]>

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

There's no open source version of 6.8.23 - Elasticsearch 6.8.23 | Elastic. Can you please confirm what you downloaded.

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

I am using this image:
docker pull

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

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

-'[ "/usr/share/elasticsearch/config/ca.pem" ]'

But you need


let me try, I tried that but after omiting path :slight_smile:

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.

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

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