You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "Jrebel-i (via GitHub)" <gi...@apache.org> on 2024/03/19 10:58:50 UTC
[I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Jrebel-i opened a new issue, #6198:
URL: https://github.com/apache/kyuubi/issues/6198
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.
### Describe the bug
Approved by kinit and connected via beeline, but kept reporting an error that the hadoop user had no permissions,Users who appear to have directly used the kyuubi startup service
[huchao@ip-10-0-20-117 hadoop]$ klist
Ticket cache: FILE:/tmp/krb5cc_2702
Default principal: huchao@COMPUTE.INTERNAL
Valid starting Expires Service principal
03/19/2024 01:57:02 03/19/2024 11:57:02 krbtgt/COMPUTE.INTERNAL@COMPUTE.INTERNAL
renew until 03/20/2024 01:57:02
[hadoop@ip-10-0-20-117 ~]$ sudo ps -ef|grep kyuubi
hadoop 11150 29130 0 05:20 pts/3 00:00:00 grep --color=auto kyuubi
hadoop 26559 1 3 05:14 pts/1 00:00:15 /etc/alternatives/jre/bin/java -XX:+IgnoreUnrecognizedVMOptions -Dio.netty.tryReflectionSetAccessible=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.nio.cs=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.security.tools.keytool=ALL-UNNAMED --add-opens=java.base/sun.security.x509=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED -cp /mnt/kyuubi/conf:/mnt/kyuubi/web-ui:/mnt/kyuubi/jars/*:/etc/hadoop/conf org.apache.kyuubi.s
erver.KyuubiServer
### Affects Version(s)
1.8.1
### Kyuubi Server Log Output
```logtalk
Connection command:
beeline -u "jdbc:hive2://$(hostname -f):10009/default; principal=hive/$(hostname -f)@COMPUTE.INTERNAL"
But an error is reported: Caused by: org.apache.spark.sql.catalyst.analysis.AccessControlException: com.amazonaws.emr.recordserver.remote.AuthorizationException: [ Permission Denied: User hadoop does not have _any permission on default ]
at com.amazonaws.emr.recordserver.authz.AuthorizerImpl.authorize(Authorizer.scala:393)
at com.amazonaws.emr.recordserver.handler.AuthorizationHandler.$anonfun$channelRead0$1(AuthorizationHandler.scala:33)
at com.amazonaws.emr.recordserver.metrics.Metrics$.withMetering(Metrics.scala:49)
at com.amazonaws.emr.recordserver.handler.AuthorizationHandler.channelRead0(AuthorizationHandler.scala:33)
```
### Kyuubi Engine Log Output
_No response_
### Kyuubi Server Configurations
_No response_
### Kyuubi Engine Configurations
_No response_
### Additional context
_No response_
### Are you willing to submit PR?
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [X] No. I cannot submit a PR at this time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2008692545
At least the question is converted to a pure Spark issue, I know nothing about AWS EMR-specific internal authZ mechanism, you may consult the AWS support team.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "Jrebel-i (via GitHub)" <gi...@apache.org>.
Jrebel-i commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2008680628
If I had used spark-sql directly, I could have submitted the job by switching system users
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "Jrebel-i (via GitHub)" <gi...@apache.org>.
Jrebel-i commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2008678113
Yes, as you said, the same problem does occur. I would like to ask if there is any way to solve it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2006843475
Hello @Jrebel-i,
Thanks for finding the time to report the issue!
We really appreciate the community's efforts to improve Apache Kyuubi.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "Jrebel-i (via GitHub)" <gi...@apache.org>.
Jrebel-i commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2008586416
hadoop users don't seem to be involved.
/usr/lib/spark/bin/spark-submit \
--class org.apache.kyuubi.engine.spark.SparkSQLEngine \
--conf spark.hive.server2.thrift.resultset.default.fetch.size=1000 \
--conf spark.kyuubi.client.ipAddress=10.0.21.233 \
--conf spark.kyuubi.engine.credentials=SERUUwACEDEwLjAuMjEuMjMzOjgwMjBkAAZodWNoYW8GaHVjaGFvRGhpdmUvaXAtMTAtMC0yMS0y
MzMuYXAtc291dGhlYXN0LTIuY29tcHV0ZS5pbnRlcm5hbEBDT01QVVRFLklOVEVSTkFMigGOWb+4
xIoBjn3MPMQEAhTF5kXmfEKOCk2AnZUgEXZU66rwpBVIREZTX0RFTEVHQVRJT05fVE9LRU4QMTAu
MC4yMS4yMzM6ODAyMBAxMC4wLjIxLjIzMzo5NjAwJAAGaHVjaGFvBmh1Y2hhbwRoaXZligGOWb+5
WIoBjn3MPVgEAhQXCFR0GuPiDeYTGbz2peZOGqCU1QZrbXMtZHRCa21zOi8vaHR0cEBpcC0xMC0w
LTIxLTIzMy5hcC1zb3V0aGVhc3QtMi5jb21wdXRlLmludGVybmFsOjk2MDAva21zAA== \
--conf spark.kyuubi.engine.engineLog.path=/mnt/kyuubi/work/huchao/kyuubi-spark-sql-engine.log.0 \
--conf spark.kyuubi.engine.submit.time=1710902721076 \
--conf spark.kyuubi.ha.enabled=true \
--conf spark.kyuubi.ha.engine.ref.id=198ea263-7352-4fbd-8d64-e25668724a5d \
--conf spark.kyuubi.ha.namespace=/kyuubi_1.8.1_USER_SPARK_SQL/huchao/default \
--conf spark.kyuubi.ha.zookeeper.client.port=2181 \
--conf spark.kyuubi.ha.zookeeper.quorum=ip-10-0-21-233.ap-southeast-2.compute.internal \
--conf spark.kyuubi.server.ipAddress=10.0.21.233 \
--conf spark.kyuubi.session.connection.url=ip-10-0-21-233.ap-southeast-2.compute.internal:10009 \
--conf spark.kyuubi.session.engine.idle.timeout=PT1M \
--conf spark.kyuubi.session.real.user=huchao \
--conf spark.app.name=kyuubi_USER_SPARK_SQL_huchao_default_198ea263-7352-4fbd-8d64-e25668724a5d \
--conf spark.yarn.maxAppAttempts=1 \
--conf spark.yarn.tags=KYUUBI,198ea263-7352-4fbd-8d64-e25668724a5d \
--proxy-user huchao /mnt/kyuubi/externals/engines/spark/kyuubi-spark-sql-engine_2.12-1.8.1.jar
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "Jrebel-i (via GitHub)" <gi...@apache.org>.
Jrebel-i commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2008702937
However, if I use livy, this problem doesn't seem to occur. I submit spark sql queries through hue's livy connection.
show tables in ods_db;
Error: com.amazonaws.emr.recordserver.remote.AuthorizationException: [ Permission Denied: User huchao does not have _any permission on default ] at com.amazonaws.emr.recordserver.authz.AuthorizerImpl.authorize(Authorizer.scala:393) at com.amazonaws.emr.recordserver.handler.AuthorizationHandler.$anonfun$channelRead0$1(AuthorizationHandler.scala:33) at com.amazonaws.emr.recordserver.metrics.Metrics$.withMetering(Metrics.scala:49) at
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "Jrebel-i (via GitHub)" <gi...@apache.org>.
Jrebel-i commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2008597918
View the /var/log/emr-record-server/emr-record-server.log file
Pass the hadoop user authentication
2024-03-20 03:04:35 INFO LoggingHandler:148 - [] [id: 0x333ff8b1, L:/127.0.0.1:10007] READ: [id: 0xa1d0968d, L:/127.0.0.1:10007 - R:/127.0.0.1:55788]
2024-03-20 03:04:35 INFO LoggingHandler:148 - [] [id: 0x333ff8b1, L:/127.0.0.1:10007] READ COMPLETE
2024-03-20 03:04:35 INFO NettyServerChannel:13 - [] Received connect: [id: 0xa1d0968d, L:/127.0.0.1:10007 - R:/127.0.0.1:55788]
2024-03-20 03:04:35 INFO AuthenticationHandler:13 - [48762b29-6fe8-4839-ab0a-3c93bae19cf3] msg is AuthenticationMessage
2024-03-20 03:04:35 INFO AuthenticationHandler:13 - [48762b29-6fe8-4839-ab0a-3c93bae19cf3] Authentication Successful user: UserInfo(995,hadoop,Set(hadoop, hdfsadmingroup, emr_record_server, trusted-engine)) for msg: AuthenticationMessage
2024-03-20 03:04:35 INFO AuthenticationHandler:13 - [61d49af5-b6cf-4dfa-82d0-fcbfa6aa451f] msg is DatabaseExistsRequest
2024-03-20 03:04:35 INFO AuthenticationHandler:13 - [61d49af5-b6cf-4dfa-82d0-fcbfa6aa451f] entered happy case
2024-03-20 03:04:35 INFO AuthenticationHandler:13 - [61d49af5-b6cf-4dfa-82d0-fcbfa6aa451f] Request has been authenticated
2024-03-20 03:04:35 INFO ValidationHandler:13 - [61d49af5-b6cf-4dfa-82d0-fcbfa6aa451f] msg is DatabaseExistsRequest
2024-03-20 03:04:35 INFO AuthorizationHandler:13 - [61d49af5-b6cf-4dfa-82d0-fcbfa6aa451f] msg is DatabaseExistsRequest
2024-03-20 03:04:35 INFO SparkRangerAuthProvider:13 - [61d49af5-b6cf-4dfa-82d0-fcbfa6aa451f] Verifying access for hadoop
access type: Any
user groups: Set(hadoop, hdfsadmingroup, emr_record_server, trusted-engine)
database: Some(default)
table: None
columns: Set()
path: None
load paths: List()
suppress audit: false
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2008603128
By default, Kyuubi leverages the [Hadoop User Impersonation](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/Superusers.html) feature to reduce the keytab management effort on kerberized Hadoop cluster.
To simply verify your cluster setup, you can:
1. switch to the OS user that runs the Kyuubi server
2. Kyuubi runs `kinit` in the background, please run `klist` to make sure there is a valid TGT cache for principal "hadoop"
3. submit a Spark application (i.e. SparkPi or something) with an additional option `--proxy-user huchao`
I suppose the same error will occur, you should fix it first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] kyuubi combines the spark plugin built-in in emr [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on issue #6198:
URL: https://github.com/apache/kyuubi/issues/6198#issuecomment-2007047819
> users who appear to have directly used the kyuubi startup service
You can find the `spark-submit` command in Kyuubi's log
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org