Ok I see, because here I was trying to bypass the rewrite rules because of the issue I mentioned on this email https://lists.apache.org/thread/zj90xo30kqzb2nvopx64dh86drlrmf0r where I basically have an error on the jquery call made by sparkhistoryui to fetch the json of all the jobs. Wondering if you have any clue about that at all ? I tried to debug that but can’t seem to manage to find a pattern matching this case for any IN or OUT rule 


Le 31 juil. 2024 à 13:29, Sandeep Moré <moresand...@gmail.com> a écrit :


I don't think we support request forwarding in Knox, the requests go through rewrite rules and for complex UIs with _javascript_s that links to other URLs request forwarding does not work :( 
Perhaps you can try to create another service for Spark with simpler rewrite rules? 

On Tue, Jul 30, 2024 at 11:19 AM thomas.mau...@etu.umontpellier.fr <thomas.mau...@etu.umontpellier.fr> wrote:
Hello Sandeep,
Thanks for your answer, here in this example the rewrite rule is using the host specified in the query params, but for some services as Sparkhistoryui we don’t have that, so I’m wondering if you have any idea how I could force this redirection then ?


Le 30 juil. 2024 à 16:58, Sandeep Moré <moresand...@gmail.com> a écrit :


This is how it is done https://github.com/apache/knox/blob/master/gateway-service-definitions/src/main/resources/services/hdfsui/3.0.0/rewrite.xml#L23

<rule dir="IN" name="DATANODE/datanode/inbound/master/query2" pattern="*://*:*/**/hdfs/datanode/?host={host}?{**}">
    <rewrite template="{host}/?{**}"/>
  </rule>

On Tue, Jul 30, 2024 at 10:45 AM Thomas Mauran <thomas.mau...@etu.umontpellier.fr> wrote:
Hello,
I am using Apache Knox and am having trouble with some rewrites rules, to avoid those is there a way to tell Knox to just redirect the user to the service he asked for instead of proxying the requests on the KnoxUI on port :8443 ?

I saw that HDFSUI actually does that and redirect me to the Namenode instead of proxying the frontend but I didn' t find anything regarding that in the rewrite rules


Thanks for your answers

Reply via email to