Cannot install elasticsearch 5.1.1 on windows 10 with java 8

╄→гoц情女王★ 提交于 2019-12-24 04:07:36

问题


I am attempting to install ElasticSearch 5.1.1 on my windows 10 's laptop with java 8.111 installed.

when I try to install Elastic search that triggers an error

C:\Users\userName\Downloads\elasticsearch-5.1.1\elasticsearch-5.1.1>.\bin\elasticsearch

Displays me that error message :

Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_111\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

I found a fix for that type of error with java . That consist in creating a folder server and to copy paste jvm.dll into. But it should be avalaible for java 7 cause if I try that fix and I launch the installation again I have now the error message:

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

If has no sens cause I have 8 go of RAM

Do you have idea about what I should do to install ElasticSearch?


回答1:


Goto config folder and open elasticsearch.yml file then do below changes.

Uncomment the cluster.name and node.name in elasticsearch.yml like below and give your own cluster and node name.

cluster.name: ESCluster

node.name: ESNode

Change heap size in jvm.options

-Xms1g
-Xmx1g

Goto bin folder then run elasticsearch.bat




回答2:


Check if the Java software that you install is 64bit(on 64bit machine). When you install "elasticsearch" on 64bit Windows machine, it searches for 64bit Java on the computer, and when you install Java, by default, you install 32 bit Java.




回答3:


I made/confirmed the suggested configs.

I confirmed 64bit java: $ java -version java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

>elasticsearch-5.4.3\bin>elasticsearch.bat Error: encountered environment variables that are no longer supported Use jvm.options or ES_JAVA_OPTS to configure the JVM ES_MIN_MEM=100000: set -Xms100000 in jvm.options or add "-Xms100000" to ES_JAVA_OPTS ES_MAX_MEM=900000: set -Xmx900000 in jvm.options or add "-Xmx900000" to ES_JAVA_OPTS



来源:https://stackoverflow.com/questions/41145921/cannot-install-elasticsearch-5-1-1-on-windows-10-with-java-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!