- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Apache Knox - 404 error on accessing hdfs using WebHDFS
Created ‎01-13-2017 11:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm trying to secure HDP using Apache Knox .. using the HDP Apache Knox tutorial,
and running into following issues, when firing the following commands ->
curl -iku guest:guest-password -X put 'https://sandbox.hortonworks.com:8443/gateway/knox_sample/webhdfs/v1/user/guest/knox-sample?op=MKDIRS&permission=777'
Any ideas on this ?
[root@sandbox knox-server]# curl -iku guest:guest-password -X put 'https://sandbox.hortonworks.com:8443/gateway/knox_sample/webhdfs/v1/user/guest/knox-sample?op=MKDIRS&permission=777' HTTP/1.1 404 Not Found Date: Thu, 12 Jan 2017 06:24:17 GMT Cache-Control: must-revalidate,no-cache,no-store Content-Type: text/html; charset=ISO-8859-1 Content-Length: 331 Server: Jetty(9.2.15.v20160210) <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 404 </title> </head> <body> <h2>HTTP ERROR: 404</h2> <p>Problem accessing /gateway/knox_sample/webhdfs/v1/user/guest/knox-sample. Reason: <pre> Not Found</pre></p> <hr /><i><small>Powered by Jetty://</small></i> </body> </html>
Created ‎01-16-2017 01:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Karan Alang , you might be having multiple topology files under '/etc/knox/conf/topologies/' , you can have multiple topology files under that location in the form <topology_name>.xml, and knox will automatically pick up these new topology definition files.
Then the URL for each service (curl call) will change from /gateway/default/HIVE to /gateway/<topologu_name>/HIVE for the topology named <topology_name>.xml
May be, you only have configured default.xml topology file and hence its working.
NOTE : These custom topology files need to be managed and maintained outside of Ambari, since Ambari only manages the default topology. Because of this, any changes made to the default topology via Ambari will need to be manually propagated to the customized topology files.
Hope this helps !
Created ‎01-14-2017 01:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
curl -iku guest:guest-password -X put 'https://sandbox.hortonworks.com:8443/gateway/default/webhdfs/v1/user/guest/knox-sample?op=MKDIRS&permission=777'
i made the change highlighted, and i was able to make it work i.e. the gateway/default instead of gateway/knox_sample
Not sure if that is the correct fix, do i need to rename the default Knox gateway (to knox_sample) ?
i'm new to Knox, so appreciate your responses.
Created ‎01-14-2017 01:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Neeraj Sabharwal, @Sunile Manjee - any ideas on this ?
Created ‎01-16-2017 01:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Karan Alang , you might be having multiple topology files under '/etc/knox/conf/topologies/' , you can have multiple topology files under that location in the form <topology_name>.xml, and knox will automatically pick up these new topology definition files.
Then the URL for each service (curl call) will change from /gateway/default/HIVE to /gateway/<topologu_name>/HIVE for the topology named <topology_name>.xml
May be, you only have configured default.xml topology file and hence its working.
NOTE : These custom topology files need to be managed and maintained outside of Ambari, since Ambari only manages the default topology. Because of this, any changes made to the default topology via Ambari will need to be manually propagated to the customized topology files.
Hope this helps !
Created ‎01-16-2017 04:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The gateway/knox_sample assumes a topology named knox_sample.xml in your {GATEWAY_HOME}/conf/topologies directory. If that doesn't exist then you will get a 404.
As mentioned by others, if you are using Ambari to make the changes then you are using the default.xml topology since that is the only topology that Ambari is aware.
