Nicolas Colomer created KNOX-1743:
-------------------------------------

             Summary: [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
         Attachments: image-2019-01-22-12-58-43-987.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.

!yarnui.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)

Reply via email to