Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

HIVE error. -- H060 Unable to open Hive session

avatar
Rising Star

I had to restart my AWS server which caused it's public dns changed . so for opening the ambari-server I had to connect to new dns:8080 port, and I was able to connect easily. But when I am connecting to the hive view it is giving below error.

H060 Unable to open Hive session: org.apache.thrift.protocol.TProtocolException:Required field 'serverProtocolVersion'is unset!Struct:TOpenSessionResp(status:TStatus(statusCode:ERROR_STATUS, infoMessages:[*org.apache.

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Amit Sharma

Gracefully stop all the services using Ambari.

Restart all the services using Ambari @times after reboot of the server you will need to manually start those service that wont be started by Ambari but subsequent Ambari startall /stopall will work correctly.

Keep me posted

View solution in original post

10 REPLIES 10

avatar
Master Mentor

@Amit Sharma

If you have ambari you can add the properties via: services->HDFS->configs->advanced->custom core-site

Add the below properties

hadoop.proxyuser.hive.hosts=* 
hadoop.proxyuser.hive.groups=* 

Than restart all the affected the services.

avatar
Rising Star

I already have these property added. Let me give you the brief This were running fine until i restarted my aws server and its dns chnaged and I see these errors.

Write now I am getting below errors :

org.apache.ambari.view.hive.client.HiveClientException: H060 Unable to open Hive session: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out


avatar
Master Mentor

Restart hive service

avatar
Master Mentor

@Amit Sharma

Gracefully stop all the services using Ambari.

Restart all the services using Ambari @times after reboot of the server you will need to manually start those service that wont be started by Ambari but subsequent Ambari startall /stopall will work correctly.

Keep me posted

avatar
Rising Star

Thank you very much for your help.. It is working now..

Will you be able to answer my question? you mentioned to add property hadoop.proxyuser.hive.hosts=* but hontor document says to add hadoop.proxyuser.root.hosts=* I have added both but not sure why and which one is working.

avatar
Master Mentor

@Amit Sharma

Good question.. Not sure how is it related to protocol version ! at least the error message is definitely wrong. This is the only workaround I got.

The issue is related to restrict access to the Hive metastore service by allowing it to impersonate only a subset of Kerberos users. This can be done by setting the hadoop.proxyuser.hive.groups property in core-site.xml on the Hive metastore host.

The issue has something to do with org.apache.thrift.protocol client_protocol, My reasoning was to give the hive user a wildcard privilege like the root.There is a jira out there as I see it resolved your problem then you can accept it as an answer cheers!

avatar
Master Mentor

avatar
Master Mentor

@Amit Sharma

Is this problem still persistent ? If my proposed solution resolved your issue then could you accept my answer !

avatar
Expert Contributor

Hello all,

I am having a similar issue here. Everything was working fine on HIVE until I have installed HBase and Ambari Metrics services. I performed pretty much all the changes proposed on this post and the documentation and still getting the error below:

Any ideias here appreciated!

H060 Unable to open Hive session: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out

    org.apache.ambari.view.hive.client.HiveClientException: H060 Unable to open Hive session: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out

org.apache.ambari.view.hive.client.HiveClientException: H060 Unable to open Hive session: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
	at org.apache.ambari.view.hive.client.Connection$2.body(Connection.java:488)
	at org.apache.ambari.view.hive.client.Connection$2.body(Connection.java:475)
	at org.apache.ambari.view.hive.client.HiveCall.call(HiveCall.java:101)
	at org.apache.ambari.view.hive.client.Connection.openSession(Connection.java:475)
	at org.apache.ambari.view.hive.client.Connection.getOrCreateSessionByTag(Connection.java:523)
	at org.apache.ambari.view.hive.resources.browser.HiveBrowserService.databases(HiveBrowserService.java:87)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)