How can we install elastic as windows service

I know how to host kibana & ES on command prompt . But we need to install ES & Kibana on servers , and ensure that they start automatically when the server restarts .

I hosted ES/Kibana on servers using command prompt , but the problem is when the server restarts the i have to again restart ES/Kibana everytime using command promt.

Probably this will help: https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html

I isntalled using msi installer . successfullly installed

but localhost:9200 gives no result

I checked in Services.msc the Elastic Search service is automatically getting stopped , whenever i start it

You need to check the logs.
Most of the time this is caused by a bad installation, for example bad installation of Java (JAVA_HOME not set correctly).

the log folder is empty .
I got some .NET errors in the event viewer :

Application: elasticsearch.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Elastic.ProcessHosts.Process.StartupException
at Elastic.ProcessHosts.Process.ProcessBase.HandleException(System.Exception)
at System.Reactive.ObserverBase1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnError(System.Exception) at System.Reactive.Observer1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnError(System.Exception)
at System.Reactive.Linq.ObservableImpl.AsObservable1+_[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnError(System.Exception) at System.Reactive.AutoDetachObserver1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnErrorCore(System.Exception)
at System.Reactive.ObserverBase1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnError(System.Exception) at Elastic.ProcessHosts.Process.ObservableProcess+<>c__DisplayClass22_0.<CreateProcessExitSubscription>b__0(System.Reactive.EventPattern1<System.Object>)
at System.Reactive.AnonymousSafeObserver`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnNext(System.__Canon)
at System.EventHandler.Invoke(System.Object, System.EventArgs)
at System.Diagnostics.Process.OnExited()
at System.Diagnostics.Process.RaiseOnExited()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(System.Object, Boolean)

I have not enough knowledge on Windows to be helpful. May be someone else?

Thanks David .. JAVA_HOME was the issue.. solved now..
so Elastic Search is now hosted as service
How do i host Kibana as Service .. there is no MSI installer available for it
I still need to start Kibana via command prompt.. every time when server restarts

I don't know. May be ask in #kibana channel?

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