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

Frontend is not rendered when web-svc is accessed through kubeproxy #57

Open
ctaggart opened this issue Nov 27, 2018 · 8 comments
Open

Comments

@ctaggart
Copy link

@klingerf
Copy link
Contributor

@ctaggart Hmm, interesting -- it looks like the <title> attribute of that page is loading, since it's displayed in your tab. Can you check your javascript console to see if the page is throwing javascript errors?

@ctaggart
Copy link
Author

ctaggart commented Nov 27, 2018

Can you check your javascript console to see if the page is throwing javascript errors?

There are no errors logged to the javascript console in Firefox or Chrome.

@klingerf
Copy link
Contributor

Hmm, ok, thanks for the quick reply. Can you also paste the output of curl -v http://localhost:8001/api/v1/namespaces/emojivoto/services/web-svc:http/proxy/?

@ctaggart
Copy link
Author

*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8001 (#0)
> GET /api/v1/namespaces/emojivoto/services/web-svc:http/proxy/ HTTP/1.1
> Host: localhost:8001
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 678
< Content-Type: text/html
< Date: Tue, 27 Nov 2018 03:09:34 GMT
<

        <!DOCTYPE html>
        <html>
                <head>
                        <meta charset="UTF-8">
                        <title>Emoji Vote</title>
                        <link rel="icon" href="/api/v1/namespaces/emojivoto/services/web-svc:http/proxy/img/favicon.ico">

                        <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-60040560-4"></script>
                        <script>
                          window.dataLayer = window.dataLayer || [];
                          function gtag(){dataLayer.push(arguments);}
                          gtag('js', new Date());
                          gtag('config', 'UA-60040560-4');
                        </script>
                </head>
                <body>
                        <div id="main" class="main"></div>
                </body>

                        <script type="text/javascript" src="/api/v1/namespaces/emojivoto/services/web-svc:http/proxy/js" async=""></script>

* Connection #0 to host localhost left intact
        </html>

@klingerf
Copy link
Contributor

Ahh, interesting, I'm able to reproduce this locally as well. It looks like the emojivoto app doesn't work unless it's served from the root URL. Must be a javascript thing.

Instead of using kubectl proxy to view that app, can you try port forwarding instead? If you run:

kubectl -n emojivoto port-forward svc/web-svc 8899:80

Then you should hopefully see the app when you visit http://localhost:8899 in your browser.

@ctaggart
Copy link
Author

Yes, the port-forward work-a-round works for me and I can proceed with linkerd evaluation. Would be nice to see the javascript thing fixed.

@ctaggart
Copy link
Author

Following the tutorial, I applied:

kubectl get -n emojivoto deploy -o yaml \
  | linkerd inject - \
  | kubectl apply -f -

I clicked around the port-forwarded web application a bunch, but I'm not getting anything to show up. Is there a minimum number of requests or something like that?

cameron@Azure:~$ linkerd -n emojivoto stat deploy
NAME       MESHED   SUCCESS   RPS   LATENCY_P50   LATENCY_P95   LATENCY_P99   TLS
emoji         1/1         -     -             -             -             -     -
vote-bot      1/1         -     -             -             -             -     -
voting        1/1         -     -             -             -             -     -
web           1/1         -     -             -             -             -     -

@klingerf
Copy link
Contributor

Hmm, yeah, that's unexpected. I saw your comment on linkerd/linkerd2#1451, which is a good place to track that. Will follow up there, and I'll rename the title of this issue to track fixing the javascript issue.

@klingerf klingerf changed the title blank page when using kubectl proxy Frontend is not rendered when web-svc is accessed through kubeproxy Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants