-
Notifications
You must be signed in to change notification settings - Fork 599
Issue with klient key using "connect your own machine" and docker container #11280
Comments
Hey @serut!
Kite uses JWT token for authentication - it is called a kite.key in the kite framework - the klient and kontrol is built on kite framework. During registration kontrol generates a kite.key for klient, and klient stores it in ~$USER/.config/koding/konfig.bolt local database (the $USER is a user owning the klient process, here it'd be root). You can inspect the contents of it with boltcli command. The error you received basically means the kontrolKey claim of klient's kite.key does not match kontrol's public key. This can be caused by either kontrol misconfiguration or klient misreading the kite.key from local configuration. You could confirm that by reading kiteKey from local database with:
And parsing the JWT with kitekey command:
If the .kontrolKey mismatches the kontrol.pub, which kontrol service was configured with, klient will fail with the I also have a sad news - even if you figured out why the key is wrong, you won't be able to connect your container to koding until #8920 is fixed - klient needs to be publicly accessible by kontrol and uses tunnel service for that. This service does not start as a part of oss deployment, yet. |
Thanks for these informations ! I managed to get the same certificate on both side... ! On the Koding server :
On the VM side:
|
I've followed the guide Connect your own machine to setup a container acting like a remote machine.
But it just fails on the
klient
side when the service boots it tries to establish the connection with koding and has problem to found akey
(which key ??). See stacktrace belowOn the backend side,
kontrol
doesn't print any errorExpected Behavior
To connect a docker container to Koding and not a VM / dedicated server.
Current Behavior
I've created a container which installs and runs
klient
.The installation looks good :
When the
klient
tries to connect with the koding instance, it doesn't authorize the connection :Steps to Reproduce
start.sh
scriptDockerfile
.env.vmklient
. You can get your credientials by visiting/Home/stacks/virtual-machines
in your koding webinterface . Just extract values from that textexport KONTROLURL=http://<server ip:port>/kontrol/kite [..] | bash -s <key>
docker build -t vm .
docker run -it --env-file .env.vmklient vm
Error encountered
Your
KODING_KEY
inside.env.vmklient
has expired, you need to recreate another one on the web interface (Dashboard > Virtual machines > Add your own machine)What do you think about this ? Thanks for reading.
The text was updated successfully, but these errors were encountered: