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?
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 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.
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 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.
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.