jdbc连接时报如下错误:

  1. Error connecting to database [k] : org.pentaho.di.core.exception.KettleDatabaseException:
  2. Error occurred while trying to connect to the database
  3.  
  4. Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
  5. Failed to open new session: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): Unauthorized connection for super-user: hive from IP
  6.  
  7. org.pentaho.di.core.exception.KettleDatabaseException:
  8. Error occurred while trying to connect to the database
  9.  
  10. Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
  11. Failed to open new session: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): Unauthorized connection for super-user: hive from IP
  12.  
  13. at org.pentaho.di.core.database.Database.normalConnect(Database.java:466)
  14. at org.pentaho.di.core.database.Database.connect(Database.java:364)
  15. at org.pentaho.di.core.database.Database.connect(Database.java:335)
  16. at org.pentaho.di.core.database.Database.connect(Database.java:325)
  17. at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)
  18. at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2734)
  19. at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:591)
  20. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  21. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  22. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  23. at java.lang.reflect.Method.invoke(Method.java:606)
  24. at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)
  25. at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)
  26. at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)
  27. at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:43)
  28. at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:137)
  29. at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
  30. at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
  31. at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
  32. at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
  33. at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
  34. at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
  35. at org.eclipse.jface.window.Window.open(Window.java:796)
  36. at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:88)
  37. at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:55)
  38. at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:116)
  39. at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:60)
  40. at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:474)
  41. at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:461)
  42. at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:3059)
  43. at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:3029)
  44. at org.pentaho.di.ui.spoon.Spoon.access$2400(Spoon.java:356)
  45. at org.pentaho.di.ui.spoon.Spoon$27.widgetDefaultSelected(Spoon.java:6109)
  46. at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
  47. at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
  48. at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
  49. at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
  50. at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
  51. at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1347)
  52. at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7989)
  53. at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9269)
  54. at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:662)
  55. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  56. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  57. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  58. at java.lang.reflect.Method.invoke(Method.java:606)
  59. at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
  60. Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
  61. Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
  62. Failed to open new session: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): Unauthorized connection for super-user: hive from IP
  63.  
  64. at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:579)
  65. at org.pentaho.di.core.database.Database.normalConnect(Database.java:450)
  66. ... 46 more
  67. Caused by: org.apache.hive.service.cli.HiveSQLException: Failed to open new session: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): Unauthorized connection for super-user: hive from IP
  68. at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:258)
  69. at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:249)
  70. at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:565)
  71. at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:171)
  72. at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
  73. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  74. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  75. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  76. at java.lang.reflect.Method.invoke(Method.java:606)
  77. at org.pentaho.hadoop.shim.common.DriverProxyInvocationChain$DriverInvocationHandler.invoke(DriverProxyInvocationChain.java:206)
  78. at com.sun.proxy.$Proxy64.connect(Unknown Source)
  79. at org.apache.hive.jdbc.HiveDriver$1.call(HiveDriver.java:153)
  80. at org.apache.hive.jdbc.HiveDriver$1.call(HiveDriver.java:150)
  81. at org.pentaho.hadoop.hive.jdbc.JDBCDriverCallable.callWithDriver(JDBCDriverCallable.java:57)
  82. at org.apache.hive.jdbc.HiveDriver.callWithActiveDriver(HiveDriver.java:130)
  83. at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:150)
  84. at java.sql.DriverManager.getConnection(DriverManager.java:571)
  85. at java.sql.DriverManager.getConnection(DriverManager.java:233)
  86. at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:565)
  87. ... 47 more
  88. Caused by: org.apache.hive.service.cli.HiveSQLException: Failed to open new session: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): Unauthorized connection for super-user: hive from IP
  89. at org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:266)
  90. at org.apache.hive.service.cli.CLIService.openSessionWithImpersonation(CLIService.java:202)
  91. at org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:402)
  92. at org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:297)
  93. at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1253)
  94. at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1238)
  95. at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
  96. at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
  97. at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
  98. at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
  99. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  100. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  101. at java.lang.Thread.run(Thread.java:745)
  102. Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): Unauthorized connection for super-user: hive from IP
  103. at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:83)
  104. at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)
  105. at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)
  106. at java.security.AccessController.doPrivileged(Native Method)
  107. at javax.security.auth.Subject.doAs(Subject.java:415)
  108. at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
  109. at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)
  110. at com.sun.proxy.$Proxy25.open(Unknown Source)
  111. at org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:258)
  112. ... 12 more
  113. Caused by: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): Unauthorized connection for super-user: hive from IP
  114. at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:494)
  115. at org.apache.hive.service.cli.session.HiveSessionImpl.open(HiveSessionImpl.java:137)
  116. at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
  117. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  118. at java.lang.reflect.Method.invoke(Method.java:606)
  119. at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)
  120. ... 20 more
  121. Caused by: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException:Unauthorized connection for super-user: hive from IP
  122. at org.apache.hadoop.ipc.Client.call(Client.java:1427)
  123. at org.apache.hadoop.ipc.Client.call(Client.java:1358)
  124. at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229)
  125. at com.sun.proxy.$Proxy19.getFileInfo(Unknown Source)
  126. at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:771)
  127. at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
  128. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  129. at java.lang.reflect.Method.invoke(Method.java:606)
  130. at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:252)
  131. at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:104)
  132. at com.sun.proxy.$Proxy20.getFileInfo(Unknown Source)
  133. at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:2116)
  134. at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1315)
  135. at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1311)
  136. at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
  137. at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1311)
  138. at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1424)
  139. at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:568)
  140. at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:526)
  141. at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:480)
  142. ... 25 more
  143.  
  144. Hostname :
  145. Port : 10000
  146. Database name : default
  1. hive is not allowed to impersonate hive

