我试图通过docker-compose在Docker上运行ElasticSearch。每当我尝试启动容器时,我都会收到此错误:
Running as non-root...
elasticsearch | 2017-01-06 00:08:23,861 main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
elasticsearch | at java.security.AccessControlContext.checkPermission(AccessControlContext.jav a:472)
elasticsearch | at java.lang.SecurityManager.checkPermission(SecurityManager.java:585)
elasticsearch | at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1848)
elasticsearch | at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Default MBeanServerInterceptor.java:322)
elasticsearch | at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
elasticsearch | at org.apache.logging.log4j.core.jmx.Server.register(Server.java:389)
elasticsearch | at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:167)
elasticsearch | at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:140)
elasticsearch | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:541)
elasticsearch | at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:258)
elasticsearch | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:206)
elasticsearch | at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:220)
elasticsearch | at org.apache.logging.log4j.core.config.Configurator.initialize(Configurator.java:197)
elasticsearch | at org.elasticsearch.common.logging.LogConfigurator.configureStatusLogger(LogConfigurator.java:125)
elasticsearch | at org.elasticsearch.common.logging.LogConfigurator.configureWithoutConfig(LogConfigurator.java:67)
elasticsearch | at org.elasticsearch.cli.Command.main(Command.java:59)
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)
elasticsearch |
elasticsearch | 2017-01-06 00:08:25,813 main ERROR RollingFileManager (/data/elasticsearch.log) java.io.FileNotFoundException: /data/elasticsearch.log (Permission denied) java.io.FileNotFoundException: /data/elasticsearch.log (Permission denied)
这是我的docker-compose.yml文件:
elasticsearch:
container_name: elasticsearch
image: "itzg/elasticsearch:5.1.1"
ports:
- "9200:9200"
- "9300:9300"
volumes:
- "./data/elasticsearch/:/data"