为 Elasticsearch 授予访问 Java 的适当权限
Give proper permissions for Elasticsearch to access Java
我在 Ubuntu VM 上安装了 elasticsearch,然后添加了 java,因为它丢失了。但是当我启动 elasticsearch 时,它会运行几秒钟然后崩溃。在日志中,我发现了以下消息:
[2021-10-26T09:36:37,275][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.common.inject.CreationException: Guice creation errors:
1) An exception was caught and reported. Message: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
at _unknown_
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
正如@leandrojmp 所说,版本 7.x 附带 java 所以只需安装它。感谢他,解决了我的问题!
我在 Ubuntu VM 上安装了 elasticsearch,然后添加了 java,因为它丢失了。但是当我启动 elasticsearch 时,它会运行几秒钟然后崩溃。在日志中,我发现了以下消息:
[2021-10-26T09:36:37,275][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.common.inject.CreationException: Guice creation errors:
1) An exception was caught and reported. Message: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
at _unknown_
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
正如@leandrojmp 所说,版本 7.x 附带 java 所以只需安装它。感谢他,解决了我的问题!