背景

今天在使用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认证的一些错误

  1. 网上找了查了很多都没发现解决方案。
  2. 从官网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)的更多相关文章

  1. Kerberos ticket lifetime及其它

    前言 之前的博文中涉及到了Kerberos的内容,这里对Kerberos ticket lifetime相关的内容做一个补充. ticket lifetime Kerberos ticket具有lif ...

  2. Kerberos Ticket管理

    Kerberos Ticket管理 本章介绍如何管理您的Kerberos Ticket,这里的Ticket是指Ticket-Granting-Ticket(TGT),是您访问集群中服务的凭证.我们假设 ...

  3. 解决PKIX:unable to find valid certification path to requested target 的问题

    这两天在twitter服务器上忽然遇到这样的异常: e: sun.security.validator.ValidatorException: PKIX path building failed: s ...

  4. 解决 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 ...

  5. 解决PKIX(PKIX path building failed) 问题 unable to find valid certification path to requested target

    最近在写java的一个服务,需要给远程服务器发送post请求,认证方式为Basic Authentication,在请求过程中出现了 PKIX path building failed: sun.se ...

  6. Pop3_解决PKIX:unable to find valid certification path to requested target 的问题

    最近有公司pop3协议接收pp邮箱出现异常,连不上服务器,错误内容: e: sun.security.validator.ValidatorException: PKIX path building ...

  7. 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 单机模 ...

  8. unable to find valid certification path to requested target

    Error : javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path bu ...

  9. 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 ...

随机推荐

  1. HDU1143 (递推)题解

    Tri Tiling Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total ...

  2. 【第二十八章】 springboot + zipkin(brave定制-AsyncHttpClient)

    brave本身没有对AsyncHttpClient提供类似于brave-okhttp的ClientRequestInterceptor和ClientResponseInterceptor,所以需要我们 ...

  3. Python time strptime()与time strftime()

    time strftime()接收时间元组,返回表示时间的字符串. time strptime()把时间字符串,解析成一个时间元组. import time t = time.strftime('%Y ...

  4. gulp报错插件gulp-notify 配置项

    var notify = require("gulp-notify"); module.exports = function(){ var args = Array.prototy ...

  5. Unity3D学习笔记(十):Physics类和射线

    物理系统:碰撞器.触发器等 力:有大小有方向的矢量,有受力点位置(和向量的区别) ----F = ma(m质量,a加速度,质量越大,加速度越小,停下来越慢) ----m1v1 = m2v2(冲量守恒定 ...

  6. Darknet卷基层浅层特征可视化教程

    目录 Darknet浅层可视化教程 说明 处理步骤 使用python可视化txt文件 Darknet浅层可视化教程 说明 针对YOLO官方提供的c语言版的darknet进行了修改,添加了一些函数,进行 ...

  7. The way to Go(6): Go程序的基本结构和要素

    Reference: Github: Go Github: The way to Go Go程序的基本结构和要素 helloworld.go: package main import "fm ...

  8. ASP.NET MVC & Web API项目中集成MEF

    1.实现方式 //WebApi需要实现的接口 System.Web.Http.Dependencies.IDependencyResolver //MVC需要实现的接口 System.Web.Mvc. ...

  9. python ros 重新设置机器人的位置

    #!/usr/bin/env python import rospy import math from tf import transformations from geometry_msgs.msg ...

  10. 小米笔记本 air 12.5寸 支持硬盘参数

    M.2接口 2280规格 单面芯片固态硬盘 PCIE协议