Elasticsearch failing to start due to X-Pack

I am running Elasticsearch 5.4.0 in a Docker container, using Alpine 3.5 (based off official image), Elasticsearch is failing to start with the following error:

[2017-05-09T14:58:09,259][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [elk-es-master-02.dev] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Cannot run program "/usr/share/elasticsearch/plugins/x-pack/platform/linux-x86_64/bin/controller": error=2, No such file or directory
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.4.0.jar:5.4.0]
Caused by: org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Cannot run program "/usr/share/elasticsearch/plugins/x-pack/platform/linux-x86_64/bin/controller": error=2, No such file or directory
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:179) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.4.0.jar:5.4.0]
	... 6 more
Caused by: java.io.IOException: Cannot run program "/usr/share/elasticsearch/plugins/x-pack/platform/linux-x86_64/bin/controller": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) ~[?:1.8.0_121]
	at org.elasticsearch.bootstrap.Spawner.spawnNativePluginController(Spawner.java:120) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Spawner.spawnNativePluginControllers(Spawner.java:99) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:167) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.4.0.jar:5.4.0]
	... 6 more
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method) ~[?:1.8.0_121]
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) ~[?:1.8.0_121]
	at java.lang.ProcessImpl.start(ProcessImpl.java:134) ~[?:1.8.0_121]
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_121]
	at org.elasticsearch.bootstrap.Spawner.spawnNativePluginController(Spawner.java:120) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Spawner.spawnNativePluginControllers(Spawner.java:99) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:167) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.4.0.jar:5.4.0]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.4.0.jar:5.4.0]    

Everything was working 5.3.x without an issue, but 5.4.0 will not start. Removing x-pack allows Elasticsearch to start without issue. I have verified that /usr/share/elasticsearch/plugins/x-pack/platform/linux-x86_64/bin/controller exists, I can run stat and everything looks good, permissions are good, the file exists, but the system doesn't think so.

/usr/share/elasticsearch # stat /usr/share/elasticsearch/plugins/x-pack/platform/linux-x86_64/bin/controller
File: /usr/share/elasticsearch/plugins/x-pack/platform/linux-x86_64/bin/controller
Size: 73656     	Blocks: 144        IO Block: 4096   regular file
Device: 40h/64d	Inode: 533         Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2017-05-09 14:57:07.000000000
Modify: 2017-05-09 14:57:07.000000000
Change: 2017-05-09 14:57:15.000000000

Hi Aaron,

The problem you've run into is that Machine Learning won't run on Alpine linux. I recommend you try the new Centos 7 based docker image. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

You will find some useful information in this github issue https://github.com/elastic/elasticsearch/issues/24508

I'm not sure that's the same issue as reported in the github issue. The error I am receiving does not refer to Machine Leaarning, as it does for the other user.

I had come across that earlier and added xpack.ml.enabled: false to my elasticsearch.yml file, but it did not change the error I am seeing.

I can try out the CentOS image, but would prefer to stay with Alpine.

Now seeing that Alpine is not a supported OS by Elastic, I will likely change to CentOS to prevent further problems in the future.

https://www.elastic.co/support/matrix

Thanks for posting this, I was bashing my head trying to figure out why it was working in 5.3 but not 5.4.

Is it still possible to install a single plugin as all I want is monitoring or do I need to install X-pack?

If you want to run X-Pack on Alpine Linux without machine learning then you need to delete the machine learning native code after installing X-Pack, for example rm -rf $ES_HOME/plugins/x-pack/platform/linux-x86_64. Then also set xpack.ml.enabled: false in elasticsearch.yml.

Obviously this is an unsupported configuration but it should get you back to where you were with 5.3.

1 Like

Thanks.

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