sso
sso copied to clipboard
[Quickstart] 500 Internal Server Error
Describe the bug Getting 500 internal server error after authenticating with google on redirect in quickstart.
Screenshots
In sso proxy logs : {"error":"Post http://host.docker.internal/google/redeem: dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host","level":"error","msg":"error redeeming authorization code","remote_address":"172.18.0.1","service":"sso-proxy","time":"2020-03-11 11:10:10.627"} {"http_status":500,"level":"info","msg":"error page","page_message":"Internal Error","page_title":"Internal Error","remote_address":"172.18.0.1","service":"sso-proxy","time":"2020-03-11 11:10:10.627"}
I commented out this line : - PROVIDER_URL_INTERNAL=http://host.docker.internal in docker compose . then i got this error in sso proxy logs : {"error":"Post http://sso-auth.localtest.me/google/redeem: dial tcp 127.0.0.1:80: connect: connection refused","level":"error","msg":"error redeeming authorization code","remote_address":"172.18.0.1","service":"sso-proxy","time":"2020-03-11 12:16:29.725"}
I am experiencing the same error
@Jusshersmith Do you have an idea what this might be?
On the docker-compose file there is an environment variable called PROVIDER_URL_INTERNAL
that is pointing to host.docker.internal
this DNS name should "magically" point to docker host machine, but sadly that is not implemented in Docker Linux yet, it just works on Windows and Mac, you can follow the issue here: https://github.com/docker/for-linux/issues/264
As a workaround you can set it manually can do execute ifconfig
on your terminal, look for the docker0
interface ip address. And then replace host.docker.internal
for that ip address on docker-compose.yml
. Not the best of the solutions but it will make it work.
I encountered same problem.
In my case, adding extra_hosts
setting makes me happy.
$ ip r # on your host
default via 10.0.2.2 dev eth0 metric 1
...
then quickstart/docker-compose.yml:
expose:
- 4180
+ extra_hosts:
+ - host.docker.internal:10.0.2.2
Related: https://github.com/docker/toolbox/issues/823
This was my issue & the solution for this on k8s: https://github.com/buzzfeed/sso/issues/102