kanton-bern / hellodata-be

The Open-Source Enterprise Data Platform in a single Portal
https://kanton-bern.github.io/hellodata-be
Other
217 stars 22 forks source link

Some containers fail to start when running docker-compose up -d (Keyclock and data-portal-api) #32

Closed thebigleboo closed 8 months ago

thebigleboo commented 9 months ago

First try yielded those results, with an error on Container hellodata-hello-data-portal-api-1 and no apparent logs in the container in question (probably indicating an error with the healthcheck):

 ✔ Container hellodata-nats-box-1                                         Started       0.0s  ✔ Container hellodata-filebrowser-1                                      Started       0.0s
 ✔ Container hellodata-nats-1                                             Started       0.0s  ✔ Container hellodata-smtp4dev-1                                         Started       0.0s
 ✔ Container hellodata-postgres-1                                         Healthy       0.0s  ✔ Container hellodata-redis-1                                            Healthy       0.0s
 ✔ Container hellodata-keycloak-1                                         Healthy       0.0s  ✔ Container hellodata-monitoring-sba-1                                   Started       0.0s
 ✔ Container hellodata-cloudbeaver-1                                      Started       0.0s  ✔ Container hellodata-hello-data-dbt-docs-1                              Started       0.0s
 ✔ Container hellodata-superset-init-default-data-domain-1                Exited        0.0s  ✔ Container hellodata-superset-init-extra-data-domain-1                  Exited        0.0s
 ✔ Container hellodata-airflow-init-1                                     Exited        0.0s  ✔ Container hellodata-hello-data-sidecar-cloudbeaver-1                   Started       0.0s
 ✔ Container hellodata-hello-data-cloudbeaver-gateway-1                   Started       0.0s  ✔ Container hellodata-hello-data-dbt-docs-sidecar-1                      Started       0.0s
 ✔ Container hellodata-superset-worker-default-data-domain-1              Started       0.0s  ✔ Container hellodata-superset-worker-beat-extra-data-domain-1           Started       0.0s
 ✔ Container hellodata-superset-app-default-data-domain-1                 Started       0.0s  ✔ Container hellodata-superset-app-extra-data-domain-1                   Started       0.0s
 ✔ Container hellodata-airflow-webserver-1                                Started       0.0s  ✔ Container hellodata-flower-1                                           Started       0.0s
 ✔ Container hellodata-airflow-triggerer-1                                Started       0.0s  ✔ Container hellodata-airflow-scheduler-1                                Started       0.0s
 ✔ Container hellodata-hello-data-airflow-sidecar-1                       Started       0.0s  ✔ Container hellodata-hello-data-superset-sidecar-default-data-domain-1  Started       0.0s
 ✔ Container hellodata-hello-data-superset-sidecar-extra-data-domain-1    Started       0.0s  ✔ Container hellodata-superset-worker-beat-default-data-domain-1         Started       0.0s
 ✔ Container hellodata-superset-worker-extra-data-domain-1                Started       0.0s  ✔ Container hellodata-airflow-worker-1                                   Started       0.0s
 ✘ Container hellodata-hello-data-portal-api-1                            Error         0.0s  ✔ Container hellodata-hello-data-portal-sidecar-1                        Started       0.0s

Second try yielded those results, with an error on Container hellodata-keycloak-1 which was healthy the first time:

 ✔ Container hellodata-nats-box-1                                         Running       0.0s
 ✔ Container hellodata-redis-1                                            Healthy       0.0s
 ✔ Container hellodata-postgres-1                                         Healthy       0.0s
 ✔ Container hellodata-filebrowser-1                                      Running       0.0s
 ✔ Container hellodata-nats-1                                             Running       0.0s
 ✔ Container hellodata-smtp4dev-1                                         Running       0.0s
 ✘ Container hellodata-keycloak-1                                         Error         0.0s
 ✔ Container hellodata-cloudbeaver-1                                      Running       0.0s
 ✔ Container hellodata-monitoring-sba-1                                   Running       0.0s
 ✔ Container hellodata-superset-init-default-data-domain-1                Created       0.0s
 ✔ Container hellodata-superset-init-extra-data-domain-1                  Created       0.0s
 ✔ Container hellodata-hello-data-sidecar-cloudbeaver-1                   Running       0.0s
 ✔ Container hellodata-airflow-init-1                                     Created       0.0s
 ✔ Container hellodata-hello-data-dbt-docs-1                              Running       0.0s
 ✔ Container hellodata-superset-worker-beat-default-data-domain-1         Running       0.0s
 ✔ Container hellodata-superset-worker-extra-data-domain-1                Running       0.0s
 ✔ Container hellodata-hello-data-cloudbeaver-gateway-1                   Running       0.0s
 ✔ Container hellodata-superset-app-default-data-domain-1                 Running       0.0s
 ✔ Container hellodata-superset-worker-default-data-domain-1              Running       0.0s
 ✔ Container hellodata-superset-worker-beat-extra-data-domain-1           Running       0.0s
 ✔ Container hellodata-hello-data-dbt-docs-sidecar-1                      Running       0.0s
 ✔ Container hellodata-superset-app-extra-data-domain-1                   Running       0.0s
 ✔ Container hellodata-airflow-webserver-1                                Running       0.0s
 ✔ Container hellodata-flower-1                                           Running       0.0s
 ✔ Container hellodata-hello-data-superset-sidecar-extra-data-domain-1    Running       0.0s
 ✔ Container hellodata-airflow-triggerer-1                                Running       0.0s
 ✔ Container hellodata-hello-data-superset-sidecar-default-data-domain-1  Running       0.0s
 ✔ Container hellodata-airflow-scheduler-1                                Running       0.0s
 ✔ Container hellodata-airflow-worker-1                                   Running       0.0s
 ✔ Container hellodata-hello-data-portal-api-1                            Running       0.0s
 ✔ Container hellodata-hello-data-portal-sidecar-1                        Created       0.0s
