Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")

When starting for example Elasticsearch 5.5 : main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")

like image 772
zsayyed Avatar asked Jun 26 '17 20:06

zsayyed


2 Answers

Workaround with Oracle Java 1.8.0_131 is to open file <jre>/lib/security/java.policy and add this line to grant section (i.e. between curly brackets):

permission javax.management.MBeanTrustPermission "register";

Why workaround? The upright solution would be to specify extra grant section which code exactly should get this permission.

like image 110
Alice Vixie Avatar answered Nov 11 '22 04:11

Alice Vixie


got the same error and the answer is here java.security.AccessControlException when using Ant, but runs ok when invoking java from console

Append the grant section in java.policy file with permission javax.management.MBeanTrustPermission "register";

like image 25
Lord-Y Avatar answered Nov 11 '22 04:11

Lord-Y