title: Failed to start elasticsearch service
body: <p>I am trying to start elasticsearch on windows.</p>
  
  <p>ES 5.0.0,
  JDK 1.8.0.66,
  Windows 10</p>
  
  <p>Service is installed properly but failed to start.</p>
  
  <pre><code>D:\Softwares\Elastic_Project\elasticsearch-5.0.0\bin&gt;elasticsearch-service install
  C:\Program Files\Java\jdk1.8.0_66
  Installing service : "elasticsearch-service-x64"
  Using JAVA_HOME (64-bit): "C:\Program Files\Java\jdk1.8.0_66"
  The service 'elasticsearch-service-x64' has been installed.
  
  D:\Softwares\Elastic_Project\elasticsearch-5.0.0\bin&gt;elasticsearch-service start
  C:\Program Files\Java\jdk1.8.0_66
  Failed starting 'elasticsearch-service-x64' service
  </code></pre>
  
  <p>Logs</p>
  
  <pre><code>[2016-11-24 14:21:19] [info] [11120] Commons Daemon procrun (1.0.15.0 64-bit) started
  [2016-11-24 14:21:20] [info] [11120] Starting service 'elasticsearch-service-x64' ...
  [2016-11-24 14:21:20] [info] [11572] Commons Daemon procrun (1.0.15.0 64-bit) started
  [2016-11-24 14:21:20] [info] [11572] Running 'elasticsearch-service-x64' Service...
  [2016-11-24 14:21:20] [info] [ 5916] Starting service...
  [2016-11-24 14:21:21] [info] [ 5916] Service started in 1487 ms.
  [2016-11-24 14:21:21] [info] [11572] Run service finished.
  [2016-11-24 14:21:21] [info] [11572] Commons Daemon procrun finished
  [2016-11-24 14:21:23] [error] [11120] Failed to start 'elasticsearch-service-x64' service
  [2016-11-24 14:21:23] [error] [11120] The data area passed to a system call is too small.
  [2016-11-24 14:21:23] [info] [11120] Start service finished.
  [2016-11-24 14:21:23] [error] [11120] Commons Daemon procrun failed with exit value: 5 (Failed to start service)
  [2016-11-24 14:21:23] [error] [11120] The data area passed to a system call is too small.
  </code></pre>
  
  <p>I have added JAVA_HOME in system variable. System logs</p>
  
  <pre><code>The Elasticsearch 5.0.0 (elasticsearch-service-x64) service terminated with the following service-specific error: 
  Incorrect function.
  </code></pre>
  
  <p>Any help ?</p>