Support Questions

Find answers, ask questions, and share your expertise

Spark history UI for Apache knox

avatar
Contributor

Hello,
I am securing my Spark history UI with Apache knox and am having trouble with the proxied SparkhistoryUI as mentionned in this thread: https://lists.apache.org/thread/xwzo4g6qk2hqmn62t6p162b8t6l3hldq

I managed to edit the rewrite rules to make the css load on the proxied sparkhistory UI but I am now facing another problem I don' t manage to overcome.
When the pages loads the js code triggers a jquery call to the api: `$.getJSON(uiRoot + "/api/v1/applications", appParams`
The problem is that when Knox is proxying Spark history UI this uiRoot is not the right one it's https://knox-host:8443/api/v1/applications instead of https://spark-ui-host:18080/api/v1/applications

Apache Knox rewrite rules don't seem to be able to fix that so this is why I am sending a message here to see if any of you have a better idea, maybe something related to the proxy setup.

I tried to set `spark.ui.proxyBase` to the Spark History UI URL and port so that Knox tries to reach it but

I end up with a 302 error `Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://host:18080/api/v1/applications?limit=2147483647&status=completed. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 302.`, and I don' t see anything related to CORS in the SHS configuration.


I would love to have any suggestion on why the Spark rules don't work out of the box on Knox or how I could fix that api call.

Thank you very much for your responses

2 REPLIES 2

avatar
Community Manager

@TMauran Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our Spark experts @Bharati @jagadeesan  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Contributor

Hello @Bharati  and@jagadeesan wondering if you got any ideas about that topic ?