Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

502 Bad Gateway #180

Closed
rimusz opened this issue May 6, 2016 · 21 comments
Closed

502 Bad Gateway #180

rimusz opened this issue May 6, 2016 · 21 comments
Labels

Comments

@rimusz
Copy link
Contributor

rimusz commented May 6, 2016

I'm getting the bad gateway for Deis apps when using DNS configured access to the platform :

2016/05/06 15:05:14 [error] 25#0: *1706 connect() failed (111: Connection refused) while connecting to upstream, client: 10.244.0.1, server: ~^helloworld\.(?<domain>.+)$, request: "GET /favicon.ico HTTP/1.1", upstream: "http://10.247.249.241:80/favicon.ico", host: "helloworld.linxos.net", referrer: "http://helloworld.linxos.net/"
[06/May/2016:15:05:14 +0000] - 10.244.0.1 - - - 502 - "GET /favicon.ico HTTP/1.1" - 328 - "http://helloworld.linxos.net/" - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17" - "~^helloworld\x5C.(?<domain>.+)$" - 10.247.249.241:80 - helloworld.linxos.net - 0.000 - 0.000
2016/05/06 15:05:16 [error] 25#0: *1704 connect() failed (111: Connection refused) while connecting to upstream, client: 10.240.0.6, server: ~^helloworld\.(?<domain>.+)$, request: "GET / HTTP/1.1", upstream: "http://10.247.249.241:80/", host: "helloworld.linxos.net"
@rimusz rimusz added the bug label May 6, 2016
@krancour
Copy link
Contributor

krancour commented May 6, 2016

@rimusz that looks like it was caused by the upstream refusing the connection. What happens if you ssh out to some node in the cluster and curl http://10.244.0.1?

@rimusz
Copy link
Contributor Author

rimusz commented May 6, 2016

I have the same issue on two GKE clusters

@jchauncey
Copy link
Member

Same

@krancour
Copy link
Contributor

krancour commented May 6, 2016

Have either of you tried accessing the upstream service directly?

@rimusz
Copy link
Contributor Author

rimusz commented May 6, 2016

when the deis-builder.... came in? it was not the case last Saturday for beta3, all demos worked just fine.

@bacongobbler
Copy link
Member

The builder domain change does not affect how applications are routed. What @krancour is trying to explain is to manually bypass the router by checking the pod IP address and see if the application itself is routing properly. That would eliminate whether or not the router is the issue here.

@rimusz
Copy link
Contributor Author

rimusz commented May 6, 2016

already cleaned up my clusters, will do from the scratch and see what happens

@jchauncey
Copy link
Member

Im seeing this issue on apps not deployed through deis but are configured to be routable (grafana for instance)

@krancour
Copy link
Contributor

krancour commented May 6, 2016

What @krancour is trying to explain is to manually bypass the router by checking the pod IP address

Or the service IP address. Check both.

@rimusz
Copy link
Contributor Author

rimusz commented May 6, 2016

on a fresh kube/deis cluster still the same issue, but curl by pod IP works fine from the node:

$ curl 10.244.2.8
Welcome to Deis!
See the documentation at http://docs.deis.io/ for more information.

@krancour
Copy link
Contributor

krancour commented May 6, 2016

@rimusz this is on GKE, right? Can you please document exact steps to reproduce?

@rimusz
Copy link
Contributor Author

rimusz commented May 6, 2016

yup, GKE, usual GKE cluster and workflow install steps

@krancour
Copy link
Contributor

krancour commented May 6, 2016

What is needed beyond that? Are you using the workflow-dev chart? Is this happening only specific test apps?

@rimusz
Copy link
Contributor Author

rimusz commented May 6, 2016

beta 3, latest deis cli, our example apps (example-dockerfile-http, helloworld) Dockefile/docker image get that issue, but the build pack one example-go works fine

@krancour
Copy link
Contributor

krancour commented May 6, 2016

Have you tried with the workflow-dev chart?

@rimusz
Copy link
Contributor Author

rimusz commented May 6, 2016

not yet

@rimusz
Copy link
Contributor Author

rimusz commented May 6, 2016

tried dev chart, controller is crashing there:

$ kd logs deis-controller-26oou
system information:
Django Version: 1.9.5
Python 3.5.1
Django checks:
System check identified no issues (2 silenced).
Health Checks:
Checking if database is alive
There was a problem connecting to the database

deleting the pod did not help

@helgi
Copy link
Contributor

helgi commented May 6, 2016

Have you look at if your DB is broken?

@krancour
Copy link
Contributor

I am not able to reproduce this. I've used GKE with the workflow-dev chart, and loaded up the cluster with:

  • 10 apps deployed via git push of Dockerfile
  • 10 apps deployed via deis pull
  • 5 apps built with a buildpack

All 25 apps and Grafana were accessible every time I tried:

for i in $(deis apps | grep "^\w");do curl http://$i.krancour.deis.ninja; done

@jchauncey says he hasn't run into this in about a week now.

@rimusz are you still able to reproduce? If so, I'd want to know how my attempt to reproduce differs from what you are doing.

@rimusz
Copy link
Contributor Author

rimusz commented May 11, 2016

@krancour I was able to reproduce it in Berlin yesterday on the last week created cluster from beta3 chart. Bootstrapped a new GKE cluster today and used dev chart and cannot reproduce the problem anymore.
It looks like it was the GKE problem.
I think we can close this one for now.

@rimusz rimusz closed this as completed May 11, 2016
@krancour
Copy link
Contributor

@rimusz i haven't tried using beta3. It's possible also that if there was a bug, it may have been isolated to that release and fixed (inadvertently) in the meantime. Thanks for following up.

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

No branches or pull requests

5 participants