CLIENT_0004:Unable to find valid Kerberos ticket cache (kinit)
背景
今天在使用JavaAPI来连接sqoop1.99.7的时候,遇到了个错误。
错误信息如下:
0 [main] WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
Exception in thread "main" org.apache.sqoop.common.SqoopException: CLIENT_0004:Unable to find valid Kerberos ticket cache (kinit)
at org.apache.sqoop.client.request.ResourceRequest.doHttpRequest(ResourceRequest.java:159)
at org.apache.sqoop.client.request.ResourceRequest.doHttpRequest(ResourceRequest.java:69)
at org.apache.sqoop.client.request.ResourceRequest.get(ResourceRequest.java:179)
at org.apache.sqoop.client.request.JobResourceRequest.read(JobResourceRequest.java:65)
at org.apache.sqoop.client.request.SqoopResourceRequests.readJob(SqoopResourceRequests.java:146)
at org.apache.sqoop.client.SqoopClient.getJobs(SqoopClient.java:403)
at com.fz.hadoop.sqoop.SqoopTest.main(SqoopTest.java:18)
Caused by: org.apache.hadoop.security.authentication.client.AuthenticationException: Authentication failed, status: 404, message: Not Found
at org.apache.hadoop.security.authentication.client.AuthenticatedURL.extractToken(AuthenticatedURL.java:275)
at org.apache.hadoop.security.authentication.client.PseudoAuthenticator.authenticate(PseudoAuthenticator.java:77)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticator.authenticate(DelegationTokenAuthenticator.java:131)
at org.apache.hadoop.security.authentication.client.KerberosAuthenticator.authenticate(KerberosAuthenticator.java:214)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticator.authenticate(DelegationTokenAuthenticator.java:131)
at org.apache.hadoop.security.authentication.client.AuthenticatedURL.openConnection(AuthenticatedURL.java:215)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticatedURL.openConnection(DelegationTokenAuthenticatedURL.java:322)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticatedURL.openConnection(DelegationTokenAuthenticatedURL.java:245)
at org.apache.sqoop.client.request.ResourceRequest.doHttpRequest(ResourceRequest.java:79)
… 6 more
问题分析:
从报错信息上看貌似是Authentication认证的一些错误
- 网上找了查了很多都没发现解决方案。
- 从官网security Authentication章节也没看到好的解决方案,想要配置Kerberos相关的Authentication,一看太麻烦感觉也不太靠谱
http://sqoop.apache.org/docs/1.99.7/security/AuthenticationAndAuthorization.html
解决方案
无意中在http://blog.csdn.net/jiacai2050/article/details/59117645这篇文章中发现了希望
所以,我试着在url后面加上/,果然好使了。
我的代码如下:
没加/之前
url加上/后
CLIENT_0004:Unable to find valid Kerberos ticket cache (kinit)的更多相关文章
- Kerberos ticket lifetime及其它
前言 之前的博文中涉及到了Kerberos的内容,这里对Kerberos ticket lifetime相关的内容做一个补充. ticket lifetime Kerberos ticket具有lif ...
- Kerberos Ticket管理
Kerberos Ticket管理 本章介绍如何管理您的Kerberos Ticket,这里的Ticket是指Ticket-Granting-Ticket(TGT),是您访问集群中服务的凭证.我们假设 ...
- 解决PKIX:unable to find valid certification path to requested target 的问题
这两天在twitter服务器上忽然遇到这样的异常: e: sun.security.validator.ValidatorException: PKIX path building failed: s ...
- 解决 java 使用ssl过程中出现"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
今天,封装HttpClient使用ssl时报一下错误: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorExc ...
- 解决PKIX(PKIX path building failed) 问题 unable to find valid certification path to requested target
最近在写java的一个服务,需要给远程服务器发送post请求,认证方式为Basic Authentication,在请求过程中出现了 PKIX path building failed: sun.se ...
- Pop3_解决PKIX:unable to find valid certification path to requested target 的问题
最近有公司pop3协议接收pp邮箱出现异常,连不上服务器,错误内容: e: sun.security.validator.ValidatorException: PKIX path building ...
- Unable to get valid context for root
登陆时报以下错误Unable to get valid context for rootLast login: Wed Jul 24 02:06:01 2013 from 10.64.41.3 单机模 ...
- unable to find valid certification path to requested target
Error : javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path bu ...
- https编程遇到PKIX:unable to find valid certification path to requested target 的问题
https编程遇到PKIX:unable to find valid certification path to requested target 的问题 2016-12-01 解决方案见:解决PKI ...
随机推荐
- HDU1698 Just a Hook(线段树&区间覆盖)题解
Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for m ...
- UVA 3942 Remember the Word (Trie+DP)题解
思路: 大白里Trie的例题,开篇就是一句很容易推出....orz 这里需要Trie+DP解决. 仔细想想我们可以得到dp[i]=sum(dp[i+len[x]]). 这里需要解释一下:dp是从最后一 ...
- Spring Boot详细学习地址转载
阿里中间件牛人,学习榜样,源码分析: https://fangjian0423.github.io/ 基础.详细.全面的教程: https://gitee.com/roncoocom/spring-b ...
- Linux mysql 添加远程连接
方法/步骤 第一步 远程连接上Linux系统,确保Linux系统已经安装上了MySQL数据库.登陆数据库. mysql -u$user -p $pwd 第二步 创建用户用来远程连接 GRANT ALL ...
- 【eclipse】阿里巴巴代码检测插件在线安装
https://p3c.alibaba.com/plugin/eclipse/update
- Node.js结合Selenium做Web自动化测试
发现腾讯课堂上有个node.js结合Selenium做Web自动化测试的教学视频, 听来感觉不错,一来老师讲的还不错,二来node.js这门语言会越来越热,学会总没什么坏处,三来发现CukeTest这 ...
- AtomicLong与LongAdder的区别
AtomicLong的原理 AtomicLong是通过依靠底层的CAS来保障原子性的更新数据,在要添加或者减少的时候,会使用死循环不断地cas到特定的值,从而达到更新数据的目的. LongAdder的 ...
- [.NET开发] C#连接MySQL的两个简单代码示例
实现代码一.使用的是mysql自带的驱动安装一下即可 这是一个简单的例子. 在这里有个问题:dataset如果没设主键的话,可能会引起一些对数库操作的问题,比如会造成updata出现错误. stati ...
- memcached-1.4.20 主要启动流程笔记
以下笔记主要是关注tcp模式下memcached的启动过程. main() 设置信号处理函数为sig_handler() 初始化系统设置,保存在全局变量settings里面 settings_init ...
- Confluence 6 嵌套用户组的影响
本部分说明了嵌套用户组对用户登录,权限和查看更新用户组的影响. 登录 如果用户属于一个授权的用户组或者授权用户组中的子用户组,当用户登录后,用户可以访问应用程序. 权限 如果用户属于的用户组或者用户组 ...