Repository navigation
KD demon install / start fails when installing via WSL (ubuntu) - Enable Koding on Windows (viaWSL) #11493
Description
When trying to install kd on the WSL available current versions of windows (default ubuntu), all steps go through fine besides Installing "Start KD Deamon". KD and other tools install fine and are available. KD start asks to go through the installation process again.
I wanne stress that this is
- NOT about installing kd on windows natively
- but about installing koding on the Linux distribution that can be executed alongside windows via so called WSL (Windows Linux Subsystem)
Expected Behavior
Install of KD in WSL (Ubuntu) should complete including installing and starting the KD Deamon
Current Behavior
Installation of Installing "Start KD Deamon" fails with various errors:
- timeout
- invalid page type
- others (but less frequently and i didn't grab them sry :))
Sample error:
sudo curl -sL https://kodi.ng/c/p/kd | bash -s 07a3d309
...
Installing "KD Daemon"...
Current version: -
Latest version: 0.1.113
Downloading klient-0.1.113.gz: 8.63 MB/8.64 MB
Installing "KD"...
Current version: 0.1.120
Latest version: 0.1.120
Already installed, skipping.
Installing "Start KD Deamon"...
panic: invalid page type: 0: 4
goroutine 1 [running]:
vendor/github.com/boltdb/bolt.(*Cursor).search(0xc420049820, 0x18c9540, 0x7, 0x7, 0x4)
/opt/koding/go/src/vendor/github.com/boltdb/bolt/cursor.go:256 +0x405
vendor/github.com/boltdb/bolt.(*Cursor).seek(0xc420049820, 0x18c9540, 0x7, 0x7, 0x0, 0x0, 0x2, 0x3, 0xc42001c650, 0xc42001c600, ...)
/opt/koding/go/src/vendor/github.com/boltdb/bolt/cursor.go:159 +0xb1
vendor/github.com/boltdb/bolt.(*Bucket).Bucket(0xc420575978, 0x18c9540, 0x7, 0x7, 0xc4200498b0)
/opt/koding/go/src/vendor/github.com/boltdb/bolt/bucket.go:112 +0x108
vendor/github.com/boltdb/bolt.(*Tx).Bucket(0xc420575960, 0x18c9540, 0x7, 0x7, 0xc400000008)
/opt/koding/go/src/vendor/github.com/boltdb/bolt/tx.go:101 +0x4f
koding/kites/metrics.(*BoltStorage).Write.func1(0xc420575960, 0x126d510, 0xc420575960)
/opt/koding/go/src/koding/kites/metrics/bolt.go:58 +0x58
vendor/github.com/boltdb/bolt.(*DB).Update(0xc42011cb40, 0xc420049960, 0x0, 0x0)
/opt/koding/go/src/vendor/github.com/boltdb/bolt/db.go:595 +0x9f
koding/kites/metrics.(*BoltStorage).Write(0xc420102170, 0xc4208c2e00, 0x321, 0x380, 0x321, 0x380, 0x28)
/opt/koding/go/src/koding/kites/metrics/bolt.go:67 +0x81
vendor/github.com/DataDog/datadog-go/statsd.(*Client).sendMsg(0xc420178700, 0xc4208c2a80, 0x321, 0xc42060ce58, 0x3)
/opt/koding/go/src/vendor/github.com/DataDog/datadog-go/statsd/statsd.go:239 +0xc6
vendor/github.com/DataDog/datadog-go/statsd.(*Client).send(0xc420178700, 0xc420049b98, 0x1c, 0xc42060ce58, 0x3, 0xc42015f680, 0x17, 0x28, 0x3ff0000000000000, 0xc420049ad0, ...)
/opt/koding/go/src/vendor/github.com/DataDog/datadog-go/statsd/statsd.go:252 +0xd0
vendor/github.com/DataDog/datadog-go/statsd.(*Client).Count(0xc420178700, 0xc420049b98, 0x1c, 0x1, 0xc42015f680, 0x17, 0x28, 0x3ff0000000000000, 0x17, 0x28)
/opt/koding/go/src/vendor/github.com/DataDog/datadog-go/statsd/statsd.go:264 +0x118
koding/klientctl/commands/cli.WithMetrics.func1(0xc42013e240, 0xc42034df20, 0x0, 0x3, 0x0, 0x0)
/opt/koding/go/src/koding/klientctl/commands/cli/metrics.go:70 +0x508
vendor/github.com/spf13/cobra.(*Command).execute(0xc42013e240, 0xc42034def0, 0x3, 0x3, 0xc42013e240, 0xc42034def0)
/opt/koding/go/src/vendor/github.com/spf13/cobra/command.go:647 +0x3f8
vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4204fa240, 0xc4203d3680, 0xc4203cd200, 0xc4202f46c0)
/opt/koding/go/src/vendor/github.com/spf13/cobra/command.go:726 +0x339
vendor/github.com/spf13/cobra.(*Command).Execute(0xc4204fa240, 0xc4204fa240, 0xc4204bc7e0)
/opt/koding/go/src/vendor/github.com/spf13/cobra/command.go:685 +0x2b
main.main()
/opt/koding/go/src/koding/klientctl/main.go:44 +0x1aa
Steps to Reproduce (for bugs)
- Blank Windows 10
- Enable Windows Feature WSL (needs proper license)
- Install Koding CLI
Context
We would love to use Koding due to a windows environment. But we are also big users of WSL (the ability to run windows and linux side by side built into windows)
This is really about providing a viable workaround for running kd on windows:
- Migrating and continuously supporting koding stack to windows will take significant amount of time
- Therefore provide windows users with a viable workaround by fixing the installation errors for
Start KD Deamonwhen deploying kd in WSL (ubuntu)
Here is how:
WSL enables users to map their windows drives/folders within the linux subsystem which would allow users to keep using their windows based dev environment simply pointed to mapped folders.
While this is not optimal it would be a great a lightweight way (compare to building and maintaining koding /kite utilities on windows natively) to enable windows users to leverage coding.
And since all performance relevant tasks are handled remotely the perf hit due to system mapping should very likely acceptable in terms of end users performance.
Your Environment
Windows 10 (17134.48)
WLS => Ubuntu 16.04.2 LTS
Activity
rjeczalik commentedon May 19, 2018
@ntziolis Hey, thanks for reporting this. From the stacktrace it looks like it's rather problem with BoltDB:
Afair it uses mmap to read the database file from a memory, I guess we could try forcing it to read it from disk for WSL, but I'm afraid we'd have no way of testing this at the moment.
ntziolis commentedon May 19, 2018
@rjeczalik Happy to play ginny pig as often and fast as you need to, but If access to a machine with configurtion enabled is the issue I can setup an RDP connection to one of our idling machines that. Koding is exactly what we need to be using as a team but this keeps blocking us.
Notes:
Question:
Is there a debug mode of the kd installer that I could run as right now there is zero output until the error and it would be great to know which stages of this step run through without issues.
rjeczalik commentedon May 19, 2018
@ntziolis All the logs are under
/var/logs/kd.logand/var/log/klient.log. There's akd configcommand to help you with configuration,kd config set debug <value>should do what you want.