# Heap size Not tally

**URL:** <https://discuss.elastic.co/t/heap-size-not-tally/185789>\
**Category:** Elasticsearch\
**Created:** [June 14, 2019, 8:08am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789 "2019-06-14T08:08:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 14, 2019, 8:08am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/1 "2019-06-14T08:08:02Z")

</div>

Hi all, may I know is this correct? No matter how I change the heapsize, it will not take any effect.

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/6/76880c1b944b503093cef65a76ec85ccb95909e4.png)

in JVM.options file :  
-Xms8g  
-Xmx12g

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 14, 2019, 9:00am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/2 "2019-06-14T09:00:49Z")

</div>

```
ERROR: [1] bootstrap checks failed
[1]: initial heap size [2147483648] not equal to maximum heap size [32210157568]; this can cause resize pauses and prevents mlockall from locking the entire heap

```

Can anyone help me to understand the error above? No idea how to resolve it. Thanks

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [June 14, 2019, 9:09am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/3 "2019-06-14T09:09:08Z")

</div>

> [@skyluke.1987](#):
>
> initial heap size [2147483648] not equal to maximum heap size

> [@Initial heap size not equal to maximum heap size](https://discuss.elastic.co/t/initial-heap-size-not-equal-to-maximum-heap-size/50499):
>
> I'm trying to start elasticsearch v5 alpha 2 on an AWS EC2 instance with 8GB memory, and keep getting this error on startup: initial heap size [268435456] not equal to maximum heap size [1073741824] Then elasticsearch fails to start. I've tried setting the ES\_HEAP\_SIZE environment variable, and I've tried launching elasticsearch with -Xmx4g -Xms4g, and still get the same error. What is the correct way to set the heap size?

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 14, 2019, 9:14am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/4 "2019-06-14T09:14:52Z")

</div>

Hi but mine is version 7.1.0. and I have set similar to what have been suggested. But still behaving strangely.

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [June 14, 2019, 9:32am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/5 "2019-06-14T09:32:53Z")

</div>

Do you set Xms and Xmx to the same in jvm.options?

---

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [June 14, 2019, 9:57am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/6 "2019-06-14T09:57:03Z")

</div>

Yes , it is also given in the documentation Xms and Xmx has to be same

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 17, 2019, 6:21am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/7 "2019-06-17T06:21:38Z")

</div>

Hi wangqinghuan,

Yes, I already set to the same. but still not work. But I do discover something that under etc/default/elasticsearch .... the JAVA\_HOME is empty. Do i need to fill it up? how can i identify which is the location?

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [June 17, 2019, 7:06am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/8 "2019-06-17T07:06:24Z")

</div>

can you provide your jvm.options and error log ?

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 17, 2019, 7:08am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/9 "2019-06-17T07:08:32Z")

</div>

