Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I resolve "ERROR: java.security.AccessControlException: access denied while starting events service"?

Issue

While starting the Events Service, it fails to start up due to following error stack trace:

 

[ERROR]  [ProcessQueue0]  [c.a.a.p.e.e.ElasticSearchExecutor]  This message was throttled 
[1] times: java.security.AccessControlException: access denied (
"java.lang.RuntimePermission" "getClassLoader")

[ERROR]  [ProcessQueue0]  [c.a.a.p.e.e.ElasticSearchExecutor] 
java.security.AccessControlException:
access denied ("java.lang.RuntimePermission"
"getClassLoader")

[ERROR]  [ProcessQueue0]  [c.a.a.p.e.e.ElasticSearchExecutor]      at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)

[ERROR]  [ProcessQueue0]  [c.a.a.p.e.e.ElasticSearchExecutor]
 

Solution

To resolve this issue, the classloader whitelist can be customised by tweaking the local Java Security Policy. This can be done:
  • system wide: $JAVA_HOME/lib/security/java.policy,
  • for just the elasticsearch user: /home/elasticsearch/.java.policy, or
  • from a file specified in the JAVA_OPTS environment variable with -Djava.security.policy=someURL:

    export JAVA_OPTS="${JAVA_OPTS} -Djava.security.policy=file:///path/to/my.policy`
    ./bin/elasticsearch 

 

Once this is complete, this error should be resolved.

 

Reference: https://www.elastic.co/guide/en/elasticsearch/reference/2.2/modules-scripting-security.html

Version history
Revision #:
2 of 2
Last update:
‎07-31-2018 04:40 PM
Updated by:
 
Labels (1)