- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
rest api via knox will get 404 error
- Labels:
-
Apache Knox
Created 09-29-2017 05:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
i want use curl command to access HDFS via Knox, but always response
HTTP/1.1 404 Not Found error.
command example:
curl -u admin:admin-password -i -v -k "https://KnoxHostName:8443/gateway/default/webhdfs/v1/user/hdfs&op=GETFILESTATUS"
and i know how to use curl to create/modify folder or file when url host is Name node with 50070 port, just don't know how to via knox,
if any other configs need to setting?
My Knox version is 0.12
Thanks.
Created 09-29-2017 07:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Sen Ke,
Do you have webhdfs defined in your topology file?
If you are using sandbox, open /usr/hdp/current/knox-server/conf/topologies/knox_sample.xml and add
<service> <role>WEBHDFS</role> http://sandbox.hortonworks.com:50070/webhdfs </service>
If you are not using a sandbox, go to Knox->Configs->Advanced Config->Advanced topology and add
<service> <role>WEBHDFS</role> http://<namenode-host>:<namenode-port>/webhdfs </service>
Thanks,
Aditya
Created 09-29-2017 07:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Sen Ke,
Do you have webhdfs defined in your topology file?
If you are using sandbox, open /usr/hdp/current/knox-server/conf/topologies/knox_sample.xml and add
<service> <role>WEBHDFS</role> http://sandbox.hortonworks.com:50070/webhdfs </service>
If you are not using a sandbox, go to Knox->Configs->Advanced Config->Advanced topology and add
<service> <role>WEBHDFS</role> http://<namenode-host>:<namenode-port>/webhdfs </service>
Thanks,
Aditya
Created 09-29-2017 07:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i'm not using sandbox, and after install knox, ambari has auto create default.xml include
<service>
<role>WEBHDFS</role>
{{webhdfs_service_urls}}
</service>
<service>
<role>WEBHDFS</role>
<url>http://My_NameNode:50070</url>
</service>
still not work,
now, i tried modify to
<service>
<role>WEBHDFS</role>
<url>http://My_NameNode:50070/webhdfs</url>
</service>
i got another error, anywhere, seens passed 404 not found now,
problem is service url wrong.
Very Thanks for your information.
Created 09-29-2017 11:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you please accept the answer if it worked for you. This will be helpful for the community.
Thanks,
Aditya
