# ElasticSearch as Windows service - problem

**URL:** <https://discuss.elastic.co/t/elasticsearch-as-windows-service-problem/3972>\
**Category:** Elasticsearch\
**Created:** [February 24, 2011, 12:26pm UTC](https://discuss.elastic.co/t/elasticsearch-as-windows-service-problem/3972 "2011-02-24T12:26:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olafur\_Gauti\_Gudmund](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olafur_gauti_gudmund/32/2694_2.png) [@Olafur\_Gauti\_Gudmund](https://discuss.elastic.co/u/Olafur_Gauti_Gudmund)\
**Post date:** [February 24, 2011, 12:26pm UTC](https://discuss.elastic.co/t/elasticsearch-as-windows-service-problem/3972/1 "2011-02-24T12:26:02Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [February 24, 2011, 1:20pm UTC](https://discuss.elastic.co/t/elasticsearch-as-windows-service-problem/3972/2 "2011-02-24T13:20:23Z")

</div>

Hi Ãlafur

> I downloaded the elasticsearch service wrapper ([http://github.com/](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.

> <https://github.com/elastic/elasticsearch-servicewrapper/issues/2>
>
> If you try running \`$ES\_HOME/bin/service/elasticsearch\` from a directory contain…ing any file whose name includes uppercase letters, the script would fail with:
> 
> \`\`\`
> Unable to locate any of the following binaries:
> ....../bin/service/exec/elasticsearch-Linux-x86-64
> ....../bin/service/exec/elasticsearch-Linux-x86-32
> ....../bin/service/exec/elasticsearch
> \`\`\`
> 
> Closed by f53aac0a82e0162f9716be27241813147994361f

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

---

<div class="post-metadata">

**Author:** ![brandont](https://avatars.discourse-cdn.com/v4/letter/b/a6a055/32.png) [@brandont](https://discuss.elastic.co/u/brandont)\
**Post date:** [February 18, 2017, 11:47pm UTC](https://discuss.elastic.co/t/elasticsearch-as-windows-service-problem/3972/3 "2017-02-18T23:47:46Z")

</div>

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.\*).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:03pm UTC](https://discuss.elastic.co/t/elasticsearch-as-windows-service-problem/3972/4 "2017-07-05T22:03:07Z")

</div>


