Support Questions

Find answers, ask questions, and share your expertise

java.net:UnknownhostException:Namenode , While trigger hive job in HDinsight cluster,Can any one help me to out of this great appreciated.

avatar
Expert Contributor

hd-hive.pngI am new to HDinsight hadoop cluster , when i have open and Ambari ->hive view>query and execute any hive query(show tables etc..) i am getting error: java.net:UnknowhostException: namenode

Note: I am able to trigger hive query in HIVE cli .

HDP 2.7

hive 1.2

1 ACCEPTED SOLUTION

avatar

@rama

Hive view will internally use: webhdfs file system uri So please check if the following property is set properly or not?

Click HDFS > Configs > Advanced > Advanced hdfs-site > dfs.namenode.http-address. When you enter the value in the view definition, pre-pend "webhdfs://" to the value you find in the advanced HDFS configuration settings.

For example, webhdfs://c6401.ambari.apache.org:50070

Please see: https://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_ambari_views_guide/content/section_get_v...

View solution in original post

15 REPLIES 15

avatar
Expert Contributor

Thanks you@jss

I could not find dfs.namenode.http-address property too..i have share my hdfs_site screen short please help me to locate

advanced-hdfs.png

avatar

@rama

Please use the search filter to find the property mentioned.

Search for "dfs.namenode.http-address" in the "Properties Filter" text box which is present in the

HDFS > Configs > Advanced (In this page) you will find a search box beside the "Manage Config Groups" just put the property "dfs.namenode.http-address" there to search.

avatar
Expert Contributor

Thanks you so much@jss

i could able to find the properties(attached screen short) ,so i need to edit properties ?hfds-http.png

avatar

@rama

Hope the following article will help:

https://community.hortonworks.com/articles/49434/ambari-hive-view-webhdfs-filesystem-uri-in-hdfs-nn....

You do not need to edit the "dfs.namenode.http-address' instead you need to refer to that value so that it can be used inside your Hive View.

Manage Ambai --> Views --> HiveView (check its property "WebHDFS FileSystem URI*") this value need to be changed.

When it comes to setting WebHDFS FileSystem URI* , make sure you set to webhdfs://${dfs.nameservices}   where ${dfs.nameservices} is the value defined in the "hdfs-site.xml"   With *NO* Port to be specified.  (When NameNode HA is configured)

Restart ambari-server  

avatar
Expert Contributor

Thanks @jss

I will check and let you know the result..

avatar
Expert Contributor

HI @jss

I could find some configuration difference here

In PROD cluster ->managed ambari->views>hive->hive views->cluster configuration is set to "Local Ambari Managed Cluster" and its working fine

IN Dev cluster ->managed ambari->views>hive->hive views->cluster configuration is set to " custom" here it is not working

So should i change to "Local Ambari Managed Cluster"

if you want to me do this one , after save this should i need to restart the ambari server?

please suggest me