Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Knox Gateway

Highlighted

Knox Gateway

Expert Contributor

Hello

I have knox installed in my HDP cluster. I am not sure how i can configure it. I want to secure the web requests sent to services like webhdfs and ranger.

i have included this in my topology but im not sure how i can use the gateway or what other configurations are missing

<service>

<role>WEBHDFS</role>

<url>https://[HOSTNAME]:50470/webhdfs</url>

</service>

13 REPLIES 13
Highlighted

Re: Knox Gateway

you can access webhdfs using this url :

https://{gateway-host}:{gateway-port}/{gateway-path}/{cluster-name}/webhdfs

for more info you can refer to https://knox.apache.org/books/knox-0-4-0/knox-0-4-0.html#WebHDFS

and are you facing any issue after changing the topology you mentioned in your question ?

Highlighted

Re: Knox Gateway

Expert Contributor

i have tried the link you provided, this is the error i am getting

HTTP ERROR: 404

Problem accessing /gateway/HDPBei/webhdfs. Reason:

    Not Found

Powered by Jetty://
Highlighted

Re: Knox Gateway

Expert Contributor

this is the full URL i used

https://hostname:8443/gateway/cluster-name/webhdfs/data/v1/{Directory path}?op=ListStatus

Highlighted

Re: Knox Gateway

Expert Contributor

I have fixed the gateway path in the URL and now it is asking for a username and password. which account would it be asking for?

Highlighted

Re: Knox Gateway

can you try something like guest:guest-password or admin:admin-password ?

Re: Knox Gateway

Explorer
I also want to know the username and password
Highlighted

Re: Knox Gateway

Explorer

i don't know the mean about gateway-path and cluster-name

Highlighted

Re: Knox Gateway

Cloudera Employee

gateway-path is defined in conf/gateway-site.xml (gateway.path property), and cluster-name is actually the name of the Knox topology (name of the topology.xml file).

The default knox.path property value is gateway, and if the topology file is named mytopology.xml, the cluster-name is mytopology.

So, putting them together:

http://hostname:8443/gateway/mytopology/webhdfs/v1/?op=LISTSTATUS

Highlighted

Re: Knox Gateway

Explorer
I would like to know how to see the knox page but I have been prompted after the input url: unable to visit this site hope you can help me
Don't have an account?
Coming from Hortonworks? Activate your account here