Running as a Service on Windows

(Mario van Gemert) #1

I am running Elastic 5.1.1 and I am trying to run it as a service on Windows 10.

Did a: elasticsearch-service.bat install

Which was ok:
Installing service : "elasticsearch-service-x64"
Using JAVA_HOME (64-bit): "C:\Program Files\Java\jdk1.8.0_77"
The service 'elasticsearch-service-x64' has been installed.

I am able to start the manager: elasticsearch-service.bat manager

But I am unable to start Elastic as a service: elasticsearch-service.bat start
Failed starting 'elasticsearch-service-x64' service

Windows event log shows a:
The service Elasticsearch 5.1.1 (elasticsearch-service-x64) has stopped with the following specific service error:
Incorrect function. ID.7024

Anyone an idea how to run Elastic automatically as a a service?


Once the installation is successful, you can simply go to the service manager and start it from there and also you can change the start type to automatic.

(Mario van Gemert) #3

Tried that, does not work either. Same error message.


Did you check the logs? Most of the times, the log messages are clear enough to point out the reason. With windows, your common reasons will be heap size or swap file size. But start by looking at your "Elasticseach" log files.

(Mario van Gemert) #5

Thnx! Problem is solved. I had the bootstrap.memory_lock set to true. Turned it off at it starts just fine. Guess that if I want to set the bootstrap.memory_lock to true I have to adjust heap or swap file size first.


(system) #6

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