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 GitHub Bot (Jira)" <ji...@apache.org> on 2021/01/22 08:43:00 UTC
[jira] [Work logged] (KNOX-2456) SHS links sometimes broken on
FINISHED jobs page
[ https://issues.apache.org/jira/browse/KNOX-2456?focusedWorklogId=540036&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-540036 ]
ASF GitHub Bot logged work on KNOX-2456:
----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Jan/21 08:42
Start Date: 22/Jan/21 08:42
Worklog Time Spent: 10m
Work Description: iain-buclaw-sociomantic commented on pull request #375:
URL: https://github.com/apache/knox/pull/375#issuecomment-765239908
Have been running with this in production for some time now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Issue Time Tracking
-------------------
Worklog Id: (was: 540036)
Time Spent: 20m (was: 10m)
> 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: 20m
> 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)