Skip to content
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.

KD install with 502 response #11490

Open
ahshum opened this issue Mar 26, 2018 · 5 comments
Open

KD install with 502 response #11490

ahshum opened this issue Mar 26, 2018 · 5 comments

Comments

@ahshum
Copy link

ahshum commented Mar 26, 2018

Expected Behavior

Follow the guide at KD docs, and should be able to use vagrant provider.

Current Behavior

At the end of the kd installation, I got
Error: error installing "Koding account": Starting new session failed. Want: 200 Got: 502
with
export KONTROLURL=http://xxxx.com/kontrol/kite; curl -sL https://sandbox.kodi.ng/c/d/kd | bash -s 4bbe0593

the same happens even with the port 8090 appended to the KONTROLURL
export KONTROLURL=http://xxx.com:8090/kontrol/kite; curl -sL https://sandbox.kodi.ng/c/d/kd | bash -s 4bbe0593

Steps to Reproduce (for bugs)

  1. follow the guide using Docker-compose
  2. login at http://xxx.com:8090/
  3. get the kd command from dashboard
  4. run it on another machine

Your Environment

  • Version used: latest (from docker)
@rjeczalik
Copy link
Member

This error Starting new session failed. Want: 200 Got: 502 usually means that public kite endpoint is not reachable. Kd must be able to reach $KONTROLURL, e.g.:

$ export KONTROLURL=https://koding.com/kontrol/kite
$ curl -sL $KONTROLURL
Welcome to SockJS!

@ahshum
Copy link
Author

ahshum commented Mar 26, 2018

I have tried curl -sL $KONTROLURL on the kd installing machine and return with Welcome to SockJS!.

Do the kite endpoint on my machine need to be accessible from the public world?

@rjeczalik
Copy link
Member

Do the kite endpoint on my machine need to be accessible from the public world?

Yes. Usually you run koding backend in the cloud and use kd locally for development. Kd needs to talk to the koding backend. Even if you run everything on one host, public endpoint is needed for the cloud instances - each such instance is connected to koding via the agent talking to the public address of the backend.

I have tried curl -sL $KONTROLURL on the kd installing machine and return with Welcome to SockJS!.

Could you try again, this time export KD_DEBUG=1 and see if there's anything usefull in kd.log / klient.log files - you should be able to find them in /var/log.

@ahshum
Copy link
Author

ahshum commented Mar 26, 2018

The log mentions the 502 with one line only.

The backend is public with port 8090. Should I give a try using port 80 for the backend service?

@rjeczalik
Copy link
Member

502 comes from kd trying to connect to $KONTROLURL. If the endpoint is reachable with curl, but not with kd, then something is wrong and understanding the problem would require more information.

I could try to debug the problem myself when I find spare time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants