egovernments / DIVOC

Open source digital platform for large scale vaccination and digital credentialing programs. Built for India scale, addresses future vaccination scenarios, digital credentialing, and beyond.
MIT License
161 stars 204 forks source link

[BUG] docker-compose local setup is broken #638

Open alok87 opened 3 years ago

alok87 commented 3 years ago

Describe the bug Docker compose up does not seem to work both in Ubuntu and MacOS.

$ docker-compose ps | grep -e unhealthy -e Exit
divoc_certificate_api_1          docker-entrypoint.sh npm start   Exit 1
divoc_notification-service_1     /app/notification-service  ...   Exit 2
divoc_vaccination_api_1          /app/divoc-server --scheme ...   Up (unhealthy)   0.0.0.0:8000->8000/tcp,:::8000->8000/tcp

Notification service errror

kernel config initializationtime="2021-06-01T08:02:45Z" level=info msg="Starting certificate processor"
Consumer error: Subscribed topic not available: notify: Broker: Unknown topic or partition

Certificate API

Kafka connected to: kafka:9092
Fetching keycloak token
Error: Request failed with status code 404

Vaccination API

kernel config initializationtime="2021-06-01T08:17:54Z" level=info msg="Public key url http://keycloak:8080/auth/realms/divoc"
time="2021-06-01T08:17:54Z" level=info msg="Got response {\"error\":\"Realm does not exist\"}"
time="2021-06-01T08:17:54Z" level=info msg="Using the public key -----BEGIN PUBLIC KEY-----\n\n-----END PUBLIC KEY-----\n"
time="2021-06-01T08:17:54Z" level=info msg="asn1: syntax error: sequence truncated"
time="2021-06-01T08:17:54Z" level=info msg="Connected to kafka on kafka:9092"
time="2021-06-01T08:17:54Z" level=info msg="Using db host=db port=5432 user=postgres password=postgres dbname=postgres sslmode=disable"
time="2021-06-01T08:17:54Z" level=info msg="Consumer error: Subscribed topic not available: certify_ack: Broker: Unknown topic or partition \n"
2021/06/01 08:17:54 Serving divoc at http://[::]:8000

To Reproduce

git clone https://github.com/egovernments/DIVOC
docker-compose up -d

Expected behavior Services not coming up, it keeps failing to talk to Kakfa and throws the above mentioned errors. Tried restarting it multiple times following this, does not help.

Desktop (please complete the following information):

tejash-jl commented 3 years ago

@alok87 Please follow the steps mentioned here, https://github.com/egovernments/DIVOC/blob/main/docs/developer-docs/index.md#divoc-walkthrough and you'll be able to bring up the application locally.

alok87 commented 3 years ago

Been following the complete setup and walkthrough from that doc.

The latest images in docker-compose are not updated and working. Things work not consistently with docker compose release. I will re try and post more details.

glyfnet commented 3 years ago

Has this issue been resolved? I am also unable to get local setup to work due to above issues with Kafka error: "Subscribed topic not available: certify_ack".

di1 commented 3 years ago

Has this issue been resolved? I am also unable to get local setup to work due to above issues with Kafka error: "Subscribed topic not available: certify_ack".

This error you can ignore, first time topic wont be there, it will get created after certifying the first certificate

samarthgr commented 3 years ago

Kafka connected to: kafka:9092 Fetching keycloak token Error: Request failed with status code 404

@alok87 Above error in Certificate API is because either keycloak is not setup with divoc realm or client_secret is not updated properly in docker-compose. Please follow https://github.com/egovernments/DIVOC/blob/main/docs/developer-docs/index.md#divoc-walkthrough to setup keycloak and restart certificate_api service should work.