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

[BUG][v2.9] Unable to use Rancher UI proxied Grafana to view most(?) dashboards #46567

Closed
blovett opened this issue Aug 7, 2024 · 13 comments
Closed
Assignees
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release team/observability&backup the team that is responsible for monitoring/logging and BRO

Comments

@blovett
Copy link

blovett commented Aug 7, 2024

Rancher Server Setup

  • Rancher version: 2.9.0
  • Installation option (Docker install/Helm Chart): Helm
    • If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc):
      • 104.1.0+up57.0.3
      • RKE2 v1.28.12+rke2r1
  • Proxy/Cert Details:

Information about the Cluster

  • Kubernetes version: v1.28.12+rke2r1 / v1.30.2+rke2r1
  • Cluster Type (Local/Downstream): both
    • If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider): custom, rke2

User Information

  • What is the role of the user logged in? Admin

Describe the bug

When attempting to view graphs in Grafana that have been proxied through the Rancher UI, some end up erroring out in a funny way. Example shown in the below screenshot.

rancher-proxy-error-example

To Reproduce

Navigate to cluster dashboard. Select Monitoring on the left hand side. Then select Grafana. Open up a dashboard such as "Kubernetes / Compute Resources / Cluster".

Result

The browser window goes white, and the dashboard does not display as expected.

Expected Result

Dashboards are usable.

Screenshots
Attached above.

Additional context
None that I can think of at this moment.

@blovett blovett added the kind/bug Issues that are defects reported by users or that we know have reached a real release label Aug 7, 2024
@mallardduck mallardduck added the team/observability&backup the team that is responsible for monitoring/logging and BRO label Aug 8, 2024
@mallardduck
Copy link
Member

Hiya @blovett - Can you share what version of the monitoring chart you are using here? I mostly want to confirm because there are 2 versions of charts that we shipped for rancher-monitoring in 2.9.0 - so I want to confirm which of the two this issue happens on for you? Or if it happens on both versions?

@blovett
Copy link
Author

blovett commented Aug 13, 2024

Hiya @blovett - Can you share what version of the monitoring chart you are using here? I mostly want to confirm because there are 2 versions of charts that we shipped for rancher-monitoring in 2.9.0 - so I want to confirm which of the two this issue happens on for you? Or if it happens on both versions?

Hi. This is with rancher-monitoring-104.1.0+up57.0.3. I have not tried the other version yet. Sorry for leaving this out.

@blovett
Copy link
Author

blovett commented Aug 14, 2024

I installed the other version (104.0.0+up45.31.1) on a test cluster and it does not exhibit this behavior. Upgrading it to 104.1.0+up57.0.3 and it does. Downgrading, it doesn"t again.

@mallardduck
Copy link
Member

@blovett - Greatly appreciate you clarifying the version and going as far as testing both!

We shipped two versions this release because we were upgrading the underlying components. So the issue seems to only exist in the newer version. From my quick test on my side it seems like the issue seems to be related to some missing or inaccessible web-assets. We"ll look into this further and see about getting this fixed.

@mallardduck
Copy link
Member

mallardduck commented Aug 14, 2024

Digging more into this - just going to dump a stream of w/e logging I can find:

Here"s the URL that is failing: /api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/chunk.8.8aa451110aebe6a6cc4f.js

From grafana container logs on rancher-monitoring-grafana- pod:

logger=context userId=0 orgId=1 uname= t=2024-08-14T14:21:07.503318251Z level=info msg="Request Completed" method=GET path=/chunk.8.8aa451110aebe6a6cc4f.js status=404 remote_addr=192.168.1.140 time_ms=1102 duration=1.102236101s size=45291 referer="/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/d/efa86fd1d0c121a26444b636a3f509a8/kubernetes-compute-resources-cluster?orgId=1&refresh=10s" handler=notfound

Upon doing a complete wip of site cache (via Application tab of devtools, "Clear Site Data") the UI loading issues no longer break the page visually. However the 404 for the JS file still happens and many graphs are incorrectly rendered. Of note - loading a different dashboard works fine.

I"ve determined the 404 isn"t the root cause of this issue. As the issue happens on dashboards where the 404 does not appear. The issue is actually related to this error in the JS console:

Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

Edit: 🤔 So maybe not related to that uncaught error in promies...I"m observing the issue happening on render even before that error is logged.

@mallardduck
Copy link
Member

This appears to be fixed in the pending rebase for 2.10 bumping to use 61.3.2 upstream.
I suspect that this will be backported to 2.9 and should resolve this issue at that time.

@skanakal
Copy link
Contributor

skanakal commented Sep 16, 2024

@mallardduck This issue is likely from here grafana/grafana#76180
The fix is included in Grafana v10.3.4, and it worked for me...

Internal ref: SURE-9001

@mallardduck
Copy link
Member

@skanakal - I"ve tested and found we can upgrade to a higher version to fix as well. I have created initial PR to mirror the new versions we will need.

@mallardduck mallardduck self-assigned this Sep 26, 2024
@mallardduck mallardduck reopened this Sep 30, 2024
@mallardduck mallardduck changed the title [BUG] Unable to use Rancher UI proxied Grafana to view most(?) dashboards [BUG][v2.9] Unable to use Rancher UI proxied Grafana to view most(?) dashboards Sep 30, 2024
@mallardduck
Copy link
Member

Still need a PR to patch existing affected chart versions to use new images.

@mallardduck
Copy link
Member

Fix merged into dev-v2.9 branch under 104.1.2-rc.1+up57.0.3

mallardduck added a commit to mallardduck/rancher-charts that referenced this issue Oct 1, 2024
@deepakpunia-suse deepakpunia-suse self-assigned this Oct 14, 2024
@deepakpunia-suse
Copy link

deepakpunia-suse commented Oct 14, 2024

Bug verification steps confirmed Grafana dashboards load correctly without issues with below version. The white screen issue appears resolved.

Details :
Rancher : v2.9.3-alpha5
cluster : v1.30.5+rke2r1
monitoring : 104.1.2-rc.1+up57.0.3
logging : 104.1.2-rc.1+up4.8.0

Steps to verify this bug:

  • Access Grafana via Rancher UI.
  • Select a dashboard, like "Kubernetes / Compute Resources / Cluster."
  • Observe for any white screen error on loading the dashboard.

Attached screen shot
Image

@SignFinder
Copy link

There is not the version 104.1.2-rc.1+up57.0.3 in charts, might better not to close the issue yet?

@deepakpunia-suse
Copy link

deepakpunia-suse commented Oct 21, 2024

Now it"s changed to 104.1.2+up57.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release team/observability&backup the team that is responsible for monitoring/logging and BRO
Projects
None yet
Development

No branches or pull requests

5 participants