Invalid Initial heap size - Always

Anybody help me to get out from this issue.

ES version - 5.5.3
OS - Centos 7
Machine Memory - 8GB
Node - masternode
Java Version - 1.8.1_191 64bit

Unable to start elasticsearch.

JournalCtl Log:
Nov 07 06:12:00 tus3elkesmpin02 systemd[1]: Started Elasticsearch.
Nov 07 06:12:00 tus3elkesmpin02 elasticsearch[10730]: Invalid initial heap size: -Xms1000M
Nov 07 06:12:00 tus3elkesmpin02 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Nov 07 06:12:00 tus3elkesmpin02 systemd[1]: Unit elasticsearch.service entered failed state.
Nov 07 06:12:00 tus3elkesmpin02 systemd[1]: elasticsearch.service failed.

Do you have same setting for Xms and Xmx?

Yes it is same setting in jvm.options.

-Xms1000M
-Xmx1000M

Also if I do ,

ES_JAVA_OPTS="-Xms100m -Xmx1000m" /usr/share/elasticsearch/bin/elasticsearch

getting error,

2018-11-07 06:57:55,634 main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:585)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1848)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:322)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
        at org.apache.logging.log4j.core.jmx.Server.register(Server.java:389)
        at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:167)
        at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:140)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:556)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:261)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:221)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)
        at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:175)
        at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:99)
        at org.elasticsearch.cli.Command.main(Command.java:85)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)

Exception in thread "main" java.lang.IllegalStateException: status logger logged an error before logging was configured
        at org.elasticsearch.common.logging.LogConfigurator.checkErrorListener(LogConfigurator.java:128)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:117)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:316)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
        at org.elasticsearch.cli.Command.main(Command.java:88)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)
Refer to the log for complete error details.

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