# Elastic Search 5.5.1 does not start

**URL:** <https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651>\
**Category:** Elasticsearch\
**Created:** [August 10, 2017, 5:20pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651 "2017-08-10T17:20:53Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 10, 2017, 5:20pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/1 "2017-08-10T17:20:54Z")

</div>

The elastic search do not start in Windows with the below exception -

An exception occurred while trying to start elasticsearch.: System.ArgumentException: Illegal characters in path.  
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)  
at System.IO.Path.Combine(String path1, String path2, String path3)  
at Elastic.ProcessHosts.Elasticsearch.Process.ElasticsearchProcess..ctor(IObservableProcess process, IConsoleOutHandler consoleOutHandler, IFileSystem fileSystem, ElasticsearchEnvironmentConfiguration env, JavaConfiguration java, ManualResetEvent completedHandle, IEnumerable`1 args)  
at Elastic.ProcessHosts.Elasticsearch.Service.ElasticsearchService.StartInteractive(ManualResetEvent handle)  
at Elastic.ProcessHosts.Service.Service.Run()  
at Elastic.ProcessHosts.Elasticsearch.Program.Main(String[] args)

C:\Program Files\Elastic\Elasticsearch\bin\>java -version  
java version "1.8.0\_144"  
Java(TM) SE Runtime Environment (build 1.8.0\_144-b01)  
Java HotSpot(TM) Client VM (build 25.144-b01, mixed mode)

I have installed the latest java version, does it need the 64-bit version?

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [August 10, 2017, 8:44pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/2 "2017-08-10T20:44:13Z")

</div>

Generally, yes, you should be using a 64-bit java. The implicit 32-bit support is going away soon: [https://github.com/elastic/elasticsearch/pull/25435](https://github.com/elastic/elasticsearch/pull/25435)

But it looks like this is an error with the path. How did you install Elasticsearch? Did you use the [MSI installer](https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html)?

---

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 10, 2017, 9:22pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/3 "2017-08-10T21:22:47Z")

</div>

Yes I used the MSI installer.

I did try with 64-bit Java as well, but got the same error.

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [August 10, 2017, 9:47pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/4 "2017-08-10T21:47:53Z")

</div>

Can you share your install log from the MSI as well?

---

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 10, 2017, 10:19pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/5 "2017-08-10T22:19:21Z")

</div>

Please find the MSI install log - [https://drive.google.com/file/d/0B\_9rlWj\_s7dZdTdNdHJKRHZhTGM/view?usp=drivesdk](https://drive.google.com/file/d/0B_9rlWj_s7dZdTdNdHJKRHZhTGM/view?usp=drivesdk)

---

<div class="post-metadata">

**Author:** ![Martijn\_Laarman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_laarman/32/4410_2.png) [@Martijn\_Laarman](https://discuss.elastic.co/u/Martijn_Laarman)\
**Post date:** [August 10, 2017, 11:02pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/6 "2017-08-10T23:02:00Z")

</div>

If you run `elasticsearch.exe --debug-env` what does it print on the command line?

---

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 10, 2017, 11:16pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/7 "2017-08-10T23:16:56Z")

</div>

ES\_HOME (in order of precedence)

- HomeDirectoryProcessVariable = C:\Program Files\Elastic\Elasticsearch\
- HomeDirectoryUserVariable =
- HomeDirectoryMachineVariable = C:\Program Files\Elastic\Elasticsearch\
- From executable location = C:\Program Files\Elastic\Elasticsearch  
ES\_CONFIG (in order of precedence)
- ConfigDirectoryProcessVariable = C:\ProgramData\Elastic\Elasticsearch\config
- ConfigDirectoryUserVariable =
- ConfigDirectoryMachineVariable = C:\ProgramData\Elastic\Elasticsearch\config
- Fallback to ES\_HOME = C:\Program Files\Elastic\Elasticsearch\config

* * *

## Java

Java paths

- current = C:\Program Files (x86)\Java\jre1.8.0\_141\bin\java.exe  
Java Candidates (in order of precedence)
- JavaHomeProcessVariable = C:\Program Files (x86)\Java\jre1.8.0\_141
- JavaHomeUserVariable =
- JavaHomeMachineVariable = C:\Program Files (x86)\Java\jre1.8.0\_141
- JdkRegistry64 = C:\Program Files\Java\jdk1.8.0\_144
- JreRegistry64 = C:\Program Files\Java\jre1.8.0\_144
- JdkRegistry32 = C:\Program Files (x86)\Java\jdk1.8.0\_144
- JreRegistry32 = C:\Program Files (x86)\Java\jre1.8.0\_144  
Java checks
- Using32BitJava = False
- JAVA\_HOME as machine and user variable = False

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [August 10, 2017, 11:38pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/8 "2017-08-10T23:38:16Z")

</div>

@Jospaul how are you starting the elasticsearch executable, could you show the command you're using here?

---

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 11, 2017, 2:49am UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/9 "2017-08-11T02:49:34Z")

</div>

./elasticsearch.exe  
 ![Elastic](https://us1.discourse-cdn.com/elastic/original/3X/d/3/d3725b312a794975f8b41259cb40a2963805d88d.JPG)

I had to restart my system and since then I am not receiving any error, but not getting the details as mentioned in the startup kit as well.

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [August 11, 2017, 6:00am UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/10 "2017-08-11T06:00:21Z")

</div>

hmm, this is a little weird.

The error happens because the java candidate path has illegal characters in it, when building a path to `bin\java.exe` executable. Is it possible that the java candidate path included the enclosing double quotes e.g. `"C:\Program Files (x86)\Java\jre1.8.0_141"`?

I've submitted a PR to echo out the java candidate path in the event of an exception: [https://github.com/elastic/windows-installers/pull/71](https://github.com/elastic/windows-installers/pull/71)

---

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 16, 2017, 10:09pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/11 "2017-08-16T22:09:12Z")

</div>

I currently have taken a clone from the master for the windows-installer and then tried to install using the build.bat. However, that fails with a huge amount of failures . The error log starts with -

Project file contains ToolsVersion="14.0". This toolset is unknown or missing. You may be able to resolve this by installing the appropriate .NET Framework for this toolset. Treating the project as if it had ToolsVersion="4.0".

I have tried using the msi installer, however now it doesn't give any error but does not install.

---

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 23, 2017, 6:57pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/12 "2017-08-23T18:57:55Z")

</div>

Hello all,

After several days of installing and uninstalling elasticsearch using msi and otherwise, i think i finally resolved the issue. It seems to be caused due to access issues, when I ran the command prompt as administrator, the cluster got started.

Thanks @forloop, @shanec and @Martijn_Laarman for your responses.

I probably will have to come back several times to this forum for further issues that I may face.

Cheers,  
Jospaul

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [August 24, 2017, 11:32pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/13 "2017-08-24T23:32:40Z")

</div>

Thanks for the response @Jospaul. If you happen to have more details on the access details, let us know so we can look at making sure others don't run into it. And absolutely come back with any other questions or suggestions on how it could be better.

---

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 25, 2017, 12:09am UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/14 "2017-08-25T00:09:27Z")

</div>

Unfortunately, I do not have the screenshot of the exact error i received. However, here are few more details -

- I was getting an error as illegal characters in path the first time I tried installing. Not sure whether the error was caused because it did not have enough access permissions.
- The major cause of confusion was that after I restarted my machine, there was no error when i try to startup elasticsearch, there was just a blank space and then the prompt was displayed.
- I got an access related error when i tried to launch the application using the zip folder and not the MSI installer. There were messages that said that the path for some applications (if i am not wrong it was the Java folder location) were not accessible.

My suggestion would be to have some sort of logging for the startup of elasticsearch which is configurable, so that it prints everything that it is trying to access or do during the launch. This logging could be turned off later for those users who don't want to see them at a later point of time.

I shall try to recreate the error message and post it.

---

<div class="post-metadata">

**Author:** ![Jospaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jospaul/32/128827_2.png) [@Jospaul](https://discuss.elastic.co/u/Jospaul)\
**Post date:** [August 25, 2017, 5:18pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/15 "2017-08-25T17:18:16Z")

</div>

Please find below the error i got when I tried to start elasticsearch using the bat file, without starting the console in admin mode -

2017-08-25 12:15:43,124 main ERROR RollingFileManager (C:\Program Files\elasticsearch-5.5.2\logs\elasticsearch.log) java.io.FileNotFoundException: C:\Program Files\elasticsearch-5.  
lasticsearch.log (Access is denied)

Cheers,  
Jospaul

---

<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:** [September 22, 2017, 5:18pm UTC](https://discuss.elastic.co/t/elastic-search-5-5-1-does-not-start/96651/16 "2017-09-22T17:18:44Z")

</div>

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