[Bug]: Terminal fails with NoSuchMethodError in the apache/amoro Docker image because Hudi brings in hadoop-auth 2.10.0
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 57/100
调研方向
Start by tracing the Docker image's -Psupport-all-formats dependency packaging and the Terminal's local Spark session initialization at LocalSessionFactory.lazyInitContext. Check how the Hadoop 2.10.0 jars from Hudi coexist with Hadoop 3.4.3, then reproduce using the quickstart Terminal SQL in the issue. Done means the published image runs that script successfully without the setRuleMechanism NoSuchMethodError.
由索引模型根据 Issue 内容生成。
描述
What happened?
Following the quickstart with the apache/amoro image, the first script in Terminal fails before any SQL runs. The terminal log shows java.lang.RuntimeException: Run with ugi request failed., and the AMS log has the cause:
Caused by: java.lang.NoSuchMethodError: 'void org.apache.hadoop.security.HadoopKerberosName.setRuleMechanism(java.lang.String)'
at org.apache.hadoop.security.HadoopKerberosName.setConfiguration(HadoopKerberosName.java:84) ~[hadoop-client-api-3.4.3.jar:?]
at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:313) ~[hadoop-client-api-3.4.3.jar:?]
at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:298) ~[hadoop-client-api-3.4.3.jar:?]
at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:585) ~[hadoop-client-api-3.4.3.jar:?]
at org.apache.spark.util.Utils$.getCurrentUserName(Utils.scala:2417) ~[spark-core_2.12-3.5.8.jar:3.5.8]
at org.apache.spark.SparkContext.<init>(SparkContext.scala:329) ~[spark-core_2.12-3.5.8.jar:3.5.8]
...
at org.apache.amoro.server.terminal.local.LocalSessionFactory.lazyInitContext(LocalSessionFactory.java:155)
The image's lib directory holds hadoop-client-api-3.4.3.jar next to hadoop-auth-2.10.0.jar, hadoop-common-2.10.0.jar and the other Hadoop 2.10.0 jars. HadoopKerberosName from hadoop-client-api 3.4.3 calls KerberosName.setRuleMechanism, and the KerberosName that gets loaded comes from hadoop-auth 2.10.0, which does not have that method. The Hadoop 2 jars come from the Hudi format, which the image includes through -Psupport-all-formats:
org.apache.hudi:hudi-java-client:jar:0.14.1:compile
\- org.apache.hudi:hudi-client-common:jar:0.14.1:compile
\- org.apache.hudi:hudi-common:jar:0.14.1:compile
\- org.apache.hbase:hbase-client:jar:2.4.9:compile
+- org.apache.hadoop:hadoop-auth:jar:2.10.0:compile
\- org.apache.hadoop:hadoop-common:jar:2.10.0:compile
To check the cause, I started the same master-snapshot image with only lib/hadoop-auth-2.10.0.jar deleted inside the container. With that change the same script finishes, SELECT * FROM db.user returns the three rows, and the table details page loads.
I expected the quickstart Terminal to work in the published image.
Affects Versions
0.9.0-incubating (apache/amoro:latest, version 0.9.0-incubating(5a64126)) and master (apache/amoro:master-snapshot, version 0.9-SNAPSHOT(6af75bb)). I also built the distribution from master at 961f2de with the profiles the image workflow uses (-Psupport-all-formats -Pno-extended-disk-storage -Pno-plugin-bin). Its lib has the same Hadoop 2.10.0 jars, and the Terminal fails the same way with it.
What table formats are you seeing the problem on?
Iceberg
What engines are you seeing the problem on?
AMS
How to reproduce
docker run -p 1630:1630 -e JVM_XMS=1024 apache/amoro /entrypoint.sh ams, which is the AMS service of the quickstart docker-compose file.- Log in as admin/admin, create the optimizer group
local, then an Internal catalogdemo_catalogwith the Iceberg format and Hadoop storage (warehouse/tmp/warehouse/demo). - In Terminal, run the quickstart script for the Iceberg format:
CREATE DATABASE IF NOT EXISTS db;
CREATE TABLE IF NOT EXISTS db.user (id INT, name string, ts TIMESTAMP) USING iceberg PARTITIONED BY (days(ts));
INSERT OVERWRITE db.user VALUES (1, "eric", timestamp("2022-07-01 12:32:00")),
(2, "frank", timestamp("2022-07-02 09:11:00")), (3, "lee", timestamp("2022-07-02 10:11:00"));
SELECT * FROM db.user;
I did steps 2 and 3 through the dashboard's REST endpoints (/api/ams/v1/... with X-Request-Source: Web), which is what the UI calls. The terminal log status is Failed and nothing is created.
Relevant log output
2026/11/10 04:08:05 new sql script submit, current thread pool state. [Active: 1, PoolSize: 1]
2026/11/10 04:08:05 terminal session dose not exists. create session first
2026/11/10 04:08:06 something error when execute script.
2026/11/10 04:08:06 java.lang.RuntimeException: Run with ugi request failed.
at org.apache.amoro.table.TableMetaStore.call(TableMetaStore.java:282)
Anything else
#1695 had the same setRuleMechanism error after the Spark 3.3 upgrade in 2023. I only tried the Docker images, not the binary tarball. Creating a namespace and a table through the Iceberg REST endpoint of the same AMS worked, so the failure I saw is limited to the Terminal's local Spark session.
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
- 主要语言
- Java
- 星标
- 1.2k
- 派生
- 398
- 平均合并
- 3 天 13 小时
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/amoro 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 2 天内回复
-
[Doc]: Clarify that catalog-level table properties should be added via the "Table properties" interface, and the "table." prefix is only required when using the raw "Properties" interface可能已有人在做 @Akeron-Zhu 于 8 天前认领。 未关闭type:improvement
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 2 天内回复
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 2 天内回复
-
[Bug]: Configurations.equals is asymmetric for different key sets可能已有人在做 @sivakumar-mahalingam 于 1 天前认领。 未关闭type:bug
apache/amoro#4482 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
langchain4j/langchain4j#7068 ·
维护者通常 1 天内回复
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 73/100
opensearch-project/k-NN#3693 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
[Bug]: Encrypted PDF portfolios show an empty portfolio panel可能已有人在做 @christophmertins 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Stirling-Tools/Stirling-PDF#8864 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
CodingDocs/awesome-java#41 · 1 条评论 ·