Support Questions

Find answers, ask questions, and share your expertise

knox responsed 404 not found when use file view and curl command

Explorer

Hi All:

i'm using ambari 2.52 and HDP 2.6 by repo install (not sandbox),

i created a new lab only start HDFS/YARN/MapReduce for knox test, and add new host only install knox,

now, i can access ambari manager web via knox (i have add AMBARIUI config in advanced topology), but when click file view (or other view) will get 404 not found error,

try to use curl command to access hdfs folder also get 404 not found error,

if any other configure need setting?

1 ACCEPTED SOLUTION

Super Mentor

@Sen Ke

This is what i tried on Ambari 2.5.2 and i have the following content inside my newly created file "/etc/knox/conf/topologies/ui.xml" file and then restarted the knox and i am able to access the Ambari UI as well as all the Views without any issue.

<topology>
    <gateway>
        <provider>
            <role>authentication</role>
            <name>Anonymous</name>
            <enabled>true</enabled>
        </provider>
        <provider>
            <role>identity-assertion</role>
            <name>Default</name>
            <enabled>false</enabled>
        </provider>
    </gateway>
    <service>
        <role>AMBARI</role>
        <url>http://knox.example.com:8080/</url>
    </service>
    <service>
        <role>AMBARIUI</role>
        <url>http://knox.example.com:8080/</url>
    </service>
</topology>

.


URL that i used to access the FileView: https://knox.example.com:8443/gateway/ui/ambari/#/main/view/FILES/auto_files_instance


To access ambari: https://knox.example.com:8443/gateway/ui/ambari

.

View solution in original post

7 REPLIES 7

Super Mentor

@Sen Ke

This is what i tried on Ambari 2.5.2 and i have the following content inside my newly created file "/etc/knox/conf/topologies/ui.xml" file and then restarted the knox and i am able to access the Ambari UI as well as all the Views without any issue.

<topology>
    <gateway>
        <provider>
            <role>authentication</role>
            <name>Anonymous</name>
            <enabled>true</enabled>
        </provider>
        <provider>
            <role>identity-assertion</role>
            <name>Default</name>
            <enabled>false</enabled>
        </provider>
    </gateway>
    <service>
        <role>AMBARI</role>
        <url>http://knox.example.com:8080/</url>
    </service>
    <service>
        <role>AMBARIUI</role>
        <url>http://knox.example.com:8080/</url>
    </service>
</topology>

.


URL that i used to access the FileView: https://knox.example.com:8443/gateway/ui/ambari/#/main/view/FILES/auto_files_instance


To access ambari: https://knox.example.com:8443/gateway/ui/ambari

.

Super Mentor

@Sen Ke

Good to know that the issue is resolved and you are able to access the Views via Knox now.

It will be also great if you can mark this HCC thread as "Accepted", sothat other HCC users can quickly browse the answered solutions if they hit the same/simialr issue.

Explorer
@Jay SenSharma

you're great,

i tried add new xml and AMBARI/AMBARIUI url point to my ambari manager (i install in different host),

file view via knox is worked now, amazing!

very thanks.

Explorer

Hello Jay, I have tried creating ui.xml and adminui.xml (both names) but I am still getting 404 for ambari UI via knox.

curl -vik -u <username> 'https://<ip knox_node>:8442/gateway/default/ui/ambari ( we used port 8442 for HTTPS/ssl)

the webhdfs, oozie and hive is working.

curl -vik -u <username> 'https://<ip knox node>:8442/gateway/default/oozie'

curl -vik -u <username> 'https://<ip knox node>:8442/gateway/default/hive'

Any thoughts , what else is required. Thanks

Explorer

The cluster is kerberozied and ldap configured with Active directory. AD KDC is getting used, not local KDC

Explorer

@Vishal Gupta

in my case, i'm change WEBHDFS service config from {{webhdfs_service_urls}} to http://My_NameNode:50070/webhdfs in xml

and your command URL should use "ui" or "adminui" instead "default"

Explorer

Hello Sen, my webhdfs is working with {{webhdfs_service_urls}} and change the default to adminui but still getting 404

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.