我一直在尝试在基于Centos 6.8的Elasticsearch中安装并运行docker container 5.0.1。我收到以下错误:
[2016-11-23T10:01:40,696][INFO ][i.n.u.i.PlatformDependent] 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 unstability.
[2016-11-23T10:01:40,825][INFO ][o.e.t.TransportService ] [bZesYxH] publish_address {172.17.0.147:9300}, bound_addresses {[::]:9300}
[2016-11-23T10:01:40,830][INFO ][o.e.b.BootstrapCheck ] [bZesYxH] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: bootstrap checks failed
initial heap size [2109734912] not equal to maximum heap size [32210157568]; this can cause resize pauses and prevents mlockall from locking the entire heap
max number of threads [1024] for user [seceon] is too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2016-11-23T10:01:40,836][INFO ][o.e.n.Node ] [bZesYxH] stopping ...
2016-11-23 10:01:40,837 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:457)
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:300)
at org.apache.logging.log4j.core.LoggerContext$1.run(LoggerContext.java:265)
at org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry$RegisteredCancellable.run(DefaultShutdownCallbackRegistry.java:102)
at org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry.run(DefaultShutdownCallbackRegistry.java:72)
at java.lang.Thread.run(Thread.java:745)
任何人都可以帮我理解这个错误以及如何解决它吗?
2016-11-23 10:01:40,837 pool-1-thread-1 ERROR Unable to unregister MBeans java.security.AccessControlException: access denied ("javax.management.MBeanServerPermission" "createMBeanServer")
答案 0 :(得分:0)
因此,根据错误,您需要增加vm.max_map_count
加max number of threads
。
要在终端中将以下命令中的vm.max_map_count
类型增加为root
:
sysctl -w vm.max_map_count = 262144
为了增加max number of threads
,您必须增加ulimit:
这可以通过在启动之前将ulimit -u 2048设置为root来完成 Elasticsearch,或者将nproc设置为2048 in /etc/security/limits.conf文件。