Hi @Arafat
Welcome to the CHT forum!
To better understand what’s going on with your instance, can you please share the logs of the CHT service containers?
To debug, I’d start by looking for errors in API logs, and go from there.
Thanks!
Hi @Arafat
Welcome to the CHT forum!
To better understand what’s going on with your instance, can you please share the logs of the CHT service containers?
To debug, I’d start by looking for errors in API logs, and go from there.
Thanks!
Hi @Arafat
It looks like API is trying to connect to haproxy, but can’t reach it. This can be either caused by haproxy directly, or by CouchDb failing to start. Can you please check haproxy logs to see if anything becomes obvious?
As a potential quick fix, you could try to restart the whole setup process. Here are some steps that you can follow: Error 502 when running local CHT instance - #13 by mrjones
Here are the haproxy logs
Let me try mrjones method and revert.
Just to mention as well,
After multiple attempts and failing to set up with the documentation,i started following a video on youtube by medic created 10 months ago, I pulled from the previous commits of cht-core repo .yml before the yml was removed. The local environment worked properly and the application but also faced a block, after creating a user and I try to login with the new user, the application would break showing a connection error and when checking console logs, something about openSSL certificates.
So with your advice, should I continue with this current setup or should I do a previous version and also share the errors I encountered then?
Same issue with mrjones solution
Hi @Arafat,
I am wondering if the issue you are facing can be related to other issue earlier since you mentioned you faced a block after creating a user. If you are using Google Chrome, could you please try Mozilla Firefox and check if the error persists?
Thank you @niraj
I tried Microsoft Edge, and the same problem happened with logging in as a new user. Let me try Mozilla and see.
In the meantime, I am also going to try this Unable to load the application with a CHW user - #2 by binod since it is related to the problem.
Thanks alot
Hi @Arafat ,
I noticed that you have marked the issue as solved. That’s great.
Could you please add few details on how you were able to resolve so that it is easier for someone who may be facing similar issue?
I faced a similar problem, the API,Nginx, and logs are similar to what @Esther_Moturi raised in this thread however, my couch db logs read differently as shown below
Hi @kembo
Could you please use this script cht-core/scripts/compress_and_archive_docker_logs.sh at master · medic/cht-core · GitHub and share the logs of your containers?
Hello @niraj
Sorry for the late response, I managed to solve that particular blocker by using ngrok in this guide https://github.com/medic/cht-core/blob/6d3a5eb60f5411c5a8c2f808ffee8a5301806c36/DEVELOPMENT.md from this a new user can login into the system
Then for the local setup, the tutorial on https://docs.communityhealthtoolkit.org/apps/tutorials/local-setup/ didn’t work for me, I failed to create the local environment, I had to build using the docker-compose file that was previously in the cht-core repo (in the previously committed branch) before it was removed. That way my local environment was set up.
@Arafat - I wanted to add a follow up on this:
nginx-local-ip
project instead of ngrok
, unless you explicitly need to share your instance with a remote user.cheers,
-adj
Hey @mrjones
Thank you for the response, but when I try to use nginx , I get the same previous error unlike ngrok
Gotcha - thanks for the update! Sorry that didn’t work out for you.
Hi @Arafat
It looks like your credentials stored in the browser cookie somehow expired. Could you try clearing browser cache and logging in again? Or trying a different browser?
Hi @diana
I have tried two other browsers, the application opens but after logging when I load a hospital it hangs and just keeps loading
Then also when I try to login with a new user I had created previously, it still hangs, stay on that page as shown below
Yet using ngrok, the app seems to work fine