linkerd2 icon indicating copy to clipboard operation
linkerd2 copied to clipboard

Viz dashboard main script 404

Open junnplus opened this issue 3 years ago • 6 comments

What is the issue?

same question with https://github.com/linkerd/linkerd2/issues/8718

How can it be reproduced?

  1. Start viz dashboard
  2. Navigate to any other resource, e.g. a deployment.
  3. Refresh page.

Quick verification: open http://localhost:8084/namespaces/default/deployments (change ip/host)

Logs, error output, etc

GET http://localhost:8084/namespaces/dist/main.82c8da3a2c82d46049d2.js net::ERR_ABORTED 404 (Not Found)

output of linkerd check -o short

Linkerd core checks
===================
...
Status check results are √

Environment

  • Kuberentes version: 1.23
  • Environment: Linode LKE
  • Linkerd version: stable-2.12.0

Possible solution

No response

Additional context

No response

Would you like to work on fixing this bug?

No response

junnplus avatar Sep 21 '22 06:09 junnplus

Are you accessing the dashboard from the "same" machine where linkerd is installed? Since there is a protection enabled for host header check, you either need to follow that or remove the host header check on viz web deployment manifest. Read more here https://linkerd.io/2.12/tasks/exposing-dashboard/

manju-rn avatar Sep 21 '22 23:09 manju-rn

@manju-rn I can open the dashboard, but refreshing it won't work properly under certain routes https://github.com/linkerd/linkerd2/issues/8718

junnplus avatar Sep 22 '22 01:09 junnplus

Ah okay. Dunno about localhost, can you try with ingress controller or maybe try to update the svc as LoadBalancer and check.

manju-rn avatar Sep 22 '22 05:09 manju-rn

@manju-rn also have the same problem

junnplus avatar Sep 22 '22 05:09 junnplus

@manju-rn also have the same problem

okay - somehow I never have issue with navigation on the pages. and I have installed in multiple clusters. I haven't actually tried the forward port and opening a dashboard though, let me try that.

manju-rn avatar Sep 22 '22 06:09 manju-rn

i think i found the root cause: https://github.com/linkerd/linkerd2/blob/main/web/app/index_bundle.js.lodash.tmpl#L4-L17

Some browser plugins will insert script tags in HTML page, resulting in wrong root paths

junnplus avatar Sep 22 '22 11:09 junnplus