linkerd2: Can't run `linkerd top` in Windows Subsystem for Linux shell

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.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

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

@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.