Support Questions

Find answers, ask questions, and share your expertise

hiveserver2 thrift error

avatar
Rising Star

Hello,

 

We are running CDH 5.9.2 cluster. Kerberos is not enabled in our cluster.SSL/TLS not enabled for Hive. Users are connected through Power BI  to hive.We are using spark thrift service to run hive queries.Our spark thrift service got stopped. In the log I see below error,

 

ERROR server.TThreadPoolServer: 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:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
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

Please help.

 

Thanks,

Priya

9 REPLIES 9

avatar
Rising Star

Hi,

 

Check your HiveServer2 config file hive-site.xml ...add this 

 

<property>

  <name>hive.server2.authentication</name>

  <value>NOSASL</value>

</property>

avatar
Rising Star
Hello Bhuv,

Thanks for your reply. I do have below parameter in hive-site.xml
<property>
<name>hive.server2.use.SSL</name>
<value>false</value>
</property>
Do I need to add hive.server2.authentication parameter as well? In the log, I see below error as well.
ERROR server.TransportRequestHandler: Error sending result RpcResponse{requestId=7118238470485701424, body=NioManagedBuffer{buf=java.nio.HeapByteBuffer[pos=0 lim=47 cap=47]}} to server, closing connection

Can you please suggest?

Thanks,

avatar
Rising Star

Hi,

 

Both SSL and SASL are different, please add the parameter which i have posted.The one which I asked you is for SASL ..the one which you have disbled is for SSL

 

 

avatar
Rising Star
Hi,

Thanks for reply. Now I am getting errors like below.

ERROR curator.ConnectionState: Connection timed out for connection string (zookeeper servers:2181) and timeout (15000) / elapsed (564307)
org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss
at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:198)
at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:88)
at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:115)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:793)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:779)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.access$400(CuratorFrameworkImpl.java:58)
at org.apache.curator.framework.imps.CuratorFrameworkImpl$4.call(CuratorFrameworkImpl.java:265)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

and

ERROR imps.CuratorFrameworkImpl: Background operation retry gave up
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.checkBackgroundRetry(CuratorFrameworkImpl.java:695)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:496)
at org.apache.curator.framework.imps.BackgroundSyncImpl$1.processResult(BackgroundSyncImpl.java:50)
at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:609)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)

and then
ERROR cluster.YarnClientSchedulerBackend: Yarn application has already exited with state FAILED!

Please suggest.

Thanks,
Priya

avatar
Rising Star
Hi Bhuv,

I added the parameter <property>
<name>hive.server2.authentication</name>
<value>NOSASL</value>
</property> to the configuration file and I am getting the errors like below in the log.

ERROR server.TThreadPoolServer: Thrift error occurred during processing of message.
org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client?
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:228)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:27)
at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Please suggest.
Thanks,
Priya

avatar
Rising Star

Hi priya,

 

Can you tell me from which CLI you are connecting to hive and post me the command which you are running.Please also let me know whether you have logged in as root or normal user for that shell.

 

Regards,

Bhuvan

avatar
Rising Star
Hi Bhuv,

I am connecting from beeline and I am logging as normal user not as root user.

Thanks,
Priya

avatar
Rising Star

Hi Priya,

 

Sorry for late reply.Please try to connect thei hive server2 as below format

 

"!connect jdbc:hive2://127.0.0.1:10000/default/;auth=nosasl" 

 

Please try to login with root user and try to access database and files

 

 

Regards,

Bhuvan 

avatar
New Contributor

Hi All,

 

I am facing the same error  , I am trying  to connect from the ODBC driver.   Do you have any idea , how you resolve this issue.

 

i am getting the error in odbc as Failed to initialize security context: No authority could be contacted for authentication. and in hiveserver2 log.Caused by: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream

 

 

Thank you,

 

Thanks & Regards,

Siva