org.elasticsearch.bootstrap.StartupException after installing elasticsearch 5.0.2

I am completely new to ELK. I'm trying to install 5.0.2. logstash works fine but when I run elasticsearch.bat I get the following:

[2016-12-09T15:17:43,484][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] []
uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.bootstrap.Bootst
rapException: java.io.FileNotFoundException: C:\Users\IBM_ADMIN\Documents\ELK\el
asticsearch-5.0.2\lib\elasticsearch-${project.version}.jar (The system cannot fi
nd the file specified)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125
) ~[elasticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:
112) ~[elasticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
~[elasticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:9
6) ~[elasticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.cli.Command.main(Command.java:62) ~[elasticsearch-5
.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)
~[elasticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)
~[elasticsearch-5.0.2.jar:5.0.2]
Caused by: org.elasticsearch.bootstrap.BootstrapException: java.io.FileNotFoundE
xception: C:\Users\IBM_ADMIN\Documents\ELK\elasticsearch-5.0.2\lib\elasticsearch
-${project.version}.jar (The system cannot find the file specified)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:186) ~[ela
sticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:291) ~[elas
ticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121
) ~[elasticsearch-5.0.2.jar:5.0.2]
... 6 more
Caused by: java.io.FileNotFoundException: C:\Users\IBM_ADMIN\Documents\ELK\elast
icsearch-5.0.2\lib\elasticsearch-${project.version}.jar (The system cannot find
the file specified)
at java.util.zip.ZipFile.open(Native Method) ~[?:1.8.0_112]
at java.util.zip.ZipFile.(ZipFile.java:219) ~[?:1.8.0_112]
at java.util.zip.ZipFile.(ZipFile.java:149) ~[?:1.8.0_112]
at java.util.jar.JarFile.(JarFile.java:166) ~[?:1.8.0_112]
at java.util.jar.JarFile.(JarFile.java:103) ~[?:1.8.0_112]
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:175) ~[
elasticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:88) ~[e
lasticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:184) ~[ela
sticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:291) ~[elas
ticsearch-5.0.2.jar:5.0.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121
) ~[elasticsearch-5.0.2.jar:5.0.2]
... 6 more

It looks to me like it's failing to find elasticsearch-5.0.2.jar, but that file is definitely present C:\Users\IBM_ADMIN\Documents\ELK\elasticsearch-5.0.2\lib.

You did not download elasticsearch from the download page, right?

Hi David. Thanks for the reply. I don't want to sound ungrateful, but I think you'll find things less confusing if you ask your questions as questions rather than statements. I know it'll work better for me anyway. In fact that's exactly where I downloaded it from.

I just downloaded https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0.2.zip, unzipped it and looked at bin/elasticsearch.in.bat which declares this library within this line:

set ES_CLASSPATH=!ES_HOME!/lib/elasticsearch-5.0.2.jar;!ES_HOME!/lib/*

No ${project.version} here which is what you can have if you download from Github instead of the download service.

That's why I asked this confirmation before investigating more.

Can you download again from the link I pasted, unzip in a new directory and launch it again?

Thanks David, I didn't mean to be dismissive of your question, I just wanted to suggest a less confusing style of interaction. You were on the right track. I had already run into the problem described by "Fix handling of spaces in Windows paths #21921". I grabbed the updated versions of three .bat files from github, which resolved the problem with JAVA_HOME, but then I hit the problem described here. It should have occurred to me that the github versions were in some way responsible, but I had taken it for granted that they would be compatible, and did not at first suspect them. Anyway I have now compared the original downloads of the three .bat files with the github versions for #21921 and by taking the right bits of each I appear to have elasticsearch starting okay. Thanks again for taking the trouble to reply.

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