Support Questions

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

Error while connecting Hive to Hue

avatar
Explorer
13 REPLIES 13

avatar
Community Manager

@nysq_sq Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our Hive expert @mszurap  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar

Hi @nysq_sq 

The above is not helpful to understand what went wrong.

Can you check the Hue logs (runcpserver.log)  and Hive (HiveServer2) logs?

What configurations you've enabled in Hue to connect to Hive? (I assume the "beeswax" section was configured)

Please see the hue.ini reference, what is the meaning of each config entry.

https://github.com/cloudera/hue/blob/master/desktop/conf.dist/hue.ini 

 

Best regards

 Miklos

avatar
Explorer

[beeswax]

# Host where HiveServer2 is running.
# If Kerberos security is enabled, use fully-qualified domain name (FQDN).
hive_server_host=xxx.xxx.x.xxx

# Port where HiveServer2 Thrift server runs on.
hive_server_port=10001


above are the details i gave in hue.ini file

avatar

Is the Kerberos authentication enabled on the cluster? As the above comment suggests, you should use the  fully-qualified domain name (FQDN) instead of IP address when Kerberos is enabled.

Also note that the port 10001 should be the HTTP transport mode port. The "hive_server_port" on the other hand is for binary transport, and that should be port 10000 on the HS2. This is also explained in the hue.ini reference quoted before.

 

# Binary thrift port for HiveServer2.
## hive_server_port=10000

# Http thrift port for HiveServer2.
## hive_server_http_port=10001

 

So please try the following rather:

hive_server_port=10000

avatar
Explorer

keberos authentication is not enabled
i have hue and hive in same server 

[beeswax]

# Host where HiveServer2 is running.
# If Kerberos security is enabled, use fully-qualified domain name (FQDN).
hive_server_host=xxx.xxx.x.xxx

# Port where HiveServer2 Thrift server runs on.
hive_server_port=10000

i have changed the port 
Below i got error 
Could not connect to 192.168.1.137:10000



avatar

Check if the HS2 runs on port 10000 or on 10001 ("ps -ef | grep HiveServer2" and with "netstat -tanp | grep <hs2pid>"). If it is running only on HTTP transport mode, then the port 10001 might be the only open port. In that case you need

 

hive_server_http_port=10001

avatar
Explorer


 ps -ef | grep HiveServer2
hadoop 1512 29707 0 09:31 pts/5 00:00:00 grep --color=auto HiveServer2

[hadoop@sgpllab1137 bin]$ netstat -tuln | grep 10001
[hadoop@sgpllab1137 bin]$
either port 10000 nor 10001 port listening

avatar
Explorer

 ps -ef | grep HiveServer2
hadoop 1512 29707 0 09:31 pts/5 00:00:00 grep --color=auto HiveServer2

[hadoop@sgpllab1137 bin]$ netstat -tuln | grep 10001
[hadoop@sgpllab1137 bin]$
either port 10000 nor 10001 port listening

please how to resolve this issue ,repeatedly getting same error 

avatar

Based on the above, the HiveServer2 is not runnig. Please verify that it's running before trying to use it through Hue.

How did you verify that the HS2 is running? How do you start it? Have you looked into the HiveServer2 logs?