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.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.

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 docker.elastic.co/elasticsearch/elasticsearch:6.8.23

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

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

But you need

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

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.