Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/spark] Spark-UI stages and other tabs not accessible when reverse-proxy is enabled #23384

Closed
imsharadmishra opened this issue Feb 9, 2024 · 10 comments
Assignees
Labels
solved spark stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@imsharadmishra
Copy link

imsharadmishra commented Feb 9, 2024

Name and Version

bitnami/spark - 6.0.0

What architecture are you using?

None

What steps will reproduce the bug?

Kubernetes Version: 1.25
Spark: 3.4.2
Helm chart: 6.0.0

When enabled reverse proxy in master and worker configOptions. We're not able to access different tabs available in spark UI e.g.(stages, environment, storage etc.)

Steps to reproduce:
After installing the chart Spark Cluster(Master and worker) UI is available at:
https://spark.staging.abc.com/
Screenshot 2024-02-09 at 5 04 49 PM

We are able to access running application by click on applicationID under Running Applications link:
Screenshot 2024-02-09 at 5 05 48 PM

We can access spark UI by clicking Application Detail UI:
Screenshot 2024-02-09 at 5 06 59 PM

We are taken to jobs tab when we click on Application Detail UI
URL looks like: https://spark.staging.abc.com/proxy/app-20240208103209-0030/stages/
Screenshot 2024-02-09 at 5 09 28 PM

When we click any of the tab from spark UI e.g. stages or environment etc, it takes us back to spark cluster UI page
Screenshot 2024-02-09 at 5 13 01 PM

We noticed that endpoint changes to
https://spark.staging.abc.com/stages/
instead of
https://spark.staging.abc.com/proxy/app-20240208103209-0030/stages/

Are you using any custom parameters or values?

Configurations set in values.yaml

master:
  configOptions:
    -Dspark.ui.reverseProxy=true
    -Dspark.ui.reverseProxyUrl=https://spark.staging.abc.com

worker:
  configOptions:
    -Dspark.ui.reverseProxy=true
    -Dspark.ui.reverseProxyUrl=https://spark.staging.abc.com

service:
  type: ClusterIP
  ports:
    http: 8080
    https: 443
    cluster: 7077

ingress:

  enabled: true
  pathType: ImplementationSpecific
  apiVersion: ""
  hostname: spark.staging.abc.com
  ingressClassName: "staging"
  path: /

What is the expected behavior?

Expected behaviour is that when I click on stages tab, instead of taking me to
https://spark.staging.abc.com/stages/
it should take me to following URL:
https://spark.staging.abc.com/proxy/app-20240208103209-0030/stages/

What do you see instead?

current behaviour is it takes me to URL: https://spark.staging.abc.com/stages/ , which shows spark cluster UI with master and worker details
Screenshot 2024-02-09 at 5 13 01 PM

Additional information

No response

@imsharadmishra imsharadmishra added the tech-issues The user has a technical issue about an application label Feb 9, 2024
@github-actions github-actions bot added the triage Triage is needed label Feb 9, 2024
@javsalgar javsalgar changed the title Spark-UI stages and other tabs not accessible when reverse-proxy is enabled [bitnami/spark] Spark-UI stages and other tabs not accessible when reverse-proxy is enabled Feb 12, 2024
@javsalgar
Copy link
Contributor

Hi,

Looking at the issue, it seems that you were able to set the proper Spark settings, but these do not work as expected. I'm not sure this is an issue with the Bitnami packaging of Spark but in Spark configuration itself. Did you check with the upstream devs?

@imsharadmishra
Copy link
Author

Hi @javsalgar , No I haven't checked with upstream devs, wanted to make sure, I'm setting it up properly and not missing any configuration, which is causing it. One other observation that I noticed is that once application is completed/killed and available in spark-history server, all the URL tabs work as expected.

@javsalgar
Copy link
Contributor

That's strange. That leads me to think that the issue may be in Spark, so my advice would be to open a ticket in upstream.

Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Feb 29, 2024
@imsharadmishra
Copy link
Author

opened a ticket with Spark: https://issues.apache.org/jira/browse/SPARK-47232

@github-actions github-actions bot removed the stale 15 days without activity label Mar 1, 2024
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Mar 17, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2024
@vlieftinkmrdm
Copy link

vlieftinkmrdm commented May 30, 2024

I ran into the same problem, but I think I know what's happening here.
You need to make sure that the driver ( the client that actually submits the job ) also has the proxy settings applied to their Spark-config:

spark.ui.reverseProxy true
spark.ui.reverseProxyUrl https://spark.staging.abc.com

It's not a Apache Spark nor a Bitnami problem.

@javsalgar
Copy link
Contributor

Thanks for letting us know!

@haarvester
Copy link

Hi All. The issue still persist same as @imsharadmishra.
I set
spark.ui.reverseProxy true
spark.ui.reverseProxyUrl https://my.domain.com But paths /stages /executors and etc. still redirect me to main details page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved spark stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

5 participants