You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Nicolas Colomer (JIRA)" <ji...@apache.org> on 2019/02/22 13:32:00 UTC

[jira] [Comment Edited] (KNOX-1743) [Yarn UI Service] "Tracking UI" History link is broken

    [ https://issues.apache.org/jira/browse/KNOX-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775138#comment-16775138 ] 

Nicolas Colomer edited comment on KNOX-1743 at 2/22/19 1:32 PM:
----------------------------------------------------------------

JOBHISTORYUI or SPARKHISTORYUI are both mentioned in our topology file:
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<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>JOBHISTORYUI</role>
        <url>http://EMR_MASTER_IP:19888</url>
    </service>
    <service>
        <role>YARNUI</role>
        <url>http://EMR_MASTER_IP:8088</url>
    </service>
    <service>
        <role>SPARKHISTORYUI</role>
        <url>http://EMR_MASTER_IP:18080/</url>
    </service>
</topology>
{code}
I also checked that every service ports are reachable from the knox point of view:

 
{noformat}
root@b39969dd82ae:/# nc -zvw1 ***.***.***.*** 19888
ip-***-***-***-***.eu-west-1.compute.internal [***.***.***.***] 19888 (?) open
root@b39969dd82ae:/# nc -zvw1 ***.***.***.*** 8088
ip-***-***-***-***.eu-west-1.compute.internal [***.***.***.***] 8088 (omniorb) open
root@b39969dd82ae:/# nc -zvw1 ***.***.***.*** 18080
ip-***-***-***-***.eu-west-1.compute.internal [***.***.***.***] 18080 (?) open{noformat}
Edit: ok, actually, I missed to check port 20888 (the first request)

 
{noformat}
root@b39969dd82ae:/# nc -zvw1 ***.***.***.*** 20888
ip-***-***-***-***.eu-west-1.compute.internal [***.***.***.***] 20888 (?) : Connection timed out{noformat}
I'll have a check.

 

 


was (Author: ncolomer):
JOBHISTORYUI or SPARKHISTORYUI are both mentioned in our topology file:
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<!-- See https://knox.apache.org/books/knox-1-2-0/user-guide.html#UI+Service+Details -->
<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>JOBHISTORYUI</role>
        <url>http://EMR_MASTER_IP:19888</url>
    </service>
    <service>
        <role>YARNUI</role>
        <url>http://EMR_MASTER_IP:8088</url>
    </service>
    <service>
        <role>SPARKHISTORYUI</role>
        <url>http://EMR_MASTER_IP:18080/</url>
    </service>
</topology>
{code}
I also checked that every service ports are reachable from the knox point of view:

 
{noformat}
root@b39969dd82ae:/# nc -zvw1 ***.***.***.*** 19888
ip-***-***-***-***.eu-west-1.compute.internal [***.***.***.***] 19888 (?) open
root@b39969dd82ae:/# nc -zvw1 ***.***.***.*** 8088
ip-***-***-***-***.eu-west-1.compute.internal [***.***.***.***] 8088 (omniorb) open
root@b39969dd82ae:/# nc -zvw1 ***.***.***.*** 18080
ip-***-***-***-***.eu-west-1.compute.internal [***.***.***.***] 18080 (?) open{noformat}
Edit: ok, actually, I missed to check port 20888 (the first request)

 
{noformat}
root@b39969dd82ae:/# nc -zvw1 ***.***.***.*** 20888
ip-***-***-***-***.eu-west-1.compute.internal [***.***.***.***] 20888 (?) : Connection timed out{noformat}
I'll have a check.

 

 

> [Yarn UI Service] "Tracking UI" History link is broken
> ------------------------------------------------------
>
>                 Key: KNOX-1743
>                 URL: https://issues.apache.org/jira/browse/KNOX-1743
>             Project: Apache Knox
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Nicolas Colomer
>            Priority: Minor
>         Attachments: image-2019-01-22-12-58-43-987.png, image-2019-01-22-13-11-07-837.png
>
>
> The "Tracking UI" History link from the Yarn UI Service points to  
> {noformat}
> https://knox/gateway/cluster/yarn/proxy/{application id}{noformat}
> But clicking the link leads to an HTTP 404 error.
> !image-2019-01-22-13-11-07-837.png!
> I traced the redirections (spaghetti) while simulating a click on the same link from a non-proxified Yarn UI. Here are the curl debug logs:
> {code:java}
> $ curl -vL --proxy socks5h://localhost:8157 http://emr-master-hostname:20888/proxy/application_1547901173230_0014/
> *   Trying ::1...
> * TCP_NODELAY set
> * SOCKS5 communication to emr-master-hostname:20888
> * SOCKS5 request granted.
> * Connected to localhost (::1) port 8157 (#0)
> > GET /proxy/application_1547901173230_0014/ HTTP/1.1
> > Host: emr-master-hostname:20888
> > User-Agent: curl/7.54.0
> > Accept: */*
> >
> < HTTP/1.1 302 Found
> < Cache-Control: no-cache
> < Expires: Sat, 19 Jan 2019 17:31:18 GMT
> < Date: Sat, 19 Jan 2019 17:31:18 GMT
> < Pragma: no-cache
> < Expires: Sat, 19 Jan 2019 17:31:18 GMT
> < Date: Sat, 19 Jan 2019 17:31:18 GMT
> < Pragma: no-cache
> < Content-Type: text/html; charset=utf-8
> < Location: http://emr-master-hostname:18080/history/application_1547901173230_0014/1
> < Content-Length: 288
> <
> * Ignoring the response-body
> * Connection #0 to host localhost left intact
> * Issue another request to this URL: 'http://emr-master-hostname:18080/history/application_1547901173230_0014/1'
> * Found bundle for host emr-master-hostname: 0x7f8f7b510780 [can pipeline]
> * Hostname localhost was found in DNS cache
> *   Trying ::1...
> * TCP_NODELAY set
> * SOCKS5 communication to emr-master-hostname:18080
> * SOCKS5 request granted.
> * Connected to localhost (::1) port 8157 (#1)
> > GET /history/application_1547901173230_0014/1 HTTP/1.1
> > Host: emr-master-hostname:18080
> > User-Agent: curl/7.54.0
> > Accept: */*
> >
> < HTTP/1.1 302 Found
> < Date: Sat, 19 Jan 2019 17:31:18 GMT
> < Location: http://emr-master-hostname:18080/history/application_1547901173230_0014/1/
> < Content-Length: 0
> < Server: Jetty(9.3.z-SNAPSHOT)
> <
> * Connection #1 to host localhost left intact
> * Issue another request to this URL: 'http://emr-master-hostname:18080/history/application_1547901173230_0014/1/'
> * Found bundle for host emr-master-hostname: 0x7f8f7b510780 [can pipeline]
> * Re-using existing connection! (#1) with proxy localhost
> * Connected to localhost (::1) port 8157 (#1)
> > GET /history/application_1547901173230_0014/1/ HTTP/1.1
> > Host: emr-master-hostname:18080
> > User-Agent: curl/7.54.0
> > Accept: */*
> >
> < HTTP/1.1 302 Found
> < Date: Sat, 19 Jan 2019 17:31:18 GMT
> < Location: http://emr-master-hostname:18080/history/application_1547901173230_0014/1/jobs/
> < Content-Length: 0
> < Server: Jetty(9.3.z-SNAPSHOT)
> <
> * Connection #1 to host localhost left intact
> * Issue another request to this URL: 'http://emr-master-hostname:18080/history/application_1547901173230_0014/1/jobs/'
> * Found bundle for host emr-master-hostname: 0x7f8f7b510780 [can pipeline]
> * Re-using existing connection! (#1) with proxy localhost
> * Connected to localhost (::1) port 8157 (#1)
> > GET /history/application_1547901173230_0014/1/jobs/ HTTP/1.1
> > Host: emr-master-hostname:18080
> > User-Agent: curl/7.54.0
> > Accept: */*
> >
> < HTTP/1.1 200 OK
> < Date: Sat, 19 Jan 2019 17:31:18 GMT
> < Content-Type: text/html;charset=utf-8
> < Cache-Control: no-cache, no-store, must-revalidate
> < X-Frame-Options: SAMEORIGIN
> < X-XSS-Protection: 1; mode=block
> < X-Content-Type-Options: nosniff
> < Content-Length: 28376
> < Server: Jetty(9.3.z-SNAPSHOT)
> <
> {code}
> I guess adding some voodoo in the Knox yarnui's [rewrite.xml|https://github.com/apache/knox/blob/master/gateway-service-definitions/src/main/resources/services/yarnui/2.7.0/rewrite.xml] file might be enough to fix this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)