Reply
Contributor
Posts: 27
Registered: ‎04-09-2016

Unable to create Hive table even when Hiveserver 2 up and running

My requirement is simple i have a file at /home/cloudera and i am trying to create Hive database table using HIVE UI available Hue UI .But i am getting error as shown in attachment ...Please note i restarted CDH 5.5 using Cloudera manager  twice also i checked status of Hive server 2 ,its getting shut down automatically but then i am manually bring it up by command


"sudo service hive-server2 restart"

I get below error in Hue UI i have attached the same screenshot with this ticket

 

Your query has the following error(s):

error while giving query.JPGHiveserver2 up and running.JPGUnable to access databases, Query Server or Metastore may be down.

Could not connect to quickstart.cloudera:10000

Champion
Posts: 768
Registered: ‎05-16-2016

Re: Unable to create Hive table even when Hiveserver 2 up and running

[ Edited ]

Please check if  hive metastore is up and runining 

 

sudo service hive-metastore status 

also check if Runjar is runining . 

 

( RunJar process runs  the  Hive Metastore server )

 

 

ps -ef | grep  RunJar

 

Highlighted
Contributor
Posts: 27
Registered: ‎04-09-2016

Re: Unable to create Hive table even when Hiveserver 2 up and running

[cloudera@quickstart ~]$ sudo service hive-metastore status
Hive Metastore is not running [FAILED]
[cloudera@quickstart ~]$ ps -ef | grep RunJar
hive 3760 2277 8 00:09 ? 00:00:15 /usr/java/jdk1.7.0_67-cloudera/bin/java -Xmx256m -Dhadoop.log.dir=/usr/lib/hadoop/logs -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/lib/hadoop -Dhadoop.id.str= -Dhadoop.root.logger=INFO,console -Djava.library.path=/usr/lib/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true -Xms52428800 -Xmx52428800 -XX:MaxPermSize=512M -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:OnOutOfMemoryError=/usr/lib64/cmf/service/common/killparent.sh -Dhadoop.security.logger=INFO,NullAppender org.apache.hadoop.util.RunJar /usr/lib/hive/lib/hive-service-1.1.0-cdh5.5.0.jar org.apache.hadoop.hive.metastore.HiveMetaStore -p 9083
hive 3797 2277 4 00:09 ? 00:00:07 /usr/java/jdk1.7.0_67-cloudera/bin/java -Xmx256m -Dhadoop.log.dir=/usr/lib/hadoop/logs -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/lib/hadoop -Dhadoop.id.str= -Dhadoop.root.logger=INFO,console -Djava.library.path=/usr/lib/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true -Xms52428800 -Xmx52428800 -XX:MaxPermSize=512M -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:OnOutOfMemoryError=/usr/lib64/cmf/service/common/killparent.sh -Dhadoop.security.logger=INFO,NullAppender org.apache.hadoop.util.RunJar /usr/lib/hive/lib/hive-service-1.1.0-cdh5.5.0.jar org.apache.hive.service.server.HiveServer2
cloudera 11469 11283 0 00:12 pts/0 00:00:00 grep RunJar
[cloudera@quickstart ~]$

Champion
Posts: 768
Registered: ‎05-16-2016

Re: Unable to create Hive table even when Hiveserver 2 up and running

Try starting the Hive-metastore and Hive server2 .

 

sudo service hive-metastore start 

sudo service hive-server2 start

 Then  stop all the datanode and start .

 

sudo service hadoop-hdfs-datanode stop
sudo service hadoop-hdfs-datanode start

finally 

 

sudo service hue stop
sudo service hue start

Let me know if that helps u pass the error

Contributor
Posts: 27
Registered: ‎04-09-2016

Re: Unable to create Hive table even when Hiveserver 2 up and running

Data node not starting now

 

[cloudera@quickstart ~]$ sudo service cloudera-scm-server stop
Stopping cloudera-scm-server: [ OK ]
[cloudera@quickstart ~]$ sudo service cloudera-scm-server start
Starting cloudera-scm-server: [ OK ]
[cloudera@quickstart ~]$ sudo service hive-metastore start
Starting Hive Metastore (hive-metastore): [ OK ]
Hive Metastore is running [ OK ]
[cloudera@quickstart ~]$
[cloudera@quickstart ~]$ sudo service hive-server2 start
Hive Server2 is running [ OK ]
[cloudera@quickstart ~]$ sudo service hadoop-hdfs-datanode stop
no datanode to stop
Stopped Hadoop datanode: [ OK ]
[cloudera@quickstart ~]$ sudo service hadoop-hdfs-datanode start

starting datanode, logging to /var/log/hadoop-hdfs/hadoop-hdfs-datanode-quickstart.cloudera.out
log4j:ERROR Could not find value for key log4j.appender.RFA
log4j:ERROR Could not instantiate appender named "RFA".
log4j:WARN No appenders could be found for logger (org.apache.hadoop.hdfs.server.datanode.DataNode).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Failed to start Hadoop datanode. Return value: 1 [FAILED]
[cloudera@quickstart ~]$
[cloudera@quickstart ~]$