Failed to get response from https:///medic:***

Dear all,

when running
sudo cht --url=https://medic:password@localhost --accept-self-signed-certs
on the command line, we get an error message
Failed to get a response from https://medic:....

We have checked that both docker containers are running. What could be the issue?

Many thanks in advance.

Hey @raf !

How did you start your container - using the Local Environment docs where you ran docker-compose up and used the default ports (80 and 443) or did you follow the Docker Compose Helper steps where you used arbitrary ports (possibly 8443)?

Dear @mrjones,
Thank you for your reply. We sticked to the Local Environment Setup. So the ports should be the same.

@raf ,

Reviewing our instructions, I see we don’t instruct you to use the --detach flag, so first check if your containers are running with docker ps --format '{{.Names}}'. This should show you two containers medic-os and haproxy:

docker ps --format '{{.Names}}'                 
medic-os
haproxy

If don’t see those, then just run the docker compose up call where you downloaded your docker-compose.yml file where you downloaded it in step 1.

If you do see those containers, then I recommend restarting them. Run the docker-compose restart command in the same directory as your docker-compose.yml file. It should look like this:

docker-compose restart
Restarting medic-os ... done
Restarting haproxy  ... done

Dear @mrjones,
Thank you, the containers are running and we have access.

Btw. we ran into some issues with the docker-compose file. The start of haproxy and medic-os was not synchronised, haproxy was faster if I remember well and then crashed because medic-os was not up. We fixed that with a ‘wait until’ option.

@raf - great to hear that you both got your containers working and also have some good work arounds for when they fail.

There were some feedback earlier about the race conditions between the two containers, so we developed the CHT Docker Helper script. Check it out!

Cheers,
-adj

1 Like

Thank you very much, this will be very useful in the future!