ECSTeam / cloudfoundry-top-plugin

Cloud Foundry CF cli plugin - show top stats
Apache License 2.0
73 stars 21 forks source link

`cf top' fails in Windows Subsystem for Linux #11

Closed siennathesane closed 5 years ago

siennathesane commented 6 years ago

Using version 0.9.3:

mike@boulder:/mnt/c/Users/MikeLloyd$ wget https://github.com/ECSTeam/cloudfoundry-top-plugin/releases/download/v0.9.3/top-plugin-linux64
mike@boulder:/mnt/c/Users/MikeLloyd$ cf install-plugin top-plugin-linux64
Attention: Plugins are binaries written by potentially untrusted authors.
Install and use plugins at your own risk.
Do you want to install the plugin top-plugin-linux64? [yN]: y
Installing plugin top...
OK
Plugin top 0.9.3 successfully installed.
mike@boulder:/mnt/c/Users/MikeLloyd$ cf top
2018/05/14 16:31:54 invalid argument
panic: invalid argument

goroutine 1 [running]:
log.Panicln(0xc42014db78, 0x1, 0x1)
        /usr/local/Cellar/go/1.9.3/libexec/src/log/log.go:340 +0xc0
github.com/ecsteam/cloudfoundry-top-plugin/ui.(*MasterUI).initGui(0xc4201f8000, 0x0)
        /Users/kkellner/go_lib/src/github.com/ecsteam/cloudfoundry-top-plugin/ui/masterUi.go:158 +0xac
github.com/ecsteam/cloudfoundry-top-plugin/ui.(*MasterUI).Start(0xc4201f8000, 0x0)
        /Users/kkellner/go_lib/src/github.com/ecsteam/cloudfoundry-top-plugin/ui/masterUi.go:151 +0x4b
github.com/ecsteam/cloudfoundry-top-plugin/top.(*Client).Start(0xc4200ada80)
        /Users/kkellner/go_lib/src/github.com/ecsteam/cloudfoundry-top-plugin/top/client.go:144 +0x464
main.(*TopCmd).Run(0xc42004c500, 0xd3ebc0, 0xc42004c510, 0xc420080080, 0x1, 0x1)
        /Users/kkellner/go_lib/src/github.com/ecsteam/cloudfoundry-top-plugin/main.go:167 +0x782
github.com/ecsteam/cloudfoundry-top-plugin/vendor/github.com/cloudfoundry/cli/plugin.Start(0xd35a00, 0xc42004c500)
        /Users/kkellner/go_lib/src/github.com/ecsteam/cloudfoundry-top-plugin/vendor/github.com/cloudfoundry/cli/plugin/plugin_shim.go:30 +0x28f
main.main()
        /Users/kkellner/go_lib/src/github.com/ecsteam/cloudfoundry-top-plugin/main.go:76 +0x3d
mattyindustries commented 5 years ago

Hi

Adding a vote to this issue as I'm trying to use cf top on WSL as well and same problem.

Sorry that its outside my ability to fix this and give a patch

Mat

kkellner-cl commented 5 years ago

Is this still happening? It's an issue deep inside a library call.

Reported long ago from golang side: https://github.com/asciimoo/wuzz/issues/88

Which points to the WSL issue, but was marked as fixed a while ago. https://github.com/microsoft/WSL/issues/601

mattyindustries commented 5 years ago

This is still happening for me although I am running on a corporate Windows 10 environment that is massively out of date.

Windows 10 Version 1709 (OS Build 16299.1268)

kkellner-cl commented 5 years ago

Based on the following link, it seems like your base Windows 10 version is from October 17, 2017

https://en.wikipedia.org/wiki/Windows_10_version_history

It's not clear from the issue WSL#601 listed above which Windows 10 build the fix went into. I would need someone with a newer Windows 10 build to test and see if its working. From my side, I don't think there is anything I can do to make this work. Sorry.

siennathesane commented 5 years ago

I don't have cf top installed locally anymore (since I don't have a local CF deployment), so I can't test this, sorry.

mattyindustries commented 5 years ago

I've actually just had my corporate workstation updated to Version 1809 OS Build 17763.379 and cf top is now working.

kkellner commented 5 years ago

That's great news. I'm going to close this issue. Fix is to install newer version of Windows.