You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Iain Buclaw (Jira)" <ji...@apache.org> on 2020/09/15 10:12:00 UTC
[jira] [Created] (KNOX-2456) SHS links sometimes broken on FINISHED
jobs page
Iain Buclaw created KNOX-2456:
---------------------------------
Summary: 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
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)