<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: hbase REST API return '...loading... ' through knox gateway in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127170#M55631</link>
    <description>&lt;P&gt;I enabled the &lt;EM&gt;&lt;STRONG&gt;log4j.logger.org.apache.http.wire=DEBUG&lt;/STRONG&gt;&lt;/EM&gt;, but it seems that something wrote into the &lt;EM&gt;&lt;STRONG&gt;gateway.log&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;gateway-audit.log&lt;/STRONG&gt;&lt;/EM&gt; only when I am starting the knox service in Ambari. Anyway, I attached the log files, please have a look on them.&lt;/P&gt;&lt;P&gt;I tried with the command: &lt;EM&gt;&lt;STRONG&gt;curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/sandbox&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;/hbase'&lt;/STRONG&gt;&lt;/EM&gt;, but the result is same.&lt;/P&gt;&lt;P&gt;There is no &lt;EM&gt;&lt;STRONG&gt;default.xml&lt;/STRONG&gt;&lt;/EM&gt; in topology folder. I manually make a copy from &lt;EM&gt;&lt;STRONG&gt;sandbox.xml&lt;/STRONG&gt;&lt;/EM&gt;, and try again with "default" in the curl command, the result is same.&lt;/P&gt;&lt;P&gt;I paste the sandbox-version output as below:&lt;/P&gt;&lt;P&gt;Sandbox information:
Created on: 25_10_2016_08_11_26 for
Hadoop stack version:  Hadoop 2.7.3.2.5.0.0-1245
Ambari Version: 2.4.0.0-1225
Ambari Hash: 59175b7aa1ddb74b85551c632e3ce42fed8f0c85
Ambari build:  Release : 1225
Java version:  1.8.0_111
OS Version:  CentOS release 6.8 (Final)&lt;/P&gt;&lt;P&gt;I just import the sandbox vm, and power it. Then I start HBase service, Knox service, turn off the maintenance mode on them and start Demo LDAP. Then try the curl command, and meet the issue. Did I miss something need to do?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 10:54:47 GMT</pubDate>
    <dc:creator>jerry_shen</dc:creator>
    <dc:date>2017-03-01T10:54:47Z</dc:date>
    <item>
      <title>hbase REST API return '...loading... ' through knox gateway</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127166#M55627</link>
      <description>&lt;P&gt;
	In HDP sandbox, I started the hbase rest daemon at 60080. It's OK to get table list by:&lt;/P&gt;&lt;P&gt;
	curl &lt;A href="http://localhost:60080" target="_blank"&gt;http://localhost:60080&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	but when I try it through knox gateway as below:&lt;/P&gt;&lt;P&gt;
	curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/default/hbase'&lt;/P&gt;&lt;P&gt;
	it returns the message instead of tables:&lt;/P&gt;&lt;P&gt;
	&amp;lt;body&amp;gt;
    &amp;lt;div id="loading"&amp;gt;...Loading...&amp;lt;/div&amp;gt;
    &amp;lt;div id="wrapper"&amp;gt;
    &amp;lt;!-- ApplicationView --&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;footer&amp;gt;
        &amp;lt;div&amp;gt;
            &amp;lt;a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank"&amp;gt;Licensed under the Apache License, Version 2.0&amp;lt;/a&amp;gt;.&amp;lt;br&amp;gt;
            &amp;lt;a href="/licenses/NOTICE.txt" target="_blank"&amp;gt;See third-party tools/resources that Ambari uses and their respective authors&amp;lt;/a&amp;gt;
         &amp;lt;/div&amp;gt;
    &amp;lt;/footer&amp;gt;
