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

Can't run linkerd top in Windows Subsystem for Linux shell #1976

Closed
switchboardOp opened this issue Dec 12, 2018 · 15 comments
Closed

Can't run linkerd top in Windows Subsystem for Linux shell #1976

switchboardOp opened this issue Dec 12, 2018 · 15 comments

Comments

@switchboardOp
Copy link

switchboardOp commented Dec 12, 2018

Bug Report

What is the issue?

Not able to run linkerd top as described in the getting-started guide.

How can it be reproduced?

Follow the getting-started guide to deploy linkerd stable-2.1.0 on Kubernetes.
the command linkerd -n linkerd top deploy/linkerd-web from step 4 will fail.

Logs, error output, etc

[☸ kubernetes-admin@cluster.local:linkerd] ~|⇒ linkerd -n linkerd --verbose top deploy/linkerd-web
[https://xx.xx.xx.xx:6443/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/]
DEBU[0000] Making gRPC-over-HTTP call to [https://xx.xx.xx.xx:6443/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/SelfCheck] []
DEBU[0000] Response from [https://xx.xx.xx.xx:6443/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/SelfCheck] had headers: map[Content-Type:[application/octet-stream] Date:[Wed, 12 Dec 2018 05:54:06 GMT] Content-Length:[108]]
DEBU[0000] gRPC-over-HTTP call returned status [200 OK] and content length [108]
DEBU[0003] Response from [https://xx.xx.xx.xx:6443/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/TapByResource] had headers: map[Content-Type:[application/octet-stream] Date:[Wed, 12 Dec 2018 05:54:09 GMT]]
Error: invalid argument

linkerd check output

kubernetes-api: can initialize the client..................................[ok]
kubernetes-api: can query the Kubernetes API...............................[ok]
kubernetes-api: is running the minimum Kubernetes API version..............[ok]
linkerd-api: control plane namespace exists................................[ok]
linkerd-api: control plane pods are ready..................................[ok]
linkerd-api: can initialize the client.....................................[ok]
linkerd-api: can query the control plane API...............................[ok]
linkerd-api[kubernetes]: control plane can talk to Kubernetes..............[ok]
linkerd-api[prometheus]: control plane can talk to Prometheus..............[ok]
linkerd-api: no invalid service profiles...................................[ok]
linkerd-version: can determine the latest version..........................[FAIL] -- Get https://versioncheck.linkerd.io/version.json?version=stable-2.1.0&uuid=unknown&source=cli: context deadline exceeded

Status check results are [FAIL]

Environment

  • Kubernetes Version: 1.12.3 and 1.9.6
  • Cluster Environment: Installed on VMs using Kubespray
  • Host OS: CentOS 7
  • Linkerd version: stable-2.1.0

Possible solution

Additional context

I'm getting the same result on Kube 1.9.6 and 1.12.3

There's an issue with the external network for these cluster that's causing the linkerd-version check to fail, but I don't think that's the root cause here.

I've validated that the install is working otherwise by accessing the UI and running other linkerd commands.

@klingerf
Copy link
Member

@switchboardOp Thanks for reporting this! That's definitely unexpected. I'm unable to reproduce this with linkerd 2.1 on my test cluster. Can you confirm that you control plane is also running linkerd 2.1, but pasting the results of running linkerd version into this issue?

@klingerf
Copy link
Member

And if you could also paste the logs from the public-api container after a failed top command is run, that would be great.

kubectl -n linkerd logs deploy/linkerd-controller public-api

@switchboardOp
Copy link
Author

switchboardOp commented Dec 12, 2018

Looks like it can't connect to a particular IP (api server?), but I'm not sure what IP that is. It's not a pod or endpoint in the cluster.
kubectl get endpoints --all-namespaces -owide | grep 10.233.0.1 and
kubectl get pods --all-namespaces -owide | grep 10.233.0.1 both return nothing.

kubectl -n linkerd logs deploy/linkerd-controller public-api output:

[☸ kubernetes-admin@cluster.local:linkerd] ~|⇒ kubectl -n linkerd logs deploy/linkerd-controller public-api
time="2018-12-12T05:15:52Z" level=info msg="running version stable-2.1.0"
time="2018-12-12T05:15:52Z" level=info msg="starting admin server on :9995"
time="2018-12-12T05:15:52Z" level=info msg="waiting for caches to sync"
time="2018-12-12T05:15:52Z" level=info msg="starting HTTP server on :8085"
E1212 05:15:52.784009       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:52.784337       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:52.784400       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:52.784776       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:52.785136       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:53.784487       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:53.785538       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:53.786540       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:53.787576       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:53.788788       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:54.786019       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:54.786185       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:54.793713       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:54.793758       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:54.793786       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:55.787105       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:55.792257       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:55.794215       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:55.795074       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:55.796202       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:56.787651       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:56.792564       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:56.794479       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:56.795578       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:56.796613       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:57.788218       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:57.792958       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:57.794788       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:57.795840       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:57.796852       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:58.788717       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:58.793277       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:58.795064       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:58.796104       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:58.797105       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:59.791130       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:59.793548       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:59.795342       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:59.796621       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 05:15:59.797931       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
time="2018-12-12T05:16:00Z" level=info msg="caches synced"

@klingerf
Copy link
Member

Ah, that's (unfortunately) the expected log output. That process syncs with the kubernetes API, so 10.233.0.1:443 is the address of the kubernetes API server. When the process first starts, it attempts to sync, but the sync requests are routed through linkerd-proxy, and linkerd-proxy hasn't initialized yet. So it logs and retries, as expected. The sync eventually succeeds if you see the "caches synced" log message.

To date, we haven't been able to suppress those messages due to kubernetes/kubernetes#61006, but that issue was resolved a month ago. I think that the next time we bump our k8s.io deps we could potentially fix the log output, but that's not the source of the linkerd top errors that you're seeing.

Just to confirm, you don't see any additional logs after the "caches synced" message? You could retry reinstalling linkerd with the --controller-log-level=debug flag set to see if that produces any additional output that might help to track this down.

@switchboardOp
Copy link
Author

switchboardOp commented Dec 12, 2018

"caches synced" was the last line I got from the public-api container.

Here's that same public-api log with debug on...

time="2018-12-12T20:55:46Z" level=info msg="running version stable-2.1.0"
time="2018-12-12T20:55:46Z" level=info msg="starting admin server on :9995"
time="2018-12-12T20:55:46Z" level=info msg="waiting for caches to sync"
time="2018-12-12T20:55:46Z" level=info msg="starting HTTP server on :8085"
E1212 20:55:46.860781       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Pod: Get https://10.233.0.1:443/api/v1/pods?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 20:55:46.860844       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.Deployment: Get https://10.233.0.1:443/apis/apps/v1beta2/deployments?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 20:55:46.860877       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Service: Get https://10.233.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 20:55:46.860931       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta2.ReplicaSet: Get https://10.233.0.1:443/apis/apps/v1beta2/replicasets?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
E1212 20:55:46.860959       1 reflector.go:205] k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://10.233.0.1:443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: dial tcp 10.233.0.1:443: connect: connection refused
time="2018-12-12T20:55:47Z" level=info msg="caches synced"
time="2018-12-12T20:56:57Z" level=debug msg="Serving POST /api/v1/SelfCheck" req.Form="map[]" req.Method=POST req.URL=/api/v1/SelfCheck
time="2018-12-12T20:56:57Z" level=debug msg="Query request:\n\tmax(process_start_time_seconds{}) by (pod, namespace)"
time="2018-12-12T20:56:57Z" level=debug msg="Query response:\n\t{} => 1544648147.61 @[1544648217.453]\n{namespace=\"linkerd\", pod=\"linkerd-controller-bb6f64bdb-blrs7\"} => 1544648147 @[1544648217.453]\n{namespace=\"linkerd\", pod=\"linkerd-grafana-76798b4bff-jmfnn\"} => 1544591759 @[1544648217.453]\n{namespace=\"linkerd\", pod=\"linkerd-prometheus-b5694d5d4-j7t9m\"} => 1544591759 @[1544648217.453]\n{namespace=\"linkerd\", pod=\"linkerd-web-df546b8d-bk9c9\"} => 1544648148 @[1544648217.453]"
time="2018-12-12T20:56:59Z" level=debug msg="Serving POST /api/v1/TapByResource" req.Form="map[]" req.Method=POST req.URL=/api/v1/TapByResource

Nothing's jumping out at me, but then I am a linkerd newbie.

@klingerf
Copy link
Member

Thanks for pasting the debug output. I agree -- that all looks sane to me.

Out of curiosity, what system are you running the linkerd top command on? We use a library called termbox to draw the top output, and it looks like that library can panic with "invalid argument" on some platforms, if I'm reading nsf/termbox-go#174 correctly.

@switchboardOp
Copy link
Author

aha! I was running the command from my WSL shell running ubuntu 16.04

ssh'd into one of the masters (CentOS) and installed the cli. That seems to work. Thank you.

Guess I'll avoid using top from the cli until some changes from Microsoft roll out.

@klingerf
Copy link
Member

@switchboardOp Glad we were able to get to the bottom of this! We can leave this issue open to track handling WSL better. At a minimum, if we can't draw the top table, we should display a more intelligible error message. Thanks for your help tracking this down.

@klingerf klingerf changed the title can't run linkerd top as described in the getting-started guide Can't run linkerd top in Windows Subsystem for Linux shell Dec 12, 2018
@jon-walton
Copy link
Contributor

jon-walton commented Jan 3, 2019

@switchboardOp what version of windows are you running?

$ systeminfo.exe | grep "OS Version"
OS Version:                10.0.17763 N/A Build 17763
$ uname -srv
Linux 4.4.0-17763-Microsoft #194-Microsoft Mon Dec 03 17:58:00 PST 2018
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
$ linkerd version
Client version: edge-18.12.4
Server version: edge-18.12.4
$ linkerd -n linkerd --verbose top deploy/linkerd-web
DEBU[0001] Expecting API to be served over [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/]
DEBU[0001] Making gRPC-over-HTTP call to [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/SelfCheck] []
DEBU[0001] Response from [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/SelfCheck] had headers: map[Audit-Id:[c07c1e3a-1205-4fa7-8610-ac017024bfea] Content-Type:[application/octet-stream] Date:[Thu, 03 Jan 2019 13:57:20 GMT] Content-Length:[108]]
DEBU[0001] gRPC-over-HTTP call returned status [200 OK] and content length [108]
DEBU[0003] Response from [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/TapByResource] had headers: map[Audit-Id:[6a28417d-d1cd-4553-9218-294733261758] Content-Type:[application/octet-stream] Date:[Thu, 03 Jan 2019 13:57:22 GMT]]


(press q to quit)

Source                               Destination                   Method      Path       Count    Best   Worst    Last  Success Rate
azure-cni-networkmonitor-csnfg       linkerd-web-68fd7997dc-5w74f  GET         /ping          2   484µs   489µs   489µs       100.00%
linkerd-prometheus-69976cf9b7-kb8tl  linkerd-web-68fd7997dc-5w74f  GET         /metrics       1     1ms     1ms     1ms       100.00%
azure-cni-networkmonitor-csnfg       linkerd-web-68fd7997dc-5w74f  GET         /ready         1   450µs   450µs   450µs       100.00%

my work laptop is running an older windows build, i can test tomorrow

@switchboardOp
Copy link
Author

Looks like I am on an older build of Windows and the kernel @jon-walton.

PS > systeminfo.exe | grep "OS Version"
OS Version:                10.0.16299 N/A Build 16299
$  uname -svr
Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"

$ linkerd version
Client version: stable-2.1.0
Server version: stable-2.1.0

I will try updating if it's not blocked by GPO 🤞

@jon-walton
Copy link
Contributor

I just tested on an older build (1803) and it works:

$ systeminfo.exe | grep "OS Version"
OS Version:                10.0.17134 N/A Build 17134

$ uname -srv
Linux 4.4.0-17134-Microsoft #471-Microsoft Fri Dec 07 20:04:00 PST 2018

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"

$ linkerd version
Client version: edge-18.12.1
Server version: edge-18.12.4

$ linkerd -n linkerd --verbose top deploy/linkerd-web
DEBU[0001] Expecting API to be served over [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/]
DEBU[0001] Making gRPC-over-HTTP call to [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/SelfCheck] []
DEBU[0001] Response from [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/SelfCheck] had headers: map[Audit-Id:[1c1708da-1545-492c-86ac-552d2793be0d] Content-Type:[application/octet-stream] Date:[Fri, 04 Jan 2019 03:20:14 GMT] Content-Length:[108]]
DEBU[0001] gRPC-over-HTTP call returned status [200 OK] and content length [108]
DEBU[0002] Response from [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/TapByResource] had headers: map[Audit-Id:[5a862236-77c2-4a37-8666-550b8f097585] Content-Type:[application/octet-stream] Date:[Fri, 04 Jan 2019 03:20:15 GMT]]


(press q to quit)

Source                         Destination                  Method     Path                                  Count  Best   Worst  Last   Success Rate
azure-cni-networkmonitor-csnfg linkerd-web-68fd7997dc-5w74f GET        /ready                                1      455µs  455µs  455µs  100.00%
azure-cni-networkmonitor-csnfg linkerd-web-68fd7997dc-5w74f GET        /ping                                 1      592µs  592µs  592µs  100.00%

I don't have any machines running anything older then 1803.

I also tested with linkerd 2.1 stable which also works for me ./linkerd2-cli-stable-2.1.0-linux -n linkerd --verbose top deploy/linkerd-web

@klingerf
Copy link
Member

klingerf commented Jan 7, 2019

@switchboardOp Were you able to update to see if that fixes the issue with running linkerd top?

@switchboardOp
Copy link
Author

I'm unable to update the Windows installation on my machine at this time.
I did update the Ubuntu release running in WSL to 18.04.1 LTS (Bionic Beaver), and still get the same result from linkerd top.

Definitely seems related to the older Windows build I'm running.

@jon-walton
Copy link
Contributor

I was able to install Windows 10 1709 and can confirm it doesn't work in WSL with this version of windows.

$ systeminfo.exe | grep "OS Version"
OS Version:                10.0.16299 N/A Build 16299
$ uname -srv
Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014
$ linkerd -n linkerd top --verbose deploy/linkerd-web
DEBU[0001] Expecting API to be served over [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/]
DEBU[0001] Making gRPC-over-HTTP call to [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/SelfCheck] []
DEBU[0001] Response from [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/SelfCheck] had headers: map[Date:[Wed, 09 Jan 2019 05:59:16 GMT] Content-Length:[108] Audit-Id:[6b1bdc5e-eb57-4dd8-b4d6-8798e6ced780] Content-Type:[application/octet-stream]]
DEBU[0001] gRPC-over-HTTP call returned status [200 OK] and content length [108]
DEBU[0009] Response from [https://x.x.x.x/api/v1/namespaces/linkerd/services/linkerd-controller-api:http/proxy/api/v1/TapByResource] had headers: map[Audit-Id:[d6ccb65a-5cde-44f0-8f75-e141eafbc304] Content-Type:[application/octet-stream] Date:[Wed, 09 Jan 2019 05:59:23 GMT]]
Error: invalid argument
Usage:
  linkerd top [flags] (RESOURCE)

Examples:
  # display traffic for the web deployment in the default namespace
  linkerd top deploy/web

  # display traffic for the web-dlbvj pod in the default namespace
  linkerd top pod/web-dlbvj

Flags:
      --authority string      Display requests with this :authority
  -h, --help                  help for top
      --hide-sources          Hide the source column
      --max-rps float32       Maximum requests per second to tap. (default 100)
      --method string         Display requests with this HTTP method
  -n, --namespace string      Namespace of the specified resource (default "default")
      --path string           Display requests with paths that start with this prefix
      --routes                Display data per route instead of per path
      --scheme string         Display requests with this scheme
      --to string             Display requests to this resource
      --to-namespace string   Sets the namespace used to lookup the "--to" resource; by default the current "--namespace" is used

Global Flags:
      --api-addr string            Override kubeconfig and communicate directly with the control plane at host:port (mostly for testing)
      --context string             Name of the kubeconfig context to use
      --kubeconfig string          Path to the kubeconfig file to use for CLI requests
  -l, --linkerd-namespace string   Namespace in which Linkerd is installed [$LINKERD_NAMESPACE] (default "linkerd")
      --verbose                    Turn on debug logging

@grampelberg
Copy link
Contributor

Looks like this was an issue specific to a unique windows version. Closing out for now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants