Failed starting 'elasticsearch-service-x64' service

(Navakanth B) #1

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 and but the issue is same

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

jvm.options are as follows

-Des.path.home=D:\Nava\New folder\elasticsearch-5.5.0
-Des.default.path.logs=D:\Nava\New folder\elasticsearch-5.5.0\logs\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 ( 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 ( 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]

(Jason Tedor) #2

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.

(Navakanth B) #3

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.

(Jason Tedor) #4

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.

(Navakanth B) #5

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

(Jason Tedor) #6

You're welcome.

(Navakanth B) #7

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

(Jason Tedor) #8

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

(Navakanth B) #9

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.

(Jason Tedor) #10

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
  2. Unzip the zip archive
  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

(system) #11

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