1

使用远程连接连接到 hbase 时出现以下错误。注意:但是相同的代码在 hadoop-0.20.205 和 hbase-0.90.4 等 hbase 旧版本中工作,它不适用于 hadoop-1.0.3 和 hbase-0.94.1 等早期版本。

错误详情 :

WARN client.HConnectionManager: Error obtaining current user, skipping username in HConnectionKey
java.io.IOException: failure to login at
org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:490)

全栈跟踪:

WARN client.HConnectionManager: Error obtaining current user, skipping username in HConnectionKey
java.io.IOException: failure to login
    at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:490)
    at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:452)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.hadoop.hbase.util.Methods.call(Methods.java:37)
    at org.apache.hadoop.hbase.security.User.call(User.java:586)
    at org.apache.hadoop.hbase.security.User.callStatic(User.java:576)
    at org.apache.hadoop.hbase.security.User.access$400(User.java:50)
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:393)
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:388)
    at org.apache.hadoop.hbase.security.User.getCurrent(User.java:139)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionKey.<init>(HConnectionManager.java:412)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:179)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:153)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:131)
    at org.witsml.www.wsdl._120.CommonHBaseFunctions.getResultScannerFromHBase(CommonHBaseFunctions.java:95)
    at org.witsml.www.wsdl._120.CommonWITSMLFunctions.getRecordFromHBase(CommonWITSMLFunctions.java:243)
    at org.witsml.www.wsdl._120.StoreSoapBindingImpl.WMLS_GetFromStore(StoreSoapBindingImpl.java:144)
    at org.witsml.www.wsdl._120.StoreSoapBindingSkeleton.WMLS_GetFromStore(StoreSoapBindingSkeleton.java:170)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: javax.security.auth.login.LoginException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.security.KerberosName
    at org.apache.hadoop.security.User.<init>(User.java:44)
    at org.apache.hadoop.security.User.<init>(User.java:39)
    at org.apache.hadoop.security.UserGroupInformation$HadoopLoginModule.commit(UserGroupInformation.java:130)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
    at javax.security.auth.login.LoginContext$5.run(LoginContext.java:721)
    at javax.security.auth.login.LoginContext$5.run(LoginContext.java:719)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:718)
    at javax.security.auth.login.LoginContext.login(LoginContext.java:591)
    at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:471)
    at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:452)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.hadoop.hbase.util.Methods.call(Methods.java:37)
    at org.apache.hadoop.hbase.security.User.call(User.java:586)
    at org.apache.hadoop.hbase.security.User.callStatic(User.java:576)
    at org.apache.hadoop.hbase.security.User.access$400(User.java:50)
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:393)
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:388)
    at org.apache.hadoop.hbase.security.User.getCurrent(User.java:139)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionKey.<init>(HConnectionManager.java:412)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:179)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:153)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:131)
    at org.witsml.www.wsdl._120.CommonHBaseFunctions.getResultScannerFromHBase(CommonHBaseFunctions.java:95)
    at org.witsml.www.wsdl._120.CommonWITSMLFunctions.getRecordFromHBase(CommonWITSMLFunctions.java:243)
    at org.witsml.www.wsdl._120.StoreSoapBindingImpl.WMLS_GetFromStore(StoreSoapBindingImpl.java:144)
    at org.witsml.www.wsdl._120.StoreSoapBindingSkeleton.WMLS_GetFromStore(StoreSoapBindingSkeleton.java:170)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:886)
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
    at javax.security.auth.login.LoginContext$5.run(LoginContext.java:721)
    at javax.security.auth.login.LoginContext$5.run(LoginContext.java:719)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:718)
    at javax.security.auth.login.LoginContext.login(LoginContext.java:591)
    at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:471)
    ... 52 more
4

0 回答 0