&amp;lt;/body&amp;gt;&lt;/P&gt;&lt;P&gt;One point to mention is it's OK to list the directory of HDFS through knox gateway:&lt;/P&gt;&lt;P&gt;curl -iku guest:guest-password -X GET 'https://localhost:8443/gateway/default/webhdfs/v1/?op=LISTSTATUS'&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 16:45:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127166#M55627</guid>
      <dc:creator>jerry_shen</dc:creator>
      <dc:date>2017-02-27T16:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: hbase REST API return '...loading... ' through knox gateway</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127167#M55628</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/16301/jerryshen.html" nodeid="16301"&gt;@jerry shen&lt;/A&gt;, are there any errors in the gateway.log file (can be found under the logs directory in Knox's installation directory). Also please verify the URL in topology file (default.xml under conf/topologies) for HBase is correct.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 02:34:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127167#M55628</guid>
      <dc:creator>sumit_gupta</dc:creator>
      <dc:date>2017-02-28T02:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: hbase REST API return '...loading... ' through knox gateway</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127168#M55629</link>
      <description>&lt;P&gt;There is no output to &lt;STRONG&gt;&lt;EM&gt;/var/log/knox/gateway.log&lt;/EM&gt;&lt;/STRONG&gt; file when executing the problem curl command. And in I checked the HBase URL in &lt;EM&gt;&lt;STRONG&gt;/usr/hdp/2.5.0.0-1245/etc/knox/conf/topologies/sandbox.xml&lt;/STRONG&gt;&lt;/EM&gt;, it seems right. In file, it contains the following entry:&lt;/P&gt;&lt;P&gt; &amp;lt;service&amp;gt; &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;        &amp;lt;role&amp;gt;WEBHBASE&amp;lt;/role&amp;gt; &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;        &amp;lt;url&amp;gt;http://localhost:60080&amp;lt;/url&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;/service&amp;gt;&lt;/P&gt;&lt;P&gt;Did I check with right files? Thanks for your reply.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 09:11:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127168#M55629</guid>
      <dc:creator>jerry_shen</dc:creator>
      <dc:date>2017-02-28T09:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: hbase REST API return '...loading... ' through knox gateway</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127169#M55630</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/16301/jerryshen.html" nodeid="16301"&gt;@jerry shen&lt;/A&gt;. There are a couple of things you can do to help debug the issue:&lt;/P&gt;&lt;P&gt;1. Increase the debug level so that we can see what is going on. This can be done by editing the file gateway-log4j.properties file. You can uncomment the line :&lt;/P&gt;&lt;P&gt;log4j.logger.org.apache.http.wire=DEBUG&lt;/P&gt;&lt;P&gt;for example to see wire level logs for request and response to the backend service. Please note that after changing this file you need to restart Knox for the change to take effect. If you have Ambari installed then you should use Ambari to do this.&lt;/P&gt;&lt;P&gt;The other file to check is the audit log, which can be found in the same logs directory and is called 'gateway-audit.log'.&lt;/P&gt;&lt;P&gt;2. The file topology file you checked (&lt;EM&gt;&lt;STRONG&gt;/usr/hdp/2.5.0.0-1245/etc/knox/conf/topologies/sandbox.xml) &lt;/STRONG&gt;&lt;/EM&gt;does not match the URL you were trying. Since you said you tried:&lt;/P&gt;&lt;P&gt;curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/&lt;STRONG&gt;default&lt;/STRONG&gt;/hbase'&lt;/P&gt;&lt;P&gt;you should be checking &lt;EM&gt;&lt;STRONG&gt;/usr/hdp/2.5.0.0-1245/etc/knox/conf/topologies/default.xml &lt;/STRONG&gt;&lt;/EM&gt;or you should change the curl request to:&lt;/P&gt;&lt;P&gt;curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/&lt;STRONG&gt;sandbox&lt;/STRONG&gt;/hbase'&lt;/P&gt;&lt;P&gt;Just a word of note here. If you are using Ambari, then Ambari manages the 'default' topology and not 'sandbox'.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 20:10:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127169#M55630</guid>
      <dc:creator>sumit_gupta</dc:creator>
      <dc:date>2017-02-28T20:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: hbase REST API return '...loading... ' through knox gateway</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127170#M55631</link>
      <description>&lt;P&gt;I enabled the &lt;EM&gt;&lt;STRONG&gt;log4j.logger.org.apache.http.wire=DEBUG&lt;/STRONG&gt;&lt;/EM&gt;, but it seems that something wrote into the &lt;EM&gt;&lt;STRONG&gt;gateway.log&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;gateway-audit.log&lt;/STRONG&gt;&lt;/EM&gt; only when I am starting the knox service in Ambari. Anyway, I attached the log files, please have a look on them.&lt;/P&gt;&lt;P&gt;I tried with the command: &lt;EM&gt;&lt;STRONG&gt;curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/sandbox&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;/hbase'&lt;/STRONG&gt;&lt;/EM&gt;, but the result is same.&lt;/P&gt;&lt;P&gt;There is no &lt;EM&gt;&lt;STRONG&gt;default.xml&lt;/STRONG&gt;&lt;/EM&gt; in topology folder. I manually make a copy from &lt;EM&gt;&lt;STRONG&gt;sandbox.xml&lt;/STRONG&gt;&lt;/EM&gt;, and try again with "default" in the curl command, the result is same.&lt;/P&gt;&lt;P&gt;I paste the sandbox-version output as below:&lt;/P&gt;&lt;P&gt;Sandbox information:
