Member since
10-13-2015
7
Posts
11
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2832 | 03-01-2017 08:51 PM |
03-01-2017
08:51 PM
1 Kudo
@jerry shen. Something seems to be off in your setup. Mostly what is confusing me is that you don't have a default.xml file. 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: {HBASE_BIN/hbase-daemon.sh start rest -p 60080 As is described here: http://knox.apache.org/books/knox-0-11-0/user-guide.html#HBase Now once the REST server is running you can execute 'curl http://localhost:60080' like you originally said. 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 <service> xml section for WEBHBASE. You should see this: <service>
<role>WEBHBASE</role>
<url>http://{{hbase_master_host}}:{{hbase_master_port}}</url>
</service> That value is getting saved to the topology file 'default.xml' as this (which is the wrong port): <service>
<role>WEBHBASE</role>
<url>http://sandbox.hortonworks.com:8080</url>
</service>
You want it to look like this: <service>
<role>WEBHBASE</role>
<url>http://sandbox.hortonworks.com:60080</url>
</service> 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: <service>
<role>WEBHBASE</role>
<url>http://{{hbase_master_host}}:60080</url>
</service> 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. 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 The path for HBase bin for me was /usr/hdp/2.5.0.0-1245/hbase/bin/ and the curl command to use in the end is: curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/default/hbase'
... View more
02-28-2017
12:10 PM
1 Kudo
Thanks @jerry shen. There are a couple of things you can do to help debug the issue: 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 : log4j.logger.org.apache.http.wire=DEBUG 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. The other file to check is the audit log, which can be found in the same logs directory and is called 'gateway-audit.log'. 2. The file topology file you checked (/usr/hdp/2.5.0.0-1245/etc/knox/conf/topologies/sandbox.xml) does not match the URL you were trying. Since you said you tried: curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/default/hbase' you should be checking /usr/hdp/2.5.0.0-1245/etc/knox/conf/topologies/default.xml or you should change the curl request to: curl -ik -u guest:guest-password -H "Accept: text/xml" -X GET 'https://localhost:8443/gateway/sandbox/hbase' Just a word of note here. If you are using Ambari, then Ambari manages the 'default' topology and not 'sandbox'.
... View more
02-27-2017
06:34 PM
1 Kudo
Hi @jerry shen, 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.
... View more
02-02-2017
03:44 PM
3 Kudos
Just to add to the posted information, the updated apache docs for this are here http://knox.apache.org/books/knox-0-11-0/user-guide.html#Default+Identity+Assertion+Provider
... View more
10-13-2015
02:44 PM
3 Kudos
@mlanciaux@hortonworks.com, that part of the documentation needs to be corrected. No such tag <ha_alias> exists in the topology. Instead the NAMENODE service should have the logical name of the HA service found via dfs.nameservices in hdfs-site.xml as the value of the <url> tag. So the topology file will have something like this, <service>
<role>NAMENODE</role>
<url>my-ha-service</url>
</service>
where the hdfs-site property and value look like this for example, <property>
<name>dfs.nameservices</name>
<value>my-ha-service</value>
</property>
... View more