Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Lack of database.type mandatory check in config, leading to NPE in existing MySQL config check #2733

Closed
2 tasks done
Tracked by #2176
paul8263 opened this issue Apr 11, 2024 · 0 comments · Fixed by #2734
Closed
2 tasks done
Tracked by #2176
Labels
type:bug Something isn't working

Comments

@paul8263
Copy link
Contributor

What happened?

Given malformatted config.yaml or missing database.type, then the existing mysql config check segment would throw NPE. The exception message is misleading.

Affects Versions

master/0.6.1

What engines are you seeing the problem on?

Core, Flink, Spark

How to reproduce

Provide a config.yaml without database.type option. Then start ams.

Relevant log output

2024-04-10 17:44:14,579 ERROR [main] [com.netease.arctic.server.ArcticServiceContainer] [] - AMS encountered an unknown exception, will exist
java.lang.NullPointerException: null
        at com.netease.arctic.server.ArcticServiceContainer$ConfigurationHelper.validateConfig(ArcticServiceContainer.java:415) ~[amoro-ams-server-0.6.0.jar:?]
        at com.netease.arctic.server.ArcticServiceContainer$ConfigurationHelper.initServiceConfig(ArcticServiceContainer.java:392) ~[amoro-ams-server-0.6.0.jar:?]
        at com.netease.arctic.server.ArcticServiceContainer$ConfigurationHelper.init(ArcticServiceContainer.java:375) ~[amoro-ams-server-0.6.0.jar:?]
        at com.netease.arctic.server.ArcticServiceContainer.initConfig(ArcticServiceContainer.java:189) ~[amoro-ams-server-0.6.0.jar:?]
        at com.netease.arctic.server.ArcticServiceContainer.<init>(ArcticServiceContainer.java:99) ~[amoro-ams-server-0.6.0.jar:?]
        at com.netease.arctic.server.ArcticServiceContainer.main(ArcticServiceContainer.java:105) [amoro-ams-server-0.6.0.jar:?]
2024-04-10 18:44:32,300 ERROR [JettyServerThreadPool-153] [com.netease.arctic.server.dashboard.DashboardServer] [] - Failed to handle request
java.lang.IllegalStateException: Cannot find memory in properties
        at org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkState(Preconditions.java:590) ~[iceberg-bundled-guava-1.3.0.jar:?]
        at com.netease.arctic.ams.api.resource.Resource.getRequiredProperty(Resource.java:70) ~[amoro-ams-api-0.6.0.jar:?]
        at com.netease.arctic.server.manager.LocalOptimizerContainer.buildOptimizerStartupArgsString(LocalOptimizerContainer.java:55) ~[amoro-ams-server-0.6.0.jar:?]
        at com.netease.arctic.server.manager.LocalOptimizerContainer.doScaleOut(LocalOptimizerContainer.java:37) ~[amoro-ams-server-0.6.0.jar:?]
        at com.netease.arctic.server.manager.AbstractResourceContainer.requestResource(AbstractResourceContainer.java:43) ~[amoro-ams-server-0.6.0.jar:?]
        at com.netease.arctic.server.dashboard.controller.OptimizerController.scaleOutOptimizer(OptimizerController.java:206) ~[amoro-ams-server-0.6.0.jar:?]
        at io.javalin.core.security.SecurityUtil.noopAccessManager(SecurityUtil.kt:20) ~[javalin-4.6.1.jar:4.6.1]
        at io.javalin.http.JavalinServlet.addHandler$lambda-0(JavalinServlet.kt:96) ~[javalin-4.6.1.jar:4.6.1]
        at io.javalin.http.JavalinServlet$lifecycle$2$1$1.invoke(JavalinServlet.kt:43) ~[javalin-4.6.1.jar:4.6.1]
        at io.javalin.http.JavalinServlet$lifecycle$2$1$1.invoke(JavalinServlet.kt:43) ~[javalin-4.6.1.jar:4.6.1]
        at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:98) ~[javalin-4.6.1.jar:4.6.1]
        at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85) ~[javalin-4.6.1.jar:4.6.1]
        at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:981) ~[?:1.8.0_121]
        at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2124) ~[?:1.8.0_121]
        at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85) ~[javalin-4.6.1.jar:4.6.1]
        at io.javalin.http.JavalinServletHandler.executeNextTask$lambda-10$lambda-9(JavalinServletHandler.kt:112) ~[javalin-4.6.1.jar:4.6.1]
        at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) ~[?:1.8.0_121]
        at java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:614) ~[?:1.8.0_121]
        at java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:1983) ~[?:1.8.0_121]
        at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:112) ~[javalin-4.6.1.jar:4.6.1]
        at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85) ~[javalin-4.6.1.jar:4.6.1]
        at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:981) ~[?:1.8.0_121]
        at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2124) ~[?:1.8.0_121]
        at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85) ~[javalin-4.6.1.jar:4.6.1]
        at io.javalin.http.JavalinServletHandler.executeNextTask$lambda-10$lambda-9(JavalinServletHandler.kt:112) ~[javalin-4.6.1.jar:4.6.1]
        at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) ~[?:1.8.0_121]
        at java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:614) ~[?:1.8.0_121]

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant