spark连接metastore(kerbors)揭秘

1、hivemeta开启meta后,spark-sql执行报错:

Caused by: GSSException: No valid credentials provided (Mechanism level: Server not found in Kerberos database (7) - LOOKING_UP_SERVER)

at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:770)

at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:248)

at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)

at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192)

... 55 more

Caused by: KrbException: Server not found in Kerberos database (7) - LOOKING_UP_SERVER

at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:73)

at sun.security.krb5.KrbTgsReq.getReply(KrbTgsReq.java:251)

at sun.security.krb5.KrbTgsReq.sendAndGetCreds(KrbTgsReq.java:262)

at sun.security.krb5.internal.CredentialsUtil.serviceCreds(CredentialsUtil.java:308)

at sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(CredentialsUtil.java:126)

at sun.security.krb5.Credentials.acquireServiceCreds(Credentials.java:458)

at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:693)

... 58 more

解决方案:

spark.kerberos.principal hdfs/[email protected]

spark.kerberos.keytab /BigData/run/hadoop/etc/hadoop/hdfs.keytab
spark.hadoop.hive.metastore.kerberos.principal hdfs/[email protected]

相关推荐
uhakadotcom24 分钟前
Astro 框架:快速构建内容驱动型网站的利器
前端·javascript·面试
uhakadotcom28 分钟前
了解Nest.js和Next.js:如何选择合适的框架
前端·javascript·面试
uhakadotcom29 分钟前
React与Next.js:基础知识及应用场景
前端·面试·github
uhakadotcom38 分钟前
Remix 框架:性能与易用性的完美结合
前端·javascript·面试
uhakadotcom1 小时前
Node.js 包管理器:npm vs pnpm
前端·javascript·面试
LaoZhangAI2 小时前
2025最全GPT-4o图像生成API指南:官方接口配置+15个实用提示词【保姆级教程】
前端
ONE_Gua2 小时前
chromium魔改——CDP(Chrome DevTools Protocol)检测01
前端·后端·爬虫
LaoZhangAI2 小时前
2025最全Cherry Studio使用MCP指南:8种强大工具配置方法与实战案例
前端
咖啡教室2 小时前
前端开发日常工作每日记录笔记(2019至2024合集)
前端·javascript
溪饱鱼2 小时前
Nuxt3能上生产吗?
前端