magnificent-hospital-52323
03/02/2022, 10:10 AMextra_hosts: "host.docker.internal:host-gateway"
to the containers and adding the localhost=host.docker.internal alias in my /etc/hosts) but the redirect still fails saying "Connection Refused". Any idea what I might be doing wrong? Alternatively, is there a better way of achieving the same thing?
Here's what my frontend container looks like:
datahub-frontend-react:
container_name: datahub-frontend-react
depends_on:
- datahub-gms
environment:
- DATAHUB_GMS_HOST=datahub-gms
- DATAHUB_GMS_PORT=8080
- DATAHUB_SECRET=YouKnowNothing
- DATAHUB_APP_VERSION=1.0
- DATAHUB_PLAY_MEM_BUFFER_SIZE=10MB
- JAVA_OPTS=-Xms512m -Xmx512m -Dhttp.port=9002 -Dconfig.file=datahub-frontend/conf/application.conf
-Djava.security.auth.login.config=datahub-frontend/conf/jaas.conf -Dlogback.configurationFile=datahub-frontend/conf/logback.xml
-Dlogback.debug=false -Dpidfile.path=/dev/null
- KAFKA_BOOTSTRAP_SERVER=broker:29092
- DATAHUB_TRACKING_TOPIC=DataHubUsageEvent_v1
- ELASTIC_CLIENT_HOST=elasticsearch
- ELASTIC_CLIENT_PORT=9200
- AUTH_OIDC_ENABLED=true
- AUTH_OIDC_CLIENT_ID=some-client-id
- AUTH_OIDC_CLIENT_SECRET=some-client-secret
- AUTH_OIDC_DISCOVERY_URI=<http://localhost:8000/openid/.well-known/openid-configuration/>
- AUTH_OIDC_BASE_URL=<http://localhost:9002>
hostname: datahub
image: linkedin/datahub-frontend-react:${DATAHUB_VERSION:-head}
ports:
- 9002:9002
extra_hosts:
- "host.docker.internal:host-gateway"
And here's the error present in the docker logs:
datahub-frontend-react | 09:53:02 [application-akka.actor.default-dispatcher-22] ERROR application -
datahub-frontend-react |
datahub-frontend-react | ! @7mp05igbp - Internal server error, for (GET) [/authenticate?redirect_uri=%2F] ->
datahub-frontend-react |
datahub-frontend-react | play.api.UnexpectedException: Unexpected exception[TechnicalException: java.net.ConnectException: Connection refused (Connection refused)]
numerous-camera-74294
03/02/2022, 10:12 AMnumerous-camera-74294
03/02/2022, 10:12 AMnumerous-camera-74294
03/02/2022, 10:13 AMmagnificent-hospital-52323
03/02/2022, 10:20 AMnumerous-camera-74294
03/02/2022, 10:20 AMnumerous-camera-74294
03/02/2022, 10:20 AMnumerous-camera-74294
03/02/2022, 10:21 AMnumerous-camera-74294
03/02/2022, 10:21 AMnumerous-camera-74294
03/02/2022, 10:21 AM127.0.0.1 django-container-hostname
numerous-camera-74294
03/02/2022, 10:21 AMbetter-orange-49102
03/02/2022, 10:23 AMnumerous-camera-74294
03/02/2022, 10:25 AMmagnificent-hospital-52323
03/02/2022, 10:41 AMdjango:
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: dqt
container_name: dqt
hostname: dqt
platform: linux/x86_64
depends_on:
- postgres
volumes:
- .:/app:z
environment:
- DJANGO_READ_DOT_ENV_FILE=true
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports:
- 8000:8000
extra_hosts:
- "host.docker.internal:host-gateway"
command: /start
DataHub frontend container:
datahub-frontend-react:
container_name: datahub-frontend-react
depends_on:
- datahub-gms
environment:
- DATAHUB_GMS_HOST=datahub-gms
- DATAHUB_GMS_PORT=8080
- DATAHUB_SECRET=YouKnowNothing
- DATAHUB_APP_VERSION=1.0
- DATAHUB_PLAY_MEM_BUFFER_SIZE=10MB
- JAVA_OPTS=-Xms512m -Xmx512m -Dhttp.port=9002 -Dconfig.file=datahub-frontend/conf/application.conf
-Djava.security.auth.login.config=datahub-frontend/conf/jaas.conf -Dlogback.configurationFile=datahub-frontend/conf/logback.xml
-Dlogback.debug=false -Dpidfile.path=/dev/null
- KAFKA_BOOTSTRAP_SERVER=broker:29092
- DATAHUB_TRACKING_TOPIC=DataHubUsageEvent_v1
- ELASTIC_CLIENT_HOST=elasticsearch
- ELASTIC_CLIENT_PORT=9200
- AUTH_OIDC_ENABLED=true
- AUTH_OIDC_CLIENT_ID=778948
- AUTH_OIDC_CLIENT_SECRET=some-client-secret
- AUTH_OIDC_DISCOVERY_URI=<http://dqt:8000/openid/.well-known/openid-configuration/>
- AUTH_OIDC_BASE_URL=<http://localhost:9002>
hostname: datahub
image: linkedin/datahub-frontend-react:${DATAHUB_VERSION:-head}
ports:
- 9002:9002
extra_hosts:
- "host.docker.internal:host-gateway"
Host DNS:
172.21.0.8 dqt
172.21.0.12 datahub
OIDC redirect_uri in django:
<http://datahub:9002/callback/oidc/>
Is there something I'm missing? Sorry I'm new to this 😅nutritious-bird-77396
03/02/2022, 3:36 PMSAML Tracer
chrome plugin was very helpful in debugging the requests. Try if it gives you a better insight