Reputation: 519
I'm trying to run elasticsearch on windows by following this tutorial. When i run bin/elasticsearch.bat i did get this message:
Invalid initial heap size: -Xms${packaging.elasticsearch.heap.min}
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I tried inceasing memory from java by setting like this.
Then i removed %JAVA_OPTS%
from elasticsearch.bat line:
"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" start !newparams!
Now i get this message:
Error: Could not find or load main class org.elasticsearch.bootstrap.Elasticsearch
I'm running java last version jre1.8.0_144 x64 and elastic version 2.4.6. In the elasticsearch in wamp tutorial it says
Now open 'elasticsearch.bat' file in 'C:\elasticsearch-2.3.2\bin\' directory
But in the zip files is located in
C:\elasticsearch-2.4.6\distribution\src\main\resources\bin
Even in 2.3.2 is located in same directory. I don't know if it makes any diference.
I have no ideas what else can i change. Any help would be nice.
Thanks in advance
Upvotes: 3
Views: 19295
Reputation: 497
Il looks like you are trying to launch the .bat script from a source distribution, that is the set of source files accompanying the binary distribution of ElasticSearch (the one you can run).
The src/main/resources path is typically used in java software projects to host resources that should be copied to the distribution archive, so src/main/resources/bin/elasticsearch.bat should be available at path bin/elasticsearch.bat.
If you really need ElastiSearch 2.4.6 you could:
Upvotes: 2
Reputation: 1804
disclaimer: I am not a windows user, so I probably cant help fully. But what you are seeing is the wrong configuration of the heap size. The line above
-Xms${packaging.elasticsearch.heap.min}
should be something like -Xms2g
(for two gigabytes of heap). It seems some configuration service did not work as expected for the package you downloaded. You can check the elasticsearch.in.bat
or just search for packaging.elasticsearch.heap.min
to check where this is set and set it to whatever heap you want to assign to ES.
Upvotes: 1