Support Questions

Find answers, ask questions, and share your expertise

Unable to Connect Hive with Hue in CDH7.1

Explorer

Hi 

I have installed CDP with CDH 7.1 on my servers. We want to integrate our hue with hive. Earlier it used to show "Error loading databases" after that we uncommented following portion under interpreters section of notebook section in /etc/hue/conf/hue.ini file:

 

[[[mysql]]]
name = MySQL
interface=sqlalchemy
## https://docs.sqlalchemy.org/en/latest/dialects/mysql.html
options='{"url": "mysql://hue:mypassword@myhostnameonwhichhuedbwascreatedandhueserviceisrunning:3306/hue"}'
# ## options='{"url": "mysql://${USER}:${PASSWORD}@localhost:3306/hue"}'

[[[hive]]]
name=Hive
interface=hiveserver2

 

it started showing the databases after making above configurations but its not showing me tables and giving me the following error as shown in below screenshot:

  • 'NoneType' object has no attribute 'settimeout'

Hue db was created during installation by following this link, I gave path of this db in above config file: 

 

https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/install_cm_mariadb.html

 

Both Hive and Hive on Tez are configured in my cluster but HiveServer2 of  Hive on Tez is down showing the following error:

 

Error stopping schq

 

Please help me solve these issues and connect hive with hue.

 

hxn_0-1633589278121.png

Regards

1 ACCEPTED SOLUTION

Rising Star

@hxn It seems like hive on Tez service is not up. Please go through Hive on Tez logs, and you should see more info around the error 'Error stopping schq'. We need to bring Hive service up first, and then we can approach the Hue issue, or Hue might start working after fixing Hive.

View solution in original post

3 REPLIES 3

Rising Star

@hxn It seems like hive on Tez service is not up. Please go through Hive on Tez logs, and you should see more info around the error 'Error stopping schq'. We need to bring Hive service up first, and then we can approach the Hue issue, or Hue might start working after fixing Hive.

Explorer

Do I need to stop I hive and only use hive on tez..?

There are 2 hiveserver2 1 is of hive service and the other one is hive on tez's hiveserver2.

I am getting following logs on hive on tez's hiveserver2:

[shutdown-hook-0]: Error stopping schq
java.lang.IllegalStateException: The current ScheduledQueryExecutionService INSTANCE is invalid
	at org.apache.hadoop.hive.ql.scheduled.ScheduledQueryExecutionService.close(ScheduledQueryExecutionService.java:312) ~[hive-exec-3.1.3000.7.1.7.0-551.jar:3.1.3000.7.1.7.0-551]
	at org.apache.hive.service.server.HiveServer2.stop(HiveServer2.java:892) ~[hive-service-3.1.3000.7.1.7.0-551.jar:3.1.3000.7.1.7.0-551]
	at org.apache.hive.service.server.HiveServer2.lambda$init$0(HiveServer2.java:439) ~[hive-service-3.1.3000.7.1.7.0-551.jar:3.1.3000.7.1.7.0-551]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_232]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]

 

@smruti 

Rising Star

@hxn We should not have any hiveserver2 under "Hive" service.

hiveserver2 should be present only under "Hive on Tez".

 

If you have a hiveserver2 instance under "Hive" service, please delete it.