```
## JVM configuration
  2
  3 ################################################################
  4 ## IMPORTANT: JVM heap size
  5 ################################################################
  6 ##
  7 ## You should always set the min and max JVM heap
  8 ## size to the same value. For example, to set
  9 ## the heap to 4 GB, set:
 10 ##
 11 ## -Xms4g
 12 ## -Xmx4g
 13 ##
 14 ## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
 15 ## for more information
 16 ##
 17 ################################################################
 18
 19
 20 # Xms represents the initial size of total heap space
 21 # Xmx represents the maximum size of total heap space
 22
 23 -Xms8g
 24 -Xmx8g
 25
 26
 27 ################################################################
 28 ## Expert settings
 29 ################################################################
 30 ##
 31 ## All settings below this section are considered
 32 ## expert settings. Don't tamper with them unless
 33 ## you understand what you are doing
 34 ##
 35 ################################################################
 36
 37 ## GC configuration
 38 -XX:+UseConcMarkSweepGC
 39 -XX:CMSInitiatingOccupancyFraction=75
 40 -XX:+UseCMSInitiatingOccupancyOnly
 41
 42 ## G1GC Configuration
 43 # NOTE: G1GC is only supported on JDK version 10 or later.
 44 # To use G1GC uncomment the lines below.
 45 # 10-:-XX:-UseConcMarkSweepGC
 46 # 10-:-XX:-UseCMSInitiatingOccupancyOnly
 47 # 10-:-XX:+UseG1GC
 48 # 10-:-XX:InitiatingHeapOccupancyPercent=75
 49
 50 ## DNS cache policy
 51 # cache ttl in seconds for positive DNS lookups noting that this overrides the
 52 # JDK security property networkaddress.cache.ttl; set to -1 to cache forever
53 -Des.networkaddress.cache.ttl=60
 54 # cache ttl in seconds for negative DNS lookups noting that this overrides the
 55 # JDK security property networkaddress.cache.negative ttl; set to -1 to cache
 56 # forever
 57 -Des.networkaddress.cache.negative.ttl=10
 58
 59 ## optimizations
 60
 61 # pre-touch memory pages used by the JVM during initialization
 62 -XX:+AlwaysPreTouch
 63
 64 ## basic
 65
 66 # explicitly set the stack size
 67 -Xss1m
 68
 69 # set to headless, just in case
 70 -Djava.awt.headless=true
 71
 72 # ensure UTF-8 encoding by default (e.g. filenames)
 73 -Dfile.encoding=UTF-8
 74
 75 # use our provided JNA always versus the system one
 76 -Djna.nosys=true
 77
 78 # turn off a JDK optimization that throws away stack traces for common
 79 # exceptions because stack traces are important for debugging
 80 -XX:-OmitStackTraceInFastThrow
 81
 82 # flags to configure Netty
 83 -Dio.netty.noUnsafe=true
 84 -Dio.netty.noKeySetOptimization=true
 85 -Dio.netty.recycler.maxCapacityPerThread=0
 86
 87 # log4j 2
 88 -Dlog4j.shutdownHookEnabled=false
 89 -Dlog4j2.disable.jmx=true
 90
 91 -Djava.io.tmpdir=${ES_TMPDIR}
 92
 93 ## heap dumps
 94
 95 # generate a heap dump when an allocation from the Java heap fails
 96 # heap dumps are created in the working directory of the JVM
 97 -XX:+HeapDumpOnOutOfMemoryError
 98
 99 # specify an alternative path for heap dumps; ensure the directory exists and
100 # has sufficient space
101 -XX:HeapDumpPath=data
102
103 # specify an alternative path for JVM fatal error logs
104 -XX:ErrorFile=logs/hs_err_pid%p.log
105
106 ## JDK 8 GC logging
107
108 8:-XX:+PrintGCDetails
109 8:-XX:+PrintGCDateStamps
110 8:-XX:+PrintTenuringDistribution
111 8:-XX:+PrintGCApplicationStoppedTime
112 8:-Xloggc:logs/gc.log
113 8:-XX:+UseGCLogFileRotation
114 8:-XX:NumberOfGCLogFiles=32
115 8:-XX:GCLogFileSize=64m
116
117 # JDK 9+ GC logging
118 9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
119 # due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise
120 # time/date parsing will break in an incompatible way for some date patterns and locals
121 9-:-Djava.locale.providers=COMPAT
```

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 17, 2019, 7:12am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/10 "2019-06-17T07:12:29Z")

</div>

