You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Sandeep More (Jira)" <ji...@apache.org> on 2021/01/27 18:55:00 UTC

[jira] [Resolved] (KNOX-2456) SHS links sometimes broken on FINISHED jobs page

     [ https://issues.apache.org/jira/browse/KNOX-2456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandeep More resolved KNOX-2456.
--------------------------------
    Fix Version/s: 1.6.0
       Resolution: Fixed

Patch is committed to master, thank you for your contribution [~ibuclaw]!

> SHS links sometimes broken on FINISHED jobs page
> ------------------------------------------------
>
>                 Key: KNOX-2456
>                 URL: https://issues.apache.org/jira/browse/KNOX-2456
>             Project: Apache Knox
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Iain Buclaw
>            Assignee: Iain Buclaw
>            Priority: Major
>             Fix For: 1.6.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> For unexplained reasons, most of the time SHS links are in the format `http://host:port/proxy/application_123_456`, but sometimes they can be `/proxy/application_123_456`.
> This causes broken URLs on the page, along with the following logged error.
> {noformat}
> 2020-08-17 11:22:35,653 ERROR knox.gateway (UrlRewriteProcessor.java:rewrite(166)) - Failed to rewrite URL: /proxy/application_1597654526563_0024/, direction: OUT via rule: YARNUI/yarn/outbound/apps/history, status: FAILURE{noformat}
> This patch fixes the issue.
> {code:java}
> --- a/gateway-service-definitions/src/main/resources/services/yarnui/2.7.0/rewrite.xml
> +++ b/gateway-service-definitions/src/main/resources/services/yarnui/2.7.0/rewrite.xml
> @@ -246,9 +246,13 @@
>  </rule>
>  
>  
> -<rule dir="OUT" name="YARNUI/yarn/outbound/apps/history">
> -    <match pattern="*://*:*/proxy/{**}"/>
> -    <rewrite template="{$frontend[url]}/yarn/proxy/{**}/"/>
> +<rule flow="OR" dir="OUT" name="YARNUI/yarn/outbound/apps/history">
> +    <match pattern="*://*:*/proxy/{**}">
> +        <rewrite template="{$frontend[url]}/yarn/proxy/{**}/"/>
> +    </match>
> +    <match pattern="/proxy/{**}">
> +        <rewrite template="{$frontend[url]}/yarn/proxy/{**}/"/>
> +    </match>
>  </rule>
>  <rule dir="OUT" name="YARNUI/yarn/outbound/apps/history1">
>      <match pattern="/proxy/{**}?{**}"/>
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)