kanton-bern / hellodata-be

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

dependency failed to start: container hellodata-keycloak-1 is unhealthy #21

Closed gangerang closed 7 months ago

gangerang commented 7 months ago

Tried to run via docker desktop on two sepereate windows 10 devices with WSL2. Each time receive "dependency failed to start: container hellodata-keycloak-1 is unhealthy" error. Have tired multiple removals and re-installs with same result.

SiddiqueAhmad commented 7 months ago

This sql file is not valid for container start-up

https://github.com/kanton-bern/hellodata-be/blob/main/hello-data-deployment%2Fdocker-compose%2Fbase%2Fpostgres%2Finit-scripts%2F3_default_data_domain_dwh_udm_data.sql

gangerang commented 7 months ago

Ah yes, I see what you mean. Looks like a previous commit modified that file and also 2_default_data_domain_dwh_udm_tables.sql Have you managed to get it working?

SiddiqueAhmad commented 7 months ago

I was able to run in pieces but it was restarting for some reason

nschmid commented 7 months ago

"container hellodata-keycloak-1 is unhealthy" error sounds like the keycloak container can't start. I experienced that sometimes when the setup was missing something.

Did you setup your windows box accordingly? https://github.com/kanton-bern/hellodata-be/blob/main/hello-data-deployment/docker-compose/README.md#prepare-environment ?

Sometimes this happens when *.docker.internal is not setup correctly in your etc/hosts file.

sspaeti commented 7 months ago

One small addition @gangerang, did you download the latest Docker Desktop? We had two incidents on Mac and Windows, where downloading the latest Docker Desktop solved issues. And you must add the settings on Docker Desktop settings as nschmid mentioned:

And how much RAM/CPU did you dedicate to Docker Desktop?

PS: I also fixed @SiddiqueAhmad mentioned error. Strangely I fixed that already a week ago, but it wasn't reflected on main. Please pull again the latest from the main branch; it should be good now.

SiddiqueAhmad commented 7 months ago

Thanks pulled latest, also set the proper *.docker.internal

I have given 10GB ram, and 8 cores and on latest docker desktop on mac, but it keep restarting portal api, monitoring sbt, dbt docs and few others

image
gangerang commented 7 months ago

Finally got it working! I think possible a combination of a few things. Pulled most recent code. Manually edited /etc/hosts to add the 127.0.0.1 host.docker.internal line, the setting in Docker Desktop for WSL2 doesn't seem to add it correctly. Finally I had to stop an existing postgres server I was running locally on the default port 5432 as I think that was then causing Superset to fail.

sspaeti commented 7 months ago

That is invaluable feedback, thanks for the effort. I'll add these two points (turning off Postgres locally and checking the host file to be added correctly) to the readme on Monday.

sspaeti commented 7 months ago

I updated the docker-compose Readme to make sure others do not run into the same error. @gangerang let me know if that is clear and correct. I'm closing the issue until then.