上述2个错误,刚开始以为hive的jdbc驱动没有,结果看了一下有,并且同样的官网包直接解压在power服务器上没问题,这是在X86,整了半天,最后找到一个网站

http://www-01.ibm.com/support/docview.wss?uid=swg21972388

借鉴才解决。

原因:

  1. cat /etc/hadoop/conf/core-site.xml
  1. <property>
  2. <name>hadoop.proxyuser.hive.groups</name>
  3. <value>*</value>
  4. </property>
  5.  
  6. <property>
  7. <name>hadoop.proxyuser.hive.hosts</name>
  8. <value>lh-2.novalocal</value>
  9. </property>

原来云主机重启将主机名改成加一个后缀.novalocal,比较坑,安装集群的时候也被坑过。我直接把lh-2.novalocal改成*了,在Ambari上改的。

然后,重连

成功!

Kettle jdbc连接hive出现问题的更多相关文章

  1. 通过JDBC连接hive

    hive是大数据技术簇中进行数据仓库应用的基础组件,是其它类似数据仓库应用的对比基准.基础的数据操作我们可以通过脚本方式以hive-client进行处理.若需要开发应用程序,则需要使用hive的jdb ...

  2. Hive(3)-meta store和hdfs详解,以及JDBC连接Hive

    一. Meta Store 使用mysql客户端登录hadoop100的mysql,可以看到库中多了一个metastore 现在尤其要关注这三个表 DBS表,存储的是Hive的数据库 TBLS表,存储 ...

  3. 大数据学习day28-----hive03------1. null值处理,子串,拼接,类型转换 2.行转列,列转行 3. 窗口函数(over,lead,lag等函数) 4.rank(行号函数)5. json解析函数 6.jdbc连接hive,企业级调优

    1. null值处理,子串,拼接,类型转换 (1) 空字段赋值(null值处理) 当表中的某个字段为null时,比如奖金,当你要统计一个人的总工资时,字段为null的值就无法处理,这个时候就可以使用N ...

  4. Java使用JDBC连接Hive

    最近一段时间,处理过一个问题,那就是hive jdbc的连接问题,其实也不是大问题,就是url写的不对,导致无法连接.问题在于HiveServer2增加了别的安全验证,导致正常的情况下,传递的参数无法 ...

  5. JDBC连接Hive数据库

    一.依赖 pom <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncodi ...

  6. java使用JDBC连接hive(使用beeline与hiveserver2)

    首先虚拟机上已经安装好hive. 下面是连接hive需要的操作. 一.配置. 1.查找虚拟机的ip 输入 ifconfig 2.配置文件 (1)配置hadoop目录下的core-site.xml和hd ...

  7. Hive记录-Impala jdbc连接hive和kudu参考

    1.配置环境Eclipse和JDK 2.加载hive jar包或者impala jar包 备注:从CDH集群里面拷贝出来 下载地址:https://www.cloudera.com/downloads ...

  8. Zeppelin 用jdbc连接hive报错

    日志: Could not establish connection to jdbc:hive2://192.168.0.51:10000: Required field 'serverProtoco ...

  9. 基于CDH5.x 下面使用eclipse 操作hive 。使用java通过jdbc连接HIVESERVICE 创建表

    基于CDH5.x 下面使用eclipse 操作hive .使用java通过jdbc连接HIVESERVICE 创建表 import java.sql.Connection; import java.s ...

随机推荐

  1. 鼠标形状css样式

    鼠标形状css样式 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...

  2. EasyCHM(CHM电子书制作工具) v3.84.545 绿色版

    软件名称:EasyCHM(CHM电子书制作工具) v3.84.545 绿色版 软件语言: 简体中文 授权方式: 免费软件 运行环境: Win 32位/64位 软件大小: 2.78MB 图片预览: 软件 ...

  3. tableviewcell 点击 设置

    table?.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) //设置cell 下边线 位置 table?.se ...

  4. Mammoth官方文档翻译

    用于.NET的.docx转HTML的Mammoth Mammoth可用于将.docx文档(比如由Microsoft Word创建的)转换为HTML.Mammoth致力于通过文档中的语义信息生成简洁的H ...

  5. [河南省ACM省赛-第三届] 聪明的kk (nyoj 171)

    题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=171 动态规划: d(i,j) = max{d(i-1, j), d(i, j-1)}+m ...

  6. jquery中的serialize

    jquery中的serialize对serializeArray进行了封装,serializeArray源码中定义将disabled的过滤掉,所以提交后值为null 解决方式是:在提交的时候,讲dis ...

  7. Majority Element in an Array

    Problem Statement Given a large array of non-negative integer numbers, write a function which determ ...

  8. 学习笔记(C++Primer)--易错点总结(Chapter2)

    2.1.2Type Conversions(1/10/2017) 1.If we assign an out-of-range value to an object of unsigned type, ...

  9. 无法创建链接服务器 "xxx" 的 OLE DB 访问接口 "OraOLEDB.Oracle" 的实例。 (Microsoft SQL Server,错误: 7302)

    出现这个错误,有两个最常见的两个原因 1.注册表 <1>按下WIN+R,打开“运行”窗口,输入“regedit”,回车 <2>在打开的注册表编辑器的左侧按如下路径依次展开: H ...

  10. opencv BP神经网络使用过程

       1.OpenCV中的神经网络 OpenCV中封装了类CvANN_MLP,因而神经网络利用很方便.   首先构建一个网络模型:     CvANN_MLP ann;     Mat structu ...