Elastic search doesnot bootstrap with 8.5.0

I have Elasticsearch service with version 8.5.0
When I try to invoke Elasticsearch.main from Java class, the following exception is thrown
Can you please help me to resolve that

Invoked call - Elasticsearch.main(args)

java.io.EOFException
	at org.elasticsearch.common.io.stream.InputStreamStreamInput.readByte(InputStreamStreamInput.java:47)
	at org.elasticsearch.common.io.stream.StreamInput.readBoolean(StreamInput.java:549)
	at org.elasticsearch.bootstrap.ServerArgs.<init>(ServerArgs.java:60)
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase1(Elasticsearch.java:117)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:62)

The same works for 8.2 version.
Are there any changes to be adapted?

Welcome!

What are you trying to do?
Elasticsearch is not built to be launched from another application. Could you clarify what are you trying to solve?

I have Elasticsearch service running with 8.2 version. I start it from ant file using pjava
Now when I upgrade the version of Elasticsearch to 8.5.0, I get the Exception.

This answers "how" but not "why".

Why do you want to do this?

And anyway, you should provide all details about how you are doing it and the full logs.

1 Like

Even I have a similar requirement to start the elasticsearch from ant file to control the life cycle of the elasticsearch programatically.

Exactly EOFException is what we see when we try to invoke main method of the elasticsearch

Any chance you can share a minimalistic example which helps to reproduce your problem?

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