Elasticsearch start

Hi I'm current on upgrade my elk from 2.3.4 to 5.1.2 and I have a troble with ES start.

I tried start it as daemon (init file) start as root but run as function USER, and i tried also as the user and no daemon, just a java call, but I get the same error msg. Can someone help me please?

[root@hostname]# daemon --user=username --pidfile=/var/run/elasticsearch.pid '/usr/lib/jvm/jre/bin/java -Duser.name=username -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError 
-XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Djna.nosys=true -Djava.awt.headless=true -Des.path.home=/opt/elasticsearch -Des.path.logs=/opt/elasticsearch/logs -Des.path.data=/opt/elasticsearch
-Des.path.work=/opt/elasticsearch/tmp -cp /opt/elasticsearch/lib/elasticsearch-5.1.2.jar:/opt/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch start \"\$@\" <&- & >/dev/null 2>&1'


[root@hostname]# 2017-02-24 07:50:52,424 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:541)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:220)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)
        at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:125)
        at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:67)
        at org.elasticsearch.cli.Command.main(Command.java:85)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)

starts elasticsearch

Option                Description
------                -----------
-E <KeyValuePair>     Configure a setting
-V, --version         Prints elasticsearch version information and exits
-d, --daemonize       Starts Elasticsearch in the background
-h, --help            show help
-p, --pidfile <Path>  Creates a pid file in the specified path on start
-q, --quiet           Turns off standard ouput/error streams logging in console
-s, --silent          show minimal output
-v, --verbose         show verbose output
ERROR: Positional arguments not allowed, found [start, "$@"]

Hey,

can you start /opt/elasticsearch/bin/elasticsearch as the user you want to run at, just to test if that works?

This looks as if you got two error messages in there... I am confused about that...

--Alex

Same issue

-bash-4.1$ /opt/elasticsearch/bin/elasticsearch start
2017-02-27 11:28:01,748 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:541)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:220)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)
        at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:125)
        at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:67)
        at org.elasticsearch.cli.Command.main(Command.java:85)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)

starts elasticsearch

Option                Description
------                -----------
-E <KeyValuePair>     Configure a setting
-V, --version         Prints elasticsearch version information and exits
-d, --daemonize       Starts Elasticsearch in the background
-h, --help            show help
-p, --pidfile <Path>  Creates a pid file in the specified path on start
-q, --quiet           Turns off standard ouput/error streams logging in console
-s, --silent          show minimal output
-v, --verbose         show verbose output
ERROR: Positional arguments not allowed, found [start]

Hey,

is this a stock Elasticsearch 5.1.2 distribution? You just took the zip file and unzipped it? Did you do anything special when installing elasticsearch?

One more thing: Can you try to install a java JDK instead of an JRE (at least the path you showed in your in the first post, seems to indicate it is a jre).

--Alex

Hi Alex,

I took the zip and removed a .bat .dll (files which not linux relavant) and put in the /opt I customized the jvm.option elasticsearch.yml and go

this is my java pkg
java-1.8.0-openjdk-headless
java-1.8.0-openjdk

Hey,

why did you run bin/elasticsearch start - can you run without the start?

--Alex

Hi Alex,

now without start

-bash-4.1$ /opt/elasticsearch/bin/elasticsearch
2017-02-28 05:50:48,189 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:541)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:220)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)
        at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:125)
        at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:67)
        at org.elasticsearch.cli.Command.main(Command.java:85)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)

2017-02-28 05:50:48,885 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:541)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:116)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:83)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:272)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112)
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
        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:89)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)

2017-02-28 05:50:50,750 Thread-4 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:246)
        at org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:317)
        at org.apache.logging.log4j.core.AbstractLifeCycle.stop(AbstractLifeCycle.java:127)
        at org.apache.logging.log4j.core.config.Configurator.shutdown(Configurator.java:344)
        at org.elasticsearch.bootstrap.Bootstrap$5.run(Bootstrap.java:192)

Hey,

you might want to check

--Alex

Hi Alex,

read the topics

-bash-4.1$ chown user:group -R /opt/elasticsearch

jmx was already inactiv
-bash-4.1$ grep jmx *
jvm.options:#-Dlog4j2.disable.jmx=true
logging.yml:  #com.amazonaws.jmx.SdkMBeanRegistrySupport: ERROR

start with path parameter
-bash-4.1$ /opt/elasticsearch/bin/elasticsearch -Epath.conf=/opt/elasticsearch/config/

same Error

hey

can you put the full start up log into a gist/pastebin?

--Alex

Hi Alex

sure

https://paste.ofcode.org/jwbXgT6vZyH52hzVKuf8k

Hey,

first, the JXM line is commented out. It is not applied. This means, you very likely have modified the file?

second, the error why Elasticsearch does not start is not about the JXM error. You omitted the other issue in this post, which states that you cannot configure the number of shards and number of replicas in your elasticsearch configuration. When I asked if you took the standard distribution I was also assuming you did not have your own configuration files. Apparently the whole config directory is very custom, so we just misunderstood each other there.

--Alex

Hi Alex

i can say that the config is the standard config from 2.3.4, and I try to modify so that is working with our deployment process and with 5.x. My problem is only the permission denied because the other errors are "only" WARN-s and I know how can I change the configuration.
Sould I increase the loglevel?

Mit Freundlichen Grüßen
Krisz

Hi Alex,

i changed the config now and the ES starting I but the errors still there..

-bash-4.1$ /opt/elasticsearch/bin/elasticsearch &
[1] 9219
-bash-4.1$ 2017-03-01 07:13:05,661 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:541)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:220)
        at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)
        at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:125)
        at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:67)
        at org.elasticsearch.cli.Command.main(Command.java:85)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)

2017-03-01 07:13:05,924 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:541)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:116)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:83)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:272)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112)
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
        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:89)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)

[2017-03-01T07:13:05,927][WARN ][o.e.c.l.LogConfigurator  ] ignoring unsupported logging configuration file [/opt/elasticsearch/config/logging.yml], logging is configured via [/opt/elasticsearch/config/log4j2.properties]
[2017-03-01T07:13:05,969][WARN ][o.e.b.JNANatives         ] unable to install syscall filter:
java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed
        at org.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:361) ~[elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.JNANatives.trySeccomp(JNANatives.java:215) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Natives.trySeccomp(Natives.java:99) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:105) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:176) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) [elasticsearch-5.1.2.jar:5.1.2]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.1.2.jar:5.1.2]

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