Support Questions
Find answers, ask questions, and share your expertise

Hive knox connection - Thrift issues

New Contributor

Hi community,


We're having a few issues connecting to hive through knox and would really appreciate some assistance if someone can spare a minute or two.


The Environment

HDP (3.1.5)

Apache Hive (version
Driver: Hive JDBC (version

Knox with Ranger - all required hive/hdfs permissions granted to the issuing proxy user

Kerberos enbabled on the cluster


jdbc connection URL through hiveServer2



From the knox logs we can see we successfully authenticate through the proxy and are redirected to the hive thrift endpoint 

21/11/02 17:06:13 ||ccfee6d8-ce60-4ba4-b896-4a54b4a06861|audit||HIVE||||access|uri|/gateway/default/hive|unavailable|Request method: POST
21/11/02 17:06:14 ||ccfee6d8-ce60-4ba4-b896-4a54b4a06861|audit||HIVE|myUser|||authentication|uri|/gateway/default/hive|success|
21/11/02 17:06:14 ||ccfee6d8-ce60-4ba4-b896-4a54b4a06861|audit||HIVE|myUser|||authentication|uri|/gateway/default/hive|success|Groups: [hadoop]
21/11/02 17:06:14 ||ccfee6d8-ce60-4ba4-b896-4a54b4a06861|audit||HIVE|myUser|||dispatch|uri|https://hiveMasterHost:10000?doAs=myUser| unavailable|Request method: POST
21/11/02 17:06:14 ||ccfee6d8-ce60-4ba4-b896-4a54b4a06861|audit||HIVE|myUser|||dispatch|uri|https://hiveMasterHost:10000?doAs=myUser| success|Response status: 405


As you can see after the forward we receive a 405 method not supported response from the jetteyserver.  This is confirmed when we hit the hive thrift endpoint using curl




curl -i -u : "https://hiveMasterHost:10000" --negotiate -X POST -v
* Rebuilt URL to: https://hiveMasterHost:10000/
* Hostname was NOT found in DNS cache
*   Trying hiveMasterHostIP...
* Connected to hiveMasterHost (hiveMasterHostIP) port 10000 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.37.0
> Host: hiveMasterHost:10000
> Accept: */*
< HTTP/1.1 405 HTTP method POST is not supported by this URL
HTTP/1.1 405 HTTP method POST is not supported by this URL
< Date: Wed, 03 Nov 2021 03:55:21 GMT
Date: Wed, 03 Nov 2021 03:55:21 GMT
< Cache-Control: must-revalidate,no-cache,no-store
Cache-Control: must-revalidate,no-cache,no-store
< Content-Type: text/html;charset=iso-8859-1
Content-Type: text/html;charset=iso-8859-1
< Content-Length: 353
Content-Length: 353
* Server Jetty(9.3.25.v20180904) is not blacklisted
< Server: Jetty(9.3.25.v20180904)
Server: Jetty(9.3.25.v20180904)

<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 405 </title>
<h2>HTTP ERROR: 405</h2>
<p>Problem accessing /. Reason:
<pre>    HTTP method POST is not supported by this URL</pre></p>
<hr /><a href="">Powered by Jetty:// 9.3.25.v20180904</a><hr/>
* Connection #0 to host hiveMasterHost left intact





Our Ambari settings align with those recommended by Cloudera:




I've read quite a few posts on Hive through knox but not regarding a 405 via the thrift endpoint.  Has anyone else experienced similar issues when trying to connect or have any ideas on what the cause could be we're running a little short on ideas?


Thanks for your time,






; ;