Install Elasticsearch as a service - Windows

HI all,

I have a fresh installation of Elasticsearch 8.5 and Kibana 8.5 on my Windows Server.
I would like to install Elasticsearch as a Service that it gets started as soon as the Server starts and Kibana as well.
However, when I execute the file "elasticsearch-service.bat" I get the error in the terminal that the service could not be installed.
After some research I found that I might need to add the parameters "-Des.path.home=%ES_HOME%;-Des.path.conf=%ES_PATH_CONF%;" which I did. However, this post was in regard to version 7.x so I was not that surprised that it did not work.
Attatched you find the screenshot of the terminal as well as my "elasticsearch-service.bat" file.
Elasticsearch as well as Kibana came from two zip-files and where just extracted. I have changed the config-file of both so I can use my old data, indices and dashboards created with my priviouse installation 7.17
I would like to make a fresh start, so using the upgrade assistance from 7.17 to 8.5 is not an option

All the best,
Clonky


2022-11-21 15_10_32-160.48.202.132 - Remotedesktopverbindung

Just as a tip, please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them :slight_smile:

What is the output from elasticsearch-service.bat remove?
Is there anything in the Elasticsearch logs?

Good Morning,

oh, I am sorry! It will not happen again!
It seemed like there was another elasticsearch-service already installed which blocked the installation. After I performed the command elasticsearch-service.bat remove I got the result that elasticsearch-service-x64 was removed. After that, I could install elasticsearch-service in version 8.5 with no problem. The Service is also available in the service overview offered by Windows.
Initially I thought that the old service will just be overwritten or updated when I try to install the new one

I have another question. Maybe you can help me with it: How can I install Kiabana as a Windows Service as well? I have launched kibana-setup.bat with admi rights. However, I was asked for an enrollment token.
This token I tried to create with executing the command elasticsearch-create-enrollment-token -s kibana from the Elasticsearch folder. This was impossible, because I have not set xpack.security.enrollment.enable: true. This was corrected and I have restarted the service so that the new config-file was loaded.
Then I could execute the command but got the error message: ERROR: Unable to create an enrollment token. Elasticsearch node HTTP layer SSL configuration is not configured with a keystore
However, I do not want any security setting to be in place by Elasticsearch/Kibana. To access the server, you need a TUFIN authentication and the server is only accessible in the internal network. So this is security enough and a needed username/password authentication is unnecessary
Because Elasticsearch already is running, is an enrollment-token already created?
I can run Kibana locally when executing ./bin/kibana.bat. Then I can also access Kibana from the browser.

All the best,
Clonky

Good to hear you have it sorted!

I'd suggest making a new topic in Kibana to keep things clear :slight_smile:

Thank you very much!
I already have created a topic for that in the Kibana forum: Problem in elasticsearch-create-enrollment-token for Kibana

It comes down to the question, how to disable in Kibana the need for an enrollment-token.
The idea to install Elastcsearch and Kibana first with enabled security and later disable it, is not the way to go and only the last possible solution.

All the best

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