ElasticSearch as Windows service - problem


(Ólafur Gauti Guðmundsson) #1

Hi,
I have been running ElasticSearch on Linux and Mac OSX successfully
for a while. I was going to set it up on a Windows 2008 server as a
service. It is a 64 bit server.

I've set up elasticsearch 0.15.0, and I can start it and stop it on
the command line without problems.

I downloaded the elasticsearch service wrapper (http://github.com/
elasticsearch/elasticsearch-servicewrapper), and put the service
folder inside $ES_HOME/bin.

I also downloaded the Java Service Wrapper standard edition (as there
is no community edition for Windows 64 bit), and added the .exe,
wrapper.jar, and .dll.

When I try running "service/elasticsearch.bat install", I get the
following message:

C:\Website\App\elasticsearch-0.15.0\bin\service> .\elasticsearch.bat
install
FATAL | wrapper | Failed to load configuration.
Press any key to continue . . .

If I run it without the install option, I get a slightly different
message:

C:\Website\App\elasticsearch-0.15.0\bin\service> .\elasticsearch.bat
FATAL | wrapper | Unable to resolve the full path of the
configuration file, : The filename, directory name, or volume label
syntax is incorrect. (0x7b)
FATAL | wrapper | Current working directory is: C:\Website\App
\elasticsearch-0.15.0\bin\service\exec
FATAL | wrapper | Unable to resolve the full path of the
configuration file, : The filename, directory name, or volume label
syntax is incorrect. (0x7b)

Can anyone spot what I'm doing wrong?

Thanks!
OGG


(Clinton Gormley) #2

Hi Ólafur

I downloaded the elasticsearch service wrapper (http://github.com/
elasticsearch/elasticsearch-servicewrapper), and put the service
folder inside $ES_HOME/bin.

When I try running "service/elasticsearch.bat install", I get the
following message:

C:\Website\App\elasticsearch-0.15.0\bin\service> .\elasticsearch.bat
install
FATAL | wrapper | Failed to load configuration.
Press any key to continue . . .

I see that kimchy recently upgraded the service wrapper, and when I
tried the latest version, I had issues on linux.

There may be something similar in the elasticsearch.bat script. Could
you try stepping through it line by line and seeing which path is being
set incorrectly.

If you do find it, please patch the service wrapper and send a pull
request

thanks

clint


(Brandon Taylor) #3

I was running into the same problem while setting up ES on windows and was able to resolve the issue by explicitly setting the JAVA_HOME variable from the command line (set JAVA_HOME=path/to/jre1.8.*).


(system) #4