Run Kibana as Windows Service


#1

Hi,

I've recently upgraded Kibana to 4.3.0 from 4.0.2 and set it up as a backend service for Windows 7 using the following command line:
sc create "ElasticSearch-Kibana-4.3.0" binPath= "C:\experiment\kibana-4.3.0-windows\bin\kibana.bat" depend= "elasticsearch-service-x64"

However, the service does not start and following error is given :

"Windows could not start the ElasticSearch-Kibana-4.3.0 service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion. "

Although, Kibana is working fine if run from command line. Any idea why service is timed out during start up and how this can be fixed? this problem has never happened before with V4.0.2.

Thanks,

Landong Zuo


(Joe Fleming) #2

Stange. Maybe the startup script's timeout is too low? The process does take a few seconds to actually start.

Are you able to get any version of 4.2 to work? The underlying server logic between 4.0 and 4.3 is pretty different, but 4.2 and 4.3 are nearly identical.


(Ivan) #4

Hey, Landong
Have you solved this problem?


(Mark Van Der Harst) #5

Hi Ivan,

What i did is sc.exe create "Kibana 4.3.1" binPath=
"C:\Users\Administrator\Desktop\K4\bin\kibana.bat" in powershell and it
seems to work. Windows told me the service start failed, but kibana was running
anyways. After setting the service to start automatically, it even worked after
rebooting the Windows machine.

Other users seem to use NSSM (https://github.com/kirillkovalenko/nssm) for this, as described here https://www.ulyaoth.net/resources/tutorial-install-logstash-and-kibana-on-a-windows-server.34/
(in step 14). Sounded like it is more reliable like the "sc.exe create" approach, but
would need a third party tool.

I spoke with Elasticsearch support about this and they agree that there is a need for Windows server users for a Kibana windows service. But when this will be available they couldn't tell.


(Aaron Bauman) #6

Getting this issue with Kibana 5.1.1.

Joe, how do you change the startup script's timeout?


(Joe Fleming) #7

I was referring to the windows script startup time. The error message made it sound like the script didn't wait long enough for Kibana to start up. I don't really know anything about windows startup scripts though.

It's also possible that Kibana just isn't set up correctly to run as a Windows startup script. Based on what @Mark_van_der_Harst posted, it sounds like that is the case, and you'll have to use some tool to wrap Kibana and treat it as a service.

UPDATE: There's already an issue to track adding this feature to Kibana: https://github.com/elastic/kibana/issues/6218


(Vijaypalmanit) #8

better try this :
Running Kibana as a service in Windows - ELK Stack


(system) #9