hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heng Chen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15049) AuthTypes.NONE cause exception after HS2 start
Date Tue, 29 Dec 2015 09:26:50 GMT

    [ https://issues.apache.org/jira/browse/HBASE-15049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15073713#comment-15073713
] 

Heng Chen commented on HBASE-15049:
-----------------------------------

Sorry,  it belongs to HIVE project.....  I will close it.

> AuthTypes.NONE cause exception after HS2 start
> ----------------------------------------------
>
>                 Key: HBASE-15049
>                 URL: https://issues.apache.org/jira/browse/HBASE-15049
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Heng Chen
>
> I set {{hive.server2.authentication}} to be {{NONE}}
> After HS2 start, i see exception in log below:
> {code}
> 2015-12-29 16:58:42,339 ERROR [HiveServer2-Handler-Pool: Thread-31]: server.TThreadPoolServer
(TThreadPoolServer.java:run(296)) - Error occurred during processing of message.
> java.lang.RuntimeException: org.apache.thrift.transport.TSaslTransportException: No data
or no sasl data in the stream
>         at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)
>         at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:268)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data
in the stream
>         at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:328)
>         at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
>         at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
>         ... 4 more
> {code}
> IMO the problem is we use Sasl transport when authType is NONE, 
> {code:title=HiveAuthFactory.java}
>   public TTransportFactory getAuthTransFactory() throws LoginException {
>     TTransportFactory transportFactory;
>     if (authTypeStr.equalsIgnoreCase(AuthTypes.KERBEROS.getAuthName())) {
>       try {
>         transportFactory = saslServer.createTransportFactory(getSaslProperties());
>       } catch (TTransportException e) {
>         throw new LoginException(e.getMessage());
>       }
>     } else if (authTypeStr.equalsIgnoreCase(AuthTypes.NONE.getAuthName())) {
>       transportFactory = PlainSaslHelper.getPlainTransportFactory(authTypeStr);
>     } else if (authTypeStr.equalsIgnoreCase(AuthTypes.LDAP.getAuthName())) {
>       transportFactory = PlainSaslHelper.getPlainTransportFactory(authTypeStr);
>     } else if (authTypeStr.equalsIgnoreCase(AuthTypes.PAM.getAuthName())) {
>       transportFactory = PlainSaslHelper.getPlainTransportFactory(authTypeStr);
>     } else if (authTypeStr.equalsIgnoreCase(AuthTypes.NOSASL.getAuthName())) {
>       transportFactory = new TTransportFactory();
>     } else if (authTypeStr.equalsIgnoreCase(AuthTypes.CUSTOM.getAuthName())) {
>       transportFactory = PlainSaslHelper.getPlainTransportFactory(authTypeStr);
>     } else {
>       throw new LoginException("Unsupported authentication type " + authTypeStr);
>     }
>     return transportFactory;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message