Setting heap size on JVM.options . still getting heap size problem

Here is a part of my JVM.options file that sets heap size
## JVM configuration

################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
 -Xms2g
 -Xmx2g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space

##-Xms1g
##-Xmx1g

Eventhougn the -Xms and -Xmx values are same, I am still getting this error

publish_address {10.10.10.131:9300}, bound_addresses {10.10.10.131:9300}
[2017-06-14T14:50:07,117][INFO ][o.e.b.BootstrapChecks    ] [node1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: initial heap size [130023424] not equal to maximum heap size [2069889024]; this can cause resize pauses and prevents mlockall from locking the entire heap
[2]: memory locking requested for elasticsearch process but memory is not locked
[2017-06-14T14:50:07,127][INFO ][o.e.n.Node               ] [node1] stopping ...
[2017-06-14T14:50:07,204][INFO ][o.e.n.Node               ] [node1] stopped
[2017-06-14T14:50:07,204][INFO ][o.e.n.Node               ] [node1] closing ...
[2017-06-14T14:50:07,222][INFO ][o.e.n.Node               ] [node1] closed
[2017-06-14T14:50:07,225][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started

What am I doing wrong ?

May be something else (env var) is setting that heap size?

I'd remove spaces in front of the 2 lines BTW

thanks, removing spaces solved heap problem but this problem still persists
memory locking requested for elasticsearch process but memory is not locked
my limits.conf file has following lines also
elasticsearch soft memlock unlimited elasticsearch hard memlock unlimited

do you solve it yet?i meet this problem also.

@willJackson if you have not solved it yet, then instead of elasticsearch in
elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited
write your username name. that solved for me

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