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

Wicked 1.0.0 portal-auth docker container can't resolve Portal and API hosts #150

Closed
armezit opened this issue Dec 24, 2018 · 1 comment
Closed

Comments

@armezit
Copy link
Collaborator

armezit commented Dec 24, 2018

Host: Debian buster x64 (kernel: 4.18.0-3-amd64)
Docker: docker-ce version 18.09.0, build 4d60db4
Docker Compose: 1.22.0, build f46880fe

When deploying wicked 1.0.0 to a docker host locally (local machine without actual DNS entries), I faced with an error in all portal pages, which says:

{"error_description":"The access token is invalid or has expired","error":"invalid_token"}

and the screenshot:

screenshot from 2018-12-24 15-56-13

I looked at logs of the portal-auth container, and found these errors:

{"date":"2018-12-24T12:26:03.518Z","module":"portal-auth:generic-router","message":{"issueAsJson":false,"status":500,"oauthError":"server_error","internalError":{"errno":"ENOTFOUND","code":"ENOTFOUND","syscall":"getaddrinfo","hostname":"api.portal.local","host":"api.portal.local","port":443}},"delta":587,"level":"error"}
{"date":"24/Dec/2018:12:26:03 +0000","method":"POST","url":"/auth/local/api/portal-api/token","remote-addr":"172.31.0.8","version":"1.1","status":"500","content-length":"92","referrer":"-","response-time":"124.893","correlation-id":"ef90fbd6-c934-43fa-97fa-99cd30f3cfbb"}

It seems that portal-auth DNS doesn't know anything about portal.local and api.portal.local. So I added these extra_hosts into the docker-compose.yml file under portal-auth service:

portal-auth:
    extra_hosts:
        - "portal.local:LOCAL_HOST_IP"
        - "api.portal.local:LOCAL_HOST_IP"

Rebuilt wicked docker containers and everything is fine!

I used the docker-compose.yml which was generated by kickstarter, without any modification.

I don't know if this error occurs when deploying to a docker host with real dns or not.
Anyway, maybe it's better to add a comment about this in the deploying docs. or even a little change in kickstarter's generated docker-compose.yml file.

@DonMartin76
Copy link
Member

This is a duplicate of #149. Closing so that we can track in one place. Thanks for reporting!

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

No branches or pull requests

2 participants