```
/etc/elasticsearch-master/bin$ ./elasticsearch
2019-06-17 14:59:25,515 main ERROR RollingFileManager (/etc/elasticsearch-master/logs/wazuh-es_server.json) java.io.FileNotFoundException: /etc/elasticsearch-master/logs/wazuh-es_server.json (Permission denied) java.io.FileNotFoundException: /etc/elasticsearch-master/logs/wazuh-es_server.json (Permission denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:640)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:608)
        at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:113)
        at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:188)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:145)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:61)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:123)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:234)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:294)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)

2019-06-17 14:59:25,520 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@7f284218] unable to create manager for [/etc/elasticsearch-master/logs/wazuh-es_server.json] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@407a7f2a[pattern=/etc/elasticsearch-master/logs/wazuh-es-%d{yyyy-MM-dd}-%i.json.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=true), SizeBasedTriggeringPolicy(size=134217728)]), strategy=DefaultRolloverStrategy(min=-2147483648, max=2147483647, useMax=false), advertiseURI=null, layout=ESJsonLayout{patternLayout={"type": "server", "timestamp": "%d{yyyy-MM-dd'T'HH:mm:ss,SSSZ}", "level": "%p", "component": "%c{1.}", "cluster.name": "${sys:es.logs.cluster_name}", "node.name": "%node_name", %notEmpty{%node_and_cluster_id, } "message": "%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}" %exceptionAsJson }%n}, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@7f284218] unable to create manager for [/etc/elasticsearch-master/logs/wazuh-es_server.json] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@407a7f2a[pattern=/etc/elasticsearch-master/logs/wazuh-es-%d{yyyy-MM-dd}-%i.json.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=true), SizeBasedTriggeringPolicy(size=134217728)]), strategy=DefaultRolloverStrategy(min=-2147483648, max=2147483647, useMax=false), advertiseURI=null, layout=ESJsonLayout{patternLayout={"type": "server", "timestamp": "%d{yyyy-MM-dd'T'HH:mm:ss,SSSZ}", "level": "%p", "component": "%c{1.}", "cluster.name": "${sys:es.logs.cluster_name}", "node.name": "%node_name", %notEmpty{%node_and_cluster_id, } "message": 

```

Above is the error log. Thanks

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 17, 2019, 7:13am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/11 "2019-06-17T07:13:12Z")

</div>

```
"%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}" %exceptionAsJson }%n}, filePermissions=null, fileOwner=null]]
            at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:115)
            at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114)
            at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:188)
            at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:145)
            at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:61)
            at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:123)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
            at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547)
            at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
            at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:234)
            at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
            at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:294)
            at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
            at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
            at 
org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
            at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
            at org.elasticsearch.cli.Command.main(Command.java:90)
            at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
            at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)

    2019-06-17 14:59:25,522 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
            at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:235)
            at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:135)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
            at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547)
            at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
            at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:234)
            at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
            at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:294)
            at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
            at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
            at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
            at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
            at org.elasticsearch.cli.Command.main(Command.java:90)
            at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
            at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)

    2019-06-17 14:59:25,546 main ERROR RollingFileManager (/etc/elasticsearch-master/logs/wazuh-es.log) java.io.FileNotFoundException: /etc/elasticsearch-master/logs/wazuh-es.log (Permission denied) java.io.FileNotFoundException: /etc/elasticsearch-master/logs/wazuh-es.log (Permission denied)
            at java.io.FileOutputStream.open0(Native Method)
            at java.io.FileOutputStream.open(FileOutputStream.java:270)
            at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
            at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
            at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:640)
            at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:608)
            at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:113)
            at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114)
            at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:188)
            at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:145)
            at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:61)
            at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:123)
            at
```

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 17, 2019, 7:14am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/12 "2019-06-17T07:14:02Z")

</div>

```
org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959)
                at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899)
                at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891)
                at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
                at 
org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
                at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
                at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547)
                at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
                at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:234)
                at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
                at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:294)
                at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
                at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
                at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
                at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
                at org.elasticsearch.cli.Command.main(Command.java:90)
                at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
                at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
 2019-06-17 14:59:25,547 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@7f284218] unable to create manager for [/etc/elasticsearch-master/logs/wazuh-es.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@e3c0e40[pattern=/etc/elasticsearch-master/logs/wazuh-es-%d{yyyy-MM-dd}-%i.log.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=true), SizeBasedTriggeringPolicy(size=134217728)]), strategy=DefaultRolloverStrategy(min=-2147483648, max=2147483647, useMax=false), advertiseURI=null, layout=[%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@7f284218] unable to create manager for [/etc/elasticsearch-master/logs/wazuh-es.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@e3c0e40[pattern=/etc/elasticsearch-master/logs/wazuh-es-%d{yyyy-MM-dd}-%i.log.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=true), SizeBasedTriggeringPolicy(size=134217728)]), strategy=DefaultRolloverStrategy(min=-2147483648, max=2147483647, useMax=false), advertiseURI=null, layout=[%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n, filePermissions=null, fileOwner=null]]
            at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:115)
            at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114)
            at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:188)
            at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:145)
            at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:61)
            at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:123)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
            at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
            at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547)
            at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
            at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:234)
            at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
            at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:294)
            at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
            at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
            at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
            at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
            at org.elasticsearch.cli.Command.main(Command.java:90)
            at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
            at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
```

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 17, 2019, 7:14am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/13 "2019-06-17T07:14:39Z")

</div>

```
2019-06-17 14:59:25,548 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:235)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:135)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:234)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:127)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:294)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)

2019-06-17 14:59:25,567 main ERROR Null object returned for RollingFile in Appenders.
2019-06-17 14:59:25,568 main ERROR Null object returned for RollingFile in Appenders.
2019-06-17 14:59:25,568 main ERROR Unable to locate appender "rolling" for logger config "root"
2019-06-17 14:59:25,569 main ERROR Unable to locate appender "rolling_old" for logger config "root"
[2019-06-17T14:59:25,911][INFO][o.e.e.NodeEnvironment] [eta10] using [1] data paths, mounts [[/ (/dev/mapper/vg--root-lv--root)]], net usable_space [1.8tb], net total_space [2tb], types [ext4]
[2019-06-17T14:59:25,914][INFO][o.e.e.NodeEnvironment] [eta10] heap size [26.6gb], compressed ordinary object pointers [true]
[2019-06-17T14:59:25,916][INFO][o.e.n.Node] [eta10] node name [eta10], node ID [qDMaRgdWS92S_nyV3tQTJA], cluster name [wazuh-es]
[2019-06-17T14:59:25,916][INFO][o.e.n.Node] [eta10] version[7.1.0], pid[35684], build[default/tar/606a173/2019-05-16T00:43:15.323135Z], OS[Linux/4.4.0-131-generic/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_201/25.201-b09]    
[2019-06-17T14:59:25,916][INFO][o.e.n.Node] [eta10] JVM home [/usr/lib/jvm/java-8-oracle/jre]
[2019-06-17T14:59:25,916][INFO][o.e.n.Node] [eta10] JVM arguments [-Des.insecure.allow.root=true, -Des.path.home=/etc/elasticsearch-master, -Des.path.conf=/etc/elasticsearch-master/config, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=true]
[2019-06-17T14:59:27,787][INFO][o.e.p.PluginsService] [eta10] loaded module [aggs-matrix-stats]
[2019-06-17T14:59:27,787][INFO][o.e.p.PluginsService] [eta10] loaded module [analysis-common]
[2019-06-17T14:59:27,787][INFO][o.e.p.PluginsService] [eta10] loaded module [ingest-common]
[2019-06-17T14:59:27,787][INFO][o.e.p.PluginsService] [eta10] loaded module [ingest-geoip]
[2019-06-17T14:59:27,787][INFO][o.e.p.PluginsService] [eta10] loaded module [ingest-user-agent]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [lang-expression]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [lang-mustache]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [lang-painless]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [mapper-extras]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [parent-join]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [percolator]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [rank-eval]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [reindex]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [repository-url]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [transport-netty4]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-ccr]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-core]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-deprecation]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-graph]
[2019-06-17T14:59:27,788][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-ilm]
[2019-06-17T14:59:27,789][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-logstash]
[2019-06-17T14:59:27,789][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-ml]
[2019-06-17T14:59:27,789][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-monitoring]
[2019-06-17T14:59:27,789][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-rollup]
[2019-06-17T14:59:27,789][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-security]
[2019-06-17T14:59:27,789][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-sql]
[2019-06-17T14:59:27,789][INFO][o.e.p.PluginsService] [eta10] loaded module [x-pack-watcher]
[2019-06-17T14:59:27,789][INFO][o.e.p.PluginsService] [eta10] no plugins loaded
```

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 17, 2019, 7:14am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/14 "2019-06-17T07:14:56Z")

</div>

```
[2019-06-17T14:59:28,071][INFO][i.n.u.i.PlatformDependent] [eta10] Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
[2019-06-17T14:59:31,670][INFO][o.e.x.s.a.s.FileRolesStore] [eta10] parsed [0] roles from file [/etc/elasticsearch-master/config/roles.yml]
[2019-06-17T14:59:31,895][INFO][i.n.u.i.PlatformDependent] [eta10] Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
[2019-06-17T14:59:32,212][INFO][o.e.x.m.p.l.CppLogMessageHandler] [eta10] [controller/35880] [Main.cc@109] controller (64 bit): Version 7.1.0 (Build a8ee6de8087169) Copyright (c) 2019 Elasticsearch BV
[2019-06-17T14:59:32,561][DEBUG][o.e.a.ActionModule] [eta10] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-06-17T14:59:33,411][INFO][o.e.d.DiscoveryModule] [eta10] using discovery type [zen] and seed hosts providers [settings]
[2019-06-17T14:59:34,261][INFO][o.e.n.Node] [eta10] initialized
[2019-06-17T14:59:34,261][INFO][o.e.n.Node] [eta10] starting ...
[2019-06-17T14:59:34,435][INFO][o.e.t.TransportService] [eta10] publish_address {10.0.106.144:9300}, bound_addresses {10.0.106.144:9300}
[2019-06-17T14:59:34,447][INFO][o.e.b.BootstrapChecks] [eta10] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: initial heap size [2147483648] not equal to maximum heap size [32210157568]; this can cause resize pauses and prevents mlockall from locking the entire heap
[2019-06-17T14:59:34,459][INFO][o.e.n.Node] [eta10] stopping ...
2019-06-17 14:59:34,459 pool-1-thread-1 ERROR Unable to unregister MBeans java.security.AccessControlException: access denied ("javax.management.MBeanServerPermission" "createMBeanServer")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
        at java.security.AccessController.checkPermission(AccessController.java:884)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
        at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:465)
        at org.apache.logging.log4j.core.jmx.Server.unregisterLoggerContext(Server.java:248)
        at org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:340)
        at org.apache.logging.log4j.core.LoggerContext$1.run(LoggerContext.java:281)
        at org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry$RegisteredCancellable.run(DefaultShutdownCallbackRegistry.java:109)
        at org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry.run(DefaultShutdownCallbackRegistry.java:74)
        at java.lang.Thread.run(Thread.java:748)
```

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [June 17, 2019, 10:47am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/15 "2019-06-17T10:47:34Z")

</div>

It seems that your jvm.options doesn't take effect. Did you set environment variable ES\_JAVA\_OPTS ? If so, remove ES\_JAVA\_OPTS or set ES\_JAVA\_OPTS ="-Xms8g -Xmx8g".  
Following this document:[https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html)

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 18, 2019, 2:29am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/16 "2019-06-18T02:29:34Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/1/e/1ead9eb56c34162e87c3c2a0f7828c5258792d72.png)

Do you mean by this? Yes it's empty now.

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [June 18, 2019, 3:02am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/17 "2019-06-18T03:02:53Z")

</div>

No, execute command `export ES_JAVA_OPTS="-Xms8g -Xmx8g"` in shell.  
Note environment variable only take effects in current session.

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 18, 2019, 3:51am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/18 "2019-06-18T03:51:20Z")

</div>

> [@wangqinghuan](#):
>
> `export ES_JAVA_OPTS="-Xms8g -Xmx8g"`

Nothing happens after this. In the meantime, I would like to ask this too. I cant really find this log4j.json configuration file.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/3/23c5105e4ec84816c48f2e88ceb54bb6dfe07ed0.png)

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [June 19, 2019, 9:20am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/19 "2019-06-19T09:20:30Z")

</div>

Is there where should I check?

But there is a finding, i realized that there are 2 same files .

1. /elasticsearch/jvm.config
2. /elasticsearch/config/jvm.config

Is that correct? Both the files has set to -Xms8g -Xmx8g

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 17, 2019, 9:20am UTC](https://discuss.elastic.co/t/heap-size-not-tally/185789/20 "2019-07-17T09:20:33Z")

</div>

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