Timeout error when running local CHT instance from docker helper script

Hey,

I’ve been trying to run a local instance of CHT using the 4.x Docker Helper script but it keeps failing each time. Inspection of the logs reveals a timeout when the cht-api and couchdb images are being pulled. Below is the error log:

2023-10-09 11:15:57 Pulling api (public.ecr.aws/medic/cht-api:4.4.0)...
2023-10-09 11:15:57 
2023-10-09 11:16:08 Get "https://public.ecr.aws/v2/": net/http: TLS handshake timeout
2023-10-09 11:16:08 
2023-10-09 11:16:08 Error while starting containers Error: Creating volume "cht_4x_app_cht-ssl" with default driver
2023-10-09 11:16:08 Creating volume "cht_4x_app_cht-credentials" with default driver
2023-10-09 11:16:08 Pulling haproxy (public.ecr.aws/medic/cht-haproxy:4.4.0)...
2023-10-09 11:16:08 Pulling api (public.ecr.aws/medic/cht-api:4.4.0)...
2023-10-09 11:16:08 Get "https://public.ecr.aws/v2/": net/http: TLS handshake timeout
2023-10-09 11:16:08 
2023-10-09 11:16:08     at ChildProcess.<anonymous> (/app/src/docker-compose-cli.js:32:25)
2023-10-09 11:16:08     at ChildProcess.emit (node:events:513:28)
2023-10-09 11:16:08     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)

I’m running on Apple Silicon.

Thanks for letting us know you’re having issues @alexkombo!

Another teammate suggested this error could be an intermittent network problem when downloading the docker image from Amazon’s Elastic Container Registry (ECR). ECR is where Medic uploads all the docker images for the CHT Core community to download from.

The suggested work around is to pull the specific image you’re having trouble with, or pull all of them. It’s safe to re-run because if you’ve already downloaded it, it will just skip the download. For the specific image you’re stuck on for setting up 4.4.0, you can run docker pull public.ecr.aws/medic/cht-api:4.4.0. If you want to download all of them, here’s the commands you can run:

docker pull public.ecr.aws/medic/cht-nginx:4.4.0
docker pull public.ecr.aws/medic/cht-haproxy-healthcheck:4.4.0
docker pull public.ecr.aws/medic/cht-haproxy:4.4.0
docker pull public.ecr.aws/medic/cht-couchdb:4.4.0
docker pull public.ecr.aws/medic/cht-sentinel:4.4.0
docker pull public.ecr.aws/medic/cht-api:4.4.0
docker pull public.ecr.aws/s5s3h4s7/cht-upgrade-service:latest

Note - it might take a few tries. Here’s what the other teammate saw when trying:

~> docker pull public.ecr.aws/medic/cht-api:4.4.0
Error response from daemon: Get "https://public.ecr.aws/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

~> docker pull public.ecr.aws/medic/cht-api:4.4.0
4.4.0: Pulling from medic/cht-api
3695f6c099b8: Pull complete
1383c0eeddba: Pull complete
4149a9b9427c: Pull complete
a19352e51c79: Pull complete
763e0eabcf1d: Pull complete
b497c23a3290: Pull complete
3e77236a0a07: Pull complete
Digest: sha256:2a9f0ee04ab353e7d43bfb502f2bd088509f42a0e425196df4ba7acd7bc6d518
Status: Downloaded newer image for public.ecr.aws/medic/cht-api:4.4.0
public.ecr.aws/medic/cht-api:4.4.0

Let us know if you are still stuck!

1 Like