dependency failed to start: container hellodata-keycloak-1 is unhealthy

Any clues?

Running on MacOS Sonoma 14.1 with M3 Pro chip

thebigleboo commented 9 months ago

Any idea @sspaeti @nschmid ?

sspaeti commented 9 months ago

Hey @thebigleboo

I assume you have the latest Docker Desktop installed and set the 127.0.0.1 host.docker.internal is added to /etc/hosts? If that is the case, could you send us the logs for the errored containers?

E.g. :

docker logs hellodata-hello-data-portal-api-1
docker logs hellodata-keycloak-1

That would help to pinpoint the error. Thanks so much.

thebigleboo commented 9 months ago

Sure!

this is what the docker compose command gives:

 ✘ Container hellodata-hello-data-portal-api-1                                                                                                                                   Error                                                                                   453.8s
 ✔ Container hellodata-hello-data-portal-sidecar-1                                                                                                                               Started                                                                                 110.6s
 ⠇ Container hellodata-hello-data-portal-ui-1                                                                                                                                    Created                                                                                 453.7s
 ! hello-data-portal-ui The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                                                                                                     0.0s
dependency failed to start: dependency failed to start: container hellodata-hello-data-portal-api-1 is unhealthy

This is the output of docker logs hellodata-hello-data-portal-api-1:

2024-02-14 10:53:09 
2024-02-14 10:53:09 
2024-02-14 10:53:09   _    _      _ _       _____       _______            ____  ______
2024-02-14 10:53:09  | |  | |    | | |     |  __ \   /\|__   __|/\        |  _ \|  ____|
2024-02-14 10:53:09  | |__| | ___| | | ___ | |  | | /  \  | |  /  \ ______| |_) | |__
2024-02-14 10:53:09  |  __  |/ _ \ | |/ _ \| |  | |/ /\ \ | | / /\ \______|  _ <|  __|
2024-02-14 10:53:09  | |  | |  __/ | | (_) | |__| / ____ \| |/ ____ \     | |_) | |____
2024-02-14 10:53:09  |_|  |_|\___|_|_|\___/|_____/_/    \_\_/_/    \_\    |____/|______|
2024-02-14 10:53:09 
2024-02-14 10:53:09  
2024-02-14 10:53:09 :: HelloDATA-BE :: Startup profile(s) local-user-search,create-example-users ::
2024-02-14 10:53:09 :: https://github.com/kanton-bern/hellodata-be ::
2024-02-14 10:53:09 
2024-02-14 10:53:15 2024-02-14T08:53:15.486Z  INFO 1 --- [HelloDATA Portal] [           main] c.b.d.h.p.HellodataPortalApiApplication  : Starting HellodataPortalApiApplication using Java 17.0.9 with PID 1 (/app/app.jar started by app in /app)
2024-02-14 10:53:15 2024-02-14T08:53:15.759Z  INFO 1 --- [HelloDATA Portal] [           main] c.b.d.h.p.HellodataPortalApiApplication  : The following 2 profiles are active: "local-user-search", "create-example-users"

and then:

request returned Internal Server Error for API route and version http://%2FUsers%2Fjonas%2F.docker%2Frun%2Fdocker.sock/v1.24/containers/hellodata-hello-data-portal-api-1/json, check if the server supports the requested API version

docker logs hellodata-keycloak-1 seems irrelevant (does not happen when killing the containers first)

thebigleboo commented 9 months ago

Sorry to nudge @sspaeti but happy if you can take a quick look 🙏🙏🙏

bedag-bad commented 9 months ago

The error you mentioned seems to be a common problem in Docker Desktop. Have a look here https://github.com/docker/for-mac/issues/6956 Perhaps you will find something there that will help you out.

sspaeti commented 9 months ago

Thanks, Dario.

@thebigleboo I saw in Dario's link this one, might that solve the issue: https://github.com/docker/for-mac/issues/6956#issuecomment-1781478609? Did you activate this (also explained in the Readme https://github.com/kanton-bern/hellodata-be/blob/develop/hello-data-deployment/docker-compose/README.md#mac)

thebigleboo commented 9 months ago

Thanks, Dario.

@thebigleboo I saw in Dario's link this one, might that solve the issue: docker/for-mac#6956 (comment)? Did you activate this (also explained in the Readme https://github.com/kanton-bern/hellodata-be/blob/develop/hello-data-deployment/docker-compose/README.md#mac)

Yes, it is activated!

sspaeti commented 8 months ago

Please check other comments from https://github.com/docker/for-mac/issues/6956, as it seems not related to HelloDATA. I'll close the issue for now, but I'm happy to reopen when you have found another error we can help with.

sspaeti commented 8 months ago

PS: Please try to re-install docker Desktop, sometimes it is the culprit, as it was in this isse too: https://github.com/kanton-bern/hellodata-be/issues/25#issuecomment-1956886013.

thebigleboo commented 8 months ago

tried those - does not seem to be the cause :(

sspaeti commented 8 months ago

Closing due to reason most possibly with Docker Desktop and not HelloDATA. Thank you and let us know if you found any other issues.