You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/01/27 18:51:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17273086#comment-17273086 ]
ASF subversion and git services commented on KNOX-2456:
-------------------------------------------------------
Commit 0ebfab7eae1d784109a95166c6a875bc9bed445b in knox's branch refs/heads/master from Iain Buclaw
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=0ebfab7 ]
KNOX-2456 SHS links sometimes broken on FINISHED jobs page (#375)
> 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
> Priority: Major
> 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)