Elasticsearch 6.2 service failed to start

We did Windows updates this month and are now getting these errors:

Windows Event Log:

The Elasticsearch 6.2.4 (elasticsearch-service-x64) service terminated with the following service-specific error:
Incorrect function.

And in the log files:

java.lang.IllegalArgumentException: unable to parse policy file file:/D:/Program%20Files/ElasticSearch/elasticsearchv6.2/modules/lang-expression/plugin-security.policy
at org.elasticsearch.bootstrap.Security.readPolicy(Security.java:254) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Security.getPluginPermissions(Security.java:194) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Security.configure(Security.java:123) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:208) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.4.jar:6.2.4]
Caused by: java.security.NoSuchAlgorithmException: JavaPolicy Policy not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:198) ~[?:1.8.0_242]
at java.security.Policy.getInstance(Policy.java:386) ~[?:1.8.0_242]
at org.elasticsearch.bootstrap.Security.readPolicy(Security.java:246) ~[elasticsearch-6.2.4.jar:6.2.4]
... 11 more

any ideas?

This is for an Azure DevOps Server installation.

We eventually tracked this down to an update to Zulu JRE on the machine. We had zulu8.44.0.11-ca-jre8.0.242-win_x64.msi installed. Rolling that back to what we previously had, zulu8.40.0.25-ca-jre8.0.222-win_x64.msi, fixed this issue for us.

My coworker took a look at this more in depth and found:

To upgrade Azul Zulu, the ElasticSearch service first has to be stopped. Once the Azul Zulu upgrade has completed, the ElasticSearch service can be started again.

This was accomplished using the elasticsearch-service.bat file, using the stop and start parameters.

After upgrading to Azul Zulu JRE 8.44.0.11 (8u242), the service started back up just fine.

Apparently upgrading while ElasticSearch is currently running breaks things, but upgrading after ElasticSearch stops works just fine. No upgrade of ElasticSearch itself was required.

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