Created on: 25_10_2016_08_11_26 for
Hadoop stack version:  Hadoop 2.7.3.2.5.0.0-1245
Ambari Version: 2.4.0.0-1225
Ambari Hash: 59175b7aa1ddb74b85551c632e3ce42fed8f0c85
Ambari build:  Release : 1225
Java version:  1.8.0_111
OS Version:  CentOS release 6.8 (Final)&lt;/P&gt;&lt;P&gt;I just import the sandbox vm, and power it. Then I start HBase service, Knox service, turn off the maintenance mode on them and start Demo LDAP. Then try the curl command, and meet the issue. Did I miss something need to do?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 10:54:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127170#M55631</guid>
      <dc:creator>jerry_shen</dc:creator>
      <dc:date>2017-03-01T10:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: hbase REST API return '...loading... ' through knox gateway</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127171#M55632</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/16301/jerryshen.html" nodeid="16301"&gt;@jerry shen&lt;/A&gt;. Something seems to be off in your setup. Mostly what is confusing me is that you don't have a default.xml file.&lt;/P&gt;&lt;P&gt;In any case, I think I did find an issue with the sandbox setup. I imported the sandbox like you said and turned off maintenance mode and started HBase, Knox and the Demo LDAP. In addition to that I started the REST server for Hbase. As of now this is unfortunately not something you can do in Ambari so you will need to ssh to the box and execute something like this:&lt;/P&gt;&lt;PRE&gt;{HBASE_BIN/hbase-daemon.sh start rest -p 60080&lt;/PRE&gt;&lt;P&gt;As is described here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://knox.apache.org/books/knox-0-11-0/user-guide.html#HBase" target="_blank"&gt;http://knox.apache.org/books/knox-0-11-0/user-guide.html#HBase&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Now once the REST server is running you can execute 'curl http://localhost:60080' like you originally said.&lt;/P&gt;&lt;P&gt;Now coming to the issue. I see that in Ambari the wrong port is getting set for the service. If you go into Ambari and the Knox service's 'Configs' tab. Expand on the section "Advanced Topology" and scroll to the &amp;lt;service&amp;gt; xml section for WEBHBASE. You should see this:&lt;/P&gt;&lt;PRE&gt;    &amp;lt;service&amp;gt;
                &amp;lt;role&amp;gt;WEBHBASE&amp;lt;/role&amp;gt;
                &amp;lt;url&amp;gt;http://{{hbase_master_host}}:{{hbase_master_port}}&amp;lt;/url&amp;gt;
            &amp;lt;/service&amp;gt;&lt;/PRE&gt;&lt;P&gt;That value is getting saved to the topology file 'default.xml' as this (which is the wrong port):&lt;/P&gt;&lt;PRE&gt;&amp;lt;service&amp;gt; 
   &amp;lt;role&amp;gt;WEBHBASE&amp;lt;/role&amp;gt; 
   &amp;lt;url&amp;gt;http://sandbox.hortonworks.com:8080&amp;lt;/url&amp;gt;
 &amp;lt;/service&amp;gt; 
&lt;/PRE&gt;&lt;P&gt;You want it to look like this:&lt;/P&gt;&lt;PRE&gt;&amp;lt;service&amp;gt; 
   &amp;lt;role&amp;gt;WEBHBASE&amp;lt;/role&amp;gt; 
   &amp;lt;url&amp;gt;http://sandbox.hortonworks.com:60080&amp;lt;/url&amp;gt;
 &amp;lt;/service&amp;gt; &lt;/PRE&gt;&lt;P&gt;So the easiest thing to do right now in the sandbox you are using would be to change it in that 'Advanced Topology" section and save it to:&lt;/P&gt;&lt;PRE&gt;    &amp;lt;service&amp;gt;
                &amp;lt;role&amp;gt;WEBHBASE&amp;lt;/role&amp;gt;
                &amp;lt;url&amp;gt;http://{{hbase_master_host}}:60080&amp;lt;/url&amp;gt;
            &amp;lt;/service&amp;gt;&lt;/PRE&gt;&lt;P&gt;Remember to restart Knox from Ambari after this. If you can validate the default.xml file on disk in this entire process it would be useful. &lt;/P&gt;&lt;P&gt;Please note: the path for me on the sandbox VM for the topology file was /usr/hdp/2.5.0.0-1245/knox/conf/topologies/default.xml&lt;/P&gt;&lt;P&gt;The path for HBase bin for me was /usr/hdp/2.5.0.0-1245/hbase/bin/&lt;/P&gt;&lt;P&gt;and the curl command to use in the end is:&lt;/P&gt;&lt;P&gt;curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/default/hbase'&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 04:51:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127171#M55632</guid>
      <dc:creator>sumit_gupta</dc:creator>
      <dc:date>2017-03-02T04:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: hbase REST API return '...loading... ' through knox gateway</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127172#M55633</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/480/sumitgupta.html" nodeid="480"&gt;@sumit gupta&lt;/A&gt;. I setup a new sandbox, the &lt;EM&gt;&lt;STRONG&gt;default.xml&lt;/STRONG&gt;&lt;/EM&gt; is back, and follow your instruction of modifying the port, everything goes well. So thanks very much.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 00:14:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hbase-REST-API-return-loading-through-knox-gateway/m-p/127172#M55633</guid>
      <dc:creator>jerry_shen</dc:creator>
      <dc:date>2017-03-03T00:14:49Z</dc:date>
    </item>
  </channel>
</rss>

