Created 01-30-2017 11:32 AM
When ever I tried to start a HIVE session I get the following error. I restarted hiveserver and ambari but no luck. Could any one please help me?
Thanks in advance
Ravi
Logging initialized using configuration in file:/etc/hive/2.5.0.0-1245/0/hive-log4j.properties Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.UnknownHostException: sandbox at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:523) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:680) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:624) 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:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:233) at org.apache.hadoop.util.RunJar.main(RunJar.java:148) Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException: sandbox at org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:411) at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:311) at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:176) at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:688) at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:629) at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:159) at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2761) at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:99) at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2795) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2777) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:386) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:179) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:506) ... 8 more Caused by: java.net.UnknownHostException: sandbox ... 21 more
Created 01-30-2017 12:35 PM
UnknownHostException for hostname sandbox. Please verify that /etc/hosts or dns has the hostname entry "sandbox" on the host you are trying to use hive command. Like
#vi /etc/hosts
<IPAddre> sandbox.<FQDN> sandbox
Created 01-30-2017 12:35 PM
UnknownHostException for hostname sandbox. Please verify that /etc/hosts or dns has the hostname entry "sandbox" on the host you are trying to use hive command. Like
#vi /etc/hosts
<IPAddre> sandbox.<FQDN> sandbox
Created 01-30-2017 01:05 PM
Thanks for your reply @rguruvannagari
/etc/hosts does have the sandbox entry. Please see the below code
[root@sandbox Lab7.2]# cat /etc/hosts 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.17.0.2 sandbox.hortonworks.com
Created 01-30-2017 01:08 PM
Please set it as below and try
[root@sandbox Lab7.2]# cat /etc/hosts 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.17.0.2 sandbox.hortonworks.com sandbox #####added sandbox
Created 01-31-2017 10:47 AM
It worked Thanks @rguruvannagari