Failed starting 'elasticsearch-service-x64' service

ES version: elasticsearch-5.5.0
Java version: 1.8.0_91
OS: Windows-7(64 bit)
Description: Could not start elasticsearch-service-x64 service, showing Failed starting 'elasticsearch-service-x64' service message in console when I run elasticsearch-service.bat start

I referred to Failed to start elasticsearch service · Issue #24187 · elastic/elasticsearch · GitHub and Failed to start elasticsearch service · Issue #21774 · elastic/elasticsearch · GitHub but the issue is same

JAVA_HOME in system variables is C:\Program Files\Java\jdk1.8.0_91

jvm.options are as follows

-Xms2g
-Xmx2g
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+DisableExplicitGC
-XX:+AlwaysPreTouch
-Xss1m
-Djava.awt.headless=true
-Dfile.encoding=UTF-8
-Djna.nosys=true
-Djdk.io.permissionsUseCanonicalPath=true
-Dio.netty.noUnsafe=true
-Dio.netty.noKeySetOptimization=true
-Dio.netty.recycler.maxCapacityPerThread=0
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true
-Dlog4j.skipJansi=true
-XX:+HeapDumpOnOutOfMemoryError
-Delasticsearch
-Des.path.home=D:\Nava\New folder\elasticsearch-5.5.0
-Des.default.path.logs=D:\Nava\New folder\elasticsearch-5.5.0\logs
-Des.default.path.data=D:\Nava\New folder\elasticsearch-5.5.0\data
-Des.default.path.conf=D:\Nava\New folder\elasticsearch-5.5.0\config

elasticsearch-service-x64.log file shows this message

[2017-07-18 19:11:17] [info] [17092] Service elasticsearch-service-x64 name Elasticsearch 5.5.0 (elasticsearch-service-x64)
[2017-07-18 19:11:18] [info] [17092] Service 'elasticsearch-service-x64' installed
[2017-07-18 19:11:18] [info] [17092] Commons Daemon procrun finished
[2017-07-18 19:11:25] [info] [ 2364] Commons Daemon procrun (1.0.15.0 64-bit) started
[2017-07-18 19:11:25] [info] [ 2364] Starting service 'elasticsearch-service-x64' ...
[2017-07-18 19:11:25] [info] [10024] Commons Daemon procrun (1.0.15.0 64-bit) started
[2017-07-18 19:11:25] [info] [10024] Running 'elasticsearch-service-x64' Service...
[2017-07-18 19:11:25] [info] [22144] Starting service...
[2017-07-18 19:11:28] [error] [ 2364] Failed to start 'elasticsearch-service-x64' service
[2017-07-18 19:11:28] [error] [ 2364] The data area passed to a system call is too small.
[2017-07-18 19:11:28] [info] [ 2364] Start service finished.
[2017-07-18 19:11:28] [error] [ 2364] Commons Daemon procrun failed with exit value: 5 (Failed to start service)
[2017-07-18 19:11:28] [error] [ 2364] The data area passed to a system call is too small.

elasticsearch-service-x64-stderr.log shows this message

2017-07-18 19:11:25 Commons Daemon procrun stderr initialized
The data area passed to a system call is too small.

elasticsearch-service-x64-stdout.log shows this message

2017-07-19 17:50:56 Commons Daemon procrun stdout initialized
starts elasticsearch

Option Description


-E Configure a setting
-V, --version Prints elasticsearch version information and exits
-d, --daemonize Starts Elasticsearch in the background
-h, --help show help
-p, --pidfile Creates a pid file in the specified path on start
-q, --quiet Turns off standard ouput/error streams logging in console
-s, --silent show minimal output
-v, --verbose show verbose output
ERROR: Positional arguments not allowed, found [start]

I think that you ran the wrong command, I think that you ran bin\elasticsearch.bat start and instead you should be running bin\elasticsearch-service.bat start.

No I am running it right, bin> elasticsearch-service.bat start.
When I do install elasticsearch-service-x64 is showing in the services and when I try to start it manually it is showing this message.

Well, something is not right here because these logs:

are exactly the error message that you would see if you executed bin\elasticsearch.bat start. The service does not pass start to the main method of Elasticsearch. Maybe you changed the Startup tab for the service? Can you execute bin\elasticsearch-service.bat manager and show the contents of the Arguments on the Startup tab? It should be empty, but maybe it contains start for you? I can reproduce your problem exactly if I put start there.

1 Like

@jasontedor worked, Thanks.
I dont know from where that start argument has come, I just downloaded the zip file and ran it

You're welcome.

Is there anyway I can remove that start argument from the command line, it is coming by default.
We do extracting and running the elastic from build.gradle so the service is not getting started until I invoke manager tool and remove that start argument

I'm not sure what you mean it's coming by default, it should not be. Can you please provide a reproduction?

As per my observation 'Start' argument is coming only when I install Elasticsearch-5.5.1 in a machine for first time, when I remove 'start', delete the service and install in the same machine issue is not reproducible.
Try unzipping and creating the elasticsearch service in a fresh VM you may find it.

Can you please be more explicit about the steps to reproduce? I tried with the Elasticsearch 5.5.1 zip download on a fresh Windows VM. Here are the steps I took:

  1. Download Elasticsearch 5.5.1 from https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.zip
  2. Unzip the zip archive elasticsearch-5.5.1.zip
  3. Run .\elasticsearch-5.5.1\bin\elasticsearch-service.bat install
  4. Run .\elasticsearch-5.5.1\bin\elasticsearch-service.bat manager
  5. Inspect the Startup tab; it was correct
  6. Run .\elasticsearch-5.5.1\bin\elasticsearch-service.bat start; Elasticsearch started fine

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