Hi, all.
I have been running into a Error with the heap sizes when trying to start Elasticsearch. I have been looking through the group looking for a answer that works, and haven't seen to find it. -Xms and -Xmx are both set to 30gb for me in the ini file that should be loaded when the wrapper exe starts.
We are launching the jar through launch4j and as part of that an ini file is created that contains the heap settings.
Error:
""[2017-05-02T23:13:00,977][INFO ][org.elasticsearch.transport.TransportService] publish_address {25.130.116.179:9301},
bound_addresses {25.130.116.179:9301}, {[::1]:9301}, {127.0.0.1:9301}
""[2017-05-02T23:13:00,993][INFO ][org.elasticsearch.bootstrap.BootstrapChecks] bound or publishing to a non-loopback or
non-link-local address, enforcing bootstrap checks
"ERROR: bootstrap checks failed
initial heap size [2147483648] not equal to maximum heap size [32210157568]; this can cause resize pauses and prevents m
lockall from locking the entire heap
"[2017-05-02T23:13:01,008][INFO ][org.elasticsearch.node.Node] stopping ...
""[2017-05-02T23:13:01,024][INFO ][org.elasticsearch.node.Node] stopped
""[2017-05-02T23:13:01,024][INFO ][org.elasticsearch.node.Node] closing ...
""[2017-05-02T23:13:01,039][TRACE][org.elasticsearch.node.Node] Close times for each service:
StopWatch 'node_close': running time = 0s
launch4j xml
<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<dontWrapJar>true</dontWrapJar>
<headerType>console</headerType>
<jar></jar>
<outfile>Elasticsearch.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<manifest></manifest>
<icon>elasticsearch.ico</icon>
<versionInfo>
<fileVersion>5.3.1.0</fileVersion>
<txtFileVersion>5.3.1</txtFileVersion>
<productVersion>5.3.1.0</productVersion>
<txtProductVersion>5.3.1</txtProductVersion>
<productName>Elasticsearch</productName>
<fileDescription>Elasticsearch Launcher</fileDescription>
<copyright>Apache License v2.0</copyright>
<companyName>Elastic</companyName>
<internalName>Elasticsearch</internalName>
<originalFilename>Elasticsearch.exe</originalFilename>
</versionInfo>
<singleInstance>
<mutexName>elasticsearch</mutexName>
<windowTitle></windowTitle>
</singleInstance>
<classPath>
<mainClass>org.elasticsearch.bootstrap.Elasticsearch</mainClass>
<cp>%EXEDIR%/lib/elasticsearch-5.3.1.jar</cp>
<cp>%EXEDIR%/lib/*</cp>
</classPath>
<jre>
<path>%EXEDIR%/../jre</path>
<bundledJre64Bit>true</bundledJre64Bit>
<minVersion>1.7.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
<!-- Warning: Do not set -Xms and -Xmx here! They would override the settings in elasticsearch_config.ini -->
<opt>-Xss1m</opt>
<opt>-Djava.awt.headless=true</opt>
<opt>-XX:+UseParNewGC</opt>
<opt>-XX:+UseConcMarkSweepGC</opt>
<opt>-XX:+UseCondCardMark</opt>
<opt>-XX:CMSInitiatingOccupancyFraction=75</opt>
<opt>-XX:+UseCMSInitiatingOccupancyOnly</opt>
<opt>-XX:+AlwaysPreTouch</opt>
<opt>-XX:+HeapDumpOnOutOfMemoryError</opt>
<opt>-XX:+DisableExplicitGC</opt>
<opt>-XX:HeapDumpPath=%DATADIR%/minidumps/esheapdump.hprof</opt>
<opt>-Dfile.encoding=UTF-8</opt>
<opt>-Djna.nosys=true</opt>
<opt>-Dmapper.allow_dots_in_name=true</opt>
<opt>-Delasticsearch -Des-foreground=yes -Des.path.home="%EXEDIR%"</opt>
<opt>-Dlog4j2.disable.jmx=true</opt>
<opt>-Dlog4j.skipJansi=true</opt>
<opt>-Dio.netty.noUnsafe=true</opt>
<opt>-Dio.netty.noKeySetOptimization=true</opt>
<opt>-Dio.netty.recycler.maxCapacityPerThread=0</opt>
<opt>-Dlog4j.shutdownHookEnabled=false</opt>
<opt>-XX:+PrintFlagsFinal</opt>
</jre>
</launch4jConfig>
elasticsearch.yml
cluster:
name: ${_ES_CLUSTERNAME}
routing:
allocation:
awareness.attributes: scale_unit
disk.watermark.low: 80%
disk.watermark.high: 85%
#
# ------------------------------------ Node ------------------------------------
#
node:
name: ${COMPUTERNAME}
attr.scale_unit: ${_ES_SCALEUNIT}
max_local_storage_nodes: 1
master: ${_ES_ISMASTER}
data: ${_ES_ISDATA}
#
# ----------------------------------- Paths ------------------------------------
#
path:
data: ${_ES_DATAPATH}
logs: ${_ES_LOGPATH}
#
# ---------------------------------- Network -----------------------------------
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
network:
host: ${COMPUTERNAME}
bind_host: ${COMPUTERNAME}, _local_
#
http.enabled: ${_ES_ISHTTP}
#
# --------------------------------- Discovery ----------------------------------
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
discovery:
zen:
ping.unicast.hosts: ${_ES_MASTER_NODES}
fd.ping_interval: 1s
fd.ping_timeout: 10s
fd.ping_retries: 3
minimum_master_nodes: ${_ES_MASTERS_MIN}
#
# ---------------------------------- Gateway -----------------------------------
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
#
gateway:
recover_after_time: 10m
expected_nodes: ${_ES_MACHINE_COUNT}
#
# ----------------------------------- Index ------------------------------------
#
# Enable http compression for requests and response
http.compression: true