Elasticsearch 5.0.1 java permission issue
<p>I have been trying to install and run <a href="https://github.com/elastic/elasticsearch" rel="nofollow noreferrer">Elasticsearch</a> 5.0.1 in a <a href="https://docker.com" rel="nofollow noreferrer">docker container</a> based on Centos 6.8. I am getting the following error:</p>

<pre><code>[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)
</code></pre>

<p>Can anyone please help me to understand this error and how to fix it?</p>

<pre><code>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")
</code></pre>