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

Kevin Risden commented on KNOX-1583:
------------------------------------

I can confirm this still happens. It only happens for a running job since the 
urls are handled differently by the jobhistory server once the job has finished.

[http://localhost:8443/gateway/test/yarn/nodemanager/node/containerlogs/container_e03_1541786998835_0005_01_000001/ambari-qa?scheme=http&host=ambari&port=8042]

Clicking on stderr:
 * Incorrect link: 
[http://localhost:8443/gateway/test/yarn/nodemanager/node/containerlogs/container_e03_1541786998835_0005_01_000001/ambari-qa/stderr]
 * Correct link: 
http://localhost:8443/gateway/test/yarn/nodemanager/node/containerlogs/container_e03_1541786998835_0005_01_000001/ambari-qa/stderr?scheme=http&host=ambari&port=8042

> YARN v1 UI - Running job log links
> ----------------------------------
>
>                 Key: KNOX-1583
>                 URL: https://issues.apache.org/jira/browse/KNOX-1583
>             Project: Apache Knox
>          Issue Type: Sub-task
>            Reporter: Kevin Risden
>            Assignee: Kevin Risden
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> This was identified in KNOX-1023 and KNOX-1270. Best detail to reproduce 
> comes from KNOX-1023.
> ----
> When nodemanager links are accessed through YARNUI service, it requires the 
> host and port to be appended in the URI , something like:
> {code:java}
> https://host:8443/gateway/sandbox/yarn/nodemanager/node/containerlogs/container_e02_1498543212255_0001_01_000001/user?host=nm-host&port=8042
> {code}
> When I'm coming from the RM page, this link is rendered as an absolute one, 
> so the rewrite rule works fine and appends the host and port. However, when 
> I'm on the NM page itself, the URLs are not absolute(the URL's on NM page are 
> relative), so a different rewrite rule applies:
> {code:java}
> DEBUG hadoop.gateway (UrlRewriteProcessor.java:rewrite(164)) - Rewrote URL: 
> /node/containerlogs/container_e01_1498485266952_0006_01_000001/hiyer 
> qa3july/stderr/?start=-4096, direction: OUT via implicit rule: 
> YARNUI/yarn/outbound/node to URL: 
> https://host:8443/gateway/sandbox/yarn/node/containerlogs/container_e01_1498485266952_0006_01_000001/user/stderr
> {code}
> As you can see, this link does not contain the host=nm-host&port=8042 at the 
> end of query string, so it does not work. This affects log links for running 
> tasks, and links for the nodemanager itself.
> So, the links on NM page of type
> {code:java}
> href=/syslog
> {code}
> gets transformed to
> {code:java}
> https://host:8443/gateway/sandbox/yarn/nodemanager/node/containerlogs/container_e02_1498543212255_0001_01_000001/user/syslog
> {code}
> whereas it should have been transformed to
> {code:java}
> https://host:8443/gateway/sandbox/yarn/nodemanager/node/containerlogs/container_e02_1498543212255_0001_01_000001/user/syslog?host=nm-host&port=8042{code}



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

Reply via email to