apache / amoro

Apache Amoro (incubating) is a Lakehouse management system built on open data lake formats.
https://amoro.apache.org/
Apache License 2.0
874 stars 290 forks source link

[Bug]: access denied ("javax.management.MBeanTrustPermission" "register") #2908

Open hezhi3f opened 5 months ago

hezhi3f commented 5 months ago

What happened?

Problems encountered when submitting amoro tasks using Streamark

java.util.concurrent.CompletionException: java.lang.reflect.InvocationTargetException
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.streampark.flink.client.FlinkClient$.$anonfun$proxy$1(FlinkClient.scala:87)
    at org.apache.streampark.flink.proxy.FlinkShimsProxy$.$anonfun$proxy$1(FlinkShimsProxy.scala:60)
    at org.apache.streampark.common.util.ClassLoaderUtils$.runAsClassLoader(ClassLoaderUtils.scala:38)
    at org.apache.streampark.flink.proxy.FlinkShimsProxy$.proxy(FlinkShimsProxy.scala:60)
    at org.apache.streampark.flink.client.FlinkClient$.proxy(FlinkClient.scala:82)
    at org.apache.streampark.flink.client.FlinkClient$.submit(FlinkClient.scala:53)
    at org.apache.streampark.flink.client.FlinkClient.submit(FlinkClient.scala)
    at org.apache.streampark.console.core.service.impl.ApplicationServiceImpl.lambda$start$8(ApplicationServiceImpl.java:1655)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
    ... 3 more
Caused by: org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: failed when load catalog xxxx_catalog
    at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:372)
    at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222)
    at org.apache.flink.client.program.PackagedProgramUtils.getPipelineFromProgram(PackagedProgramUtils.java:158)
    at org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:82)
    at org.apache.streampark.flink.client.trait.FlinkClientTrait.getJobGraph(FlinkClientTrait.scala:252)
    at org.apache.streampark.flink.client.trait.FlinkClientTrait.getJobGraph$(FlinkClientTrait.scala:231)
    at org.apache.streampark.flink.client.impl.YarnSessionClient$.doSubmit(YarnSessionClient.scala:116)
    at org.apache.streampark.flink.client.trait.FlinkClientTrait.submit(FlinkClientTrait.scala:123)
    at org.apache.streampark.flink.client.trait.FlinkClientTrait.submit$(FlinkClientTrait.scala:60)
    at org.apache.streampark.flink.client.impl.YarnSessionClient$.submit(YarnSessionClient.scala:41)
    at org.apache.streampark.flink.client.FlinkClientHandler$.submit(FlinkClientHandler.scala:40)
    at org.apache.streampark.flink.client.FlinkClientHandler.submit(FlinkClientHandler.scala)
    ... 16 more
