0
votes

I am trying to install the elasticsearch plugin with the command: ./plugin install license which I found on this tut: link

But I get the error message:

Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

After that even if I run java -version I get the same error! Before I run ./plugin install license java -version worked fine and printed:

java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

Does anybody know whats my problem here? Its a fresh install of Ubuntu 14.04.4 LTS and I installed elasticsearch 2.2.3

1
How much physical RAM do you have?Val
@Val `cat /proc/meminfo | grep MemTotal´ gives me MemTotal: 2097152 kBIIIIIIIIIIIIIIIIIIIIII
Do you have other stuff running on your server that might eat memory? By default ES starts with a 1GB heap, but if there's less RAM available than that, then you can run into such troubles.Val
I see that I have 757.024MB free. I am not sure whats eating my memory. I have a fresh install and only installed java, nano and elasticsearch till yetIIIIIIIIIIIIIIIIIIIIII
What happens if you run java -Xmx512m -version? If that works, you can set ES_MAX_MEM to 512m and that will probably get you further.Val

1 Answers

3
votes

Installation for ElasticSearch

1) Comment entry in C:\\elasticsearch-5.4.0\elasticsearch-5.4.0\config\jvm.options

#-Xms2g
#-Xmx2g

2) set ES_JAVA_OPTS as below in elasticsearch.bat

set ES_JAVA_OPTS = "-Xms512m -Xmx512m"