ERROR Failed to register mbeans java.security.AccessControlException: Access is denied ("javax.management.MBeanTrustPermission" "register")

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

+3


source to share


4 answers


A workaround as of Oracle Java 1.8.0_131 is to open the file <jre>/lib/security/java.policy

and add this line to the section grant

(that is, between the curly braces):

permission javax.management.MBeanTrustPermission "register";



Why a workaround? A vertical solution would be to specify an additional section grant

whose code should exactly get this permission.

+4


source


got the same error and answer here java.security.AccessControlException when using Ant, but works fine when calling java from console



Add a grant section to your java.policy file with permission javax.management.MBeanTrustPermission "register";

+1


source


I had this same problem when going from one instance to two instances locally.

I tried what Alice suggested above. Even reinstalled Elasticsearch (5.5.0). I also updated my Java to the latest version for Linux provided by Oracle.

There was nothing. Then I found that I couldn't just take the elasticsearch-5.5.0 / config directory and rename it to elasticsearch-5.5.0 / node1.

So ... I had to leave this config directory in place and clone it to node1 / node2.

EVEN if I tweak path.config in runtime commands ES still needs this baseline config directory.

Hope it helps.

0


source


I faced the same issue on Ubuntu-16.04 system. Solution: ElasticSeearch service cannot start for user "ROOT". To do this, change the ownership of the elasticsearch folder with the following command: go to your Elasticseach installation directory

$ sudo chown -R username: user_Group elasticsearch-5.5.0

$ / bin / elasticsearch

this will start the elasticsearch service. It works great for me.

0


source







All Articles