Caused by: java.lang.IllegalStateException: failed when load catalog xxxx_catalog
    at com.netease.arctic.catalog.CatalogLoader.load(CatalogLoader.java:176)
    at com.netease.arctic.catalog.CatalogLoader.loadCatalog(CatalogLoader.java:217)
    at com.netease.arctic.catalog.CatalogLoader.load(CatalogLoader.java:75)
    at com.netease.arctic.flink.InternalCatalogBuilder.createBaseArcticCatalog(InternalCatalogBuilder.java:47)
    at com.netease.arctic.flink.InternalCatalogBuilder.build(InternalCatalogBuilder.java:65)
    at com.netease.arctic.flink.catalog.ArcticCatalog.open(ArcticCatalog.java:120)
    at org.apache.flink.table.catalog.CatalogManager.createCatalog(CatalogManager.java:309)
    at org.apache.flink.table.operations.ddl.CreateCatalogOperation.execute(CreateCatalogOperation.java:68)
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:1092)
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:735)
    at org.apache.streampark.flink.core.FlinkStreamTableTrait.executeSql(FlinkStreamTableTrait.scala:389)
    at org.apache.streampark.flink.core.FlinkSqlExecutor$.$anonfun$executeSql$3(FlinkSqlExecutor.scala:137)
    at org.apache.streampark.flink.core.FlinkSqlExecutor$.$anonfun$executeSql$3$adapted(FlinkSqlExecutor.scala:61)
    at scala.collection.immutable.List.foreach(List.scala:388)
    at org.apache.streampark.flink.core.FlinkSqlExecutor$.executeSql(FlinkSqlExecutor.scala:61)
    at org.apache.streampark.flink.core.FlinkStreamTableTrait.sql(FlinkStreamTableTrait.scala:87)
    at org.apache.streampark.flink.cli.SqlClient$StreamSqlApp$.handle(SqlClient.scala:90)
    at org.apache.streampark.flink.core.scala.FlinkStreamTable.main(FlinkStreamTable.scala:51)
    at org.apache.streampark.flink.core.scala.FlinkStreamTable.main$(FlinkStreamTable.scala:48)
    at org.apache.streampark.flink.cli.SqlClient$StreamSqlApp$.main(SqlClient.scala:89)
    at org.apache.streampark.flink.cli.SqlClient$.delayedEndpoint$org$apache$streampark$flink$cli$SqlClient$1(SqlClient.scala:78)
    at org.apache.streampark.flink.cli.SqlClient$delayedInit$body.apply(SqlClient.scala:34)
    at scala.Function0.apply$mcV$sp(Function0.scala:34)
    at scala.Function0.apply$mcV$sp$(Function0.scala:34)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App.$anonfun$main$1$adapted(App.scala:76)
    at scala.collection.immutable.List.foreach(List.scala:388)
    at scala.App.main(App.scala:76)
    at scala.App.main$(App.scala:74)
    at org.apache.streampark.flink.cli.SqlClient$.main(SqlClient.scala:34)
    at org.apache.streampark.flink.cli.SqlClient.main(SqlClient.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
    ... 27 more
Caused by: java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:585)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1848)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:322)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
    at com.netease.arctic.shaded.org.apache.commons.pool2.impl.BaseGenericObjectPool.jmxRegister(BaseGenericObjectPool.java:938)
    at com.netease.arctic.shaded.org.apache.commons.pool2.impl.BaseGenericObjectPool.<init>(BaseGenericObjectPool.java:381)
    at com.netease.arctic.shaded.org.apache.commons.pool2.impl.GenericObjectPool.<init>(GenericObjectPool.java:153)
    at com.netease.arctic.ams.api.client.ThriftClientPool.<init>(ThriftClientPool.java:85)
    at com.netease.arctic.ams.api.client.AmsClientPools.buildClientPool(AmsClientPools.java:36)
    at com.netease.arctic.shaded.com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$2(LocalLoadingCache.java:141)
    at com.netease.arctic.shaded.com.github.benmanes.caffeine.cache.UnboundedLocalCache.lambda$computeIfAbsent$2(UnboundedLocalCache.java:238)
    at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
    at com.netease.arctic.shaded.com.github.benmanes.caffeine.cache.UnboundedLocalCache.computeIfAbsent(UnboundedLocalCache.java:234)
    at com.netease.arctic.shaded.com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108)
    at com.netease.arctic.shaded.com.github.benmanes.caffeine.cache.LocalLoadingCache.get(LocalLoadingCache.java:54)
    at com.netease.arctic.ams.api.client.AmsClientPools.getClientPool(AmsClientPools.java:23)
    at com.netease.arctic.PooledAmsClient.getIface(PooledAmsClient.java:43)
    at com.netease.arctic.PooledAmsClient.getCatalog(PooledAmsClient.java:56)
    at com.netease.arctic.catalog.CatalogLoader.load(CatalogLoader.java:99)
    ... 62 more

Flink v1.17.2、Amoro 0.6.1 This issue was only encountered on Streamark 2.1.4, 2.1.1 is running normally Later, it was found that the JRE file could be modified to solve this problem ${JAVA_HOME}/jre/lib/security/java.policy Add a line of content permission javax.management.MBeanTrustPermission "register"; I don't know if this is a bug

Affects Versions

0.6.1

What engines are you seeing the problem on?

No response

How to reproduce

No response

Relevant log output

No response

Anything else

No response

Are you willing to submit a PR?

Code of Conduct

czy006 commented 4 months ago

@hezhi3f try to use 0.7.0 rc