Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when running the container with 'disableESLogger()' config #51

Open
cristibozga opened this issue Jun 19, 2023 · 2 comments
Open

NPE when running the container with 'disableESLogger()' config #51

cristibozga opened this issue Jun 19, 2023 · 2 comments
Labels

Comments

@cristibozga
Copy link

Hello.
I'm using the following config:

ElasticsearchClusterRunner.Configs configs = ElasticsearchClusterRunner.newConfigs()
               .clusterName("es-test")
               .numOfNode(1)
               .disableESLogger()
               .printOnFailure();

but when I start the runner I get a NPE:

Caused by: java.lang.NullPointerException: Cannot invoke "org.elasticsearch.logging.internal.spi.LoggerFactory.getLogger(java.lang.Class)" because the return value of "org.elasticsearch.logging.internal.spi.LoggerFactory.provider()" is null
	at org.elasticsearch.logging.LogManager.getLogger(LogManager.java:35)
	at org.elasticsearch.plugins.scanners.ExtensibleFileReader.<clinit>(ExtensibleFileReader.java:24)

I see that in the class ElsticsearchClusterRunner al the line 465 we skip the config of the logger, so LoggerFactory.provider() will return null.

I use Elasictsearch 8.7.1 and elasticsearch-cluster-runner 8.7.1.0

Thanks in advance

@marevol
Copy link
Contributor

marevol commented Jun 22, 2023

Do you use log4j 2.19.0?
Elasticsearch depends on it.

@cristibozga
Copy link
Author

yes, I use exactly that version of log4j.
but as I explained in my comment LoggerFactory.provider() will return null as the init of the logger is skipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants