Heap size Not tally

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

image

in JVM.options file :
-Xms8g
-Xmx12g

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

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

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

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

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?

can you provide your jvm.options and error log ?

## 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
/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

"%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
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)
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
[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)

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

image

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

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

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

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

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