Trouble with adding app forms

@ewafula at what point in the process do you see this error? It might be helpful if you could just post the whole terminal output from running the setup commands! Also, what kind of operating system are you using to run this command? (Windows, Linux. MacOS, etc)

Hi @jkuester, I’m using Ubuntu 22.04. This a fresh install but this is what I see when try connecting to localhost

Looking at the console logs there it appears that the cht-upgrade-service container is able to successfully start. That container should handle the creation of the additional containers needed to run the CHT. (Including the cht-nginx container which is what should listen on ports 80/443 on your localhost.) We should see additional logs from the cht-upgrade-service container as it spins everything up, but I don’t see those in your screenshot… What do you see if you run sudo docker ps -a? I am trying to understand if the other containers were created but are not running or if for some reason they were never created…

For the record, I just tested everything locally again on a Linux instance and I did see that .IsADirectoryError: [Errno 21] Is a directory: '/docker-compose/couch' error the first time everything spun up, but the server was still able to start successfully.

@ewafula

Could you please share the folder structure where you’ve placed your docker-compose files?
The upgrader and CHT docker compose files should be stored separately (in different folders). I’ve submitted an issue to fix the documentation: 4.0 local setup instructs to store upgrader and cht compose files in the same folder · Issue #873 · medic/cht-docs · GitHub

Can you try storing them like:

- folder1
  - upgrader.yml
- folder2
  - cht-core.yml
  - cht-couchdb.yml

Thanks

Hi @diana ,
I’ve looked at my directory structure and it looks exactly like what you have shared. folder 2 is called data in my case with the two files cht-4-core.yml and cht-4-couch are defined.
Is there a way to tail the logs to see what is happening and what might be causing the error?
Thank you.
Erick

@ewafula - We have some docker commands for you to try! First, after starting the upgrade service, in another terminal you should confirm all the containers are running with docker ps --format '{{.Names}}'. For me, this looks like this:

upgrade docker ps --format '{{.Names}}'     
 
cht_nginx_1
cht_sentinel_1
cht_api_1
cht_couchdb_1
cht_haproxy_1
cht_healthcheck_1
upgrade_cht-upgrade-service_1

If you see all 7 containers running, you can see the logs of different container by calling docker logs CONTAINER_NAME. For example, if you want to see the last 2 lines of logs from the sentinel container, you can pipe it to tail like this docker logs cht_sentinel_1 2>&1 | tail -n 2. For me this shows:

docker logs cht_sentinel_1 2>&1 | tail -n 2

CouchDb Cluster ready
2022-11-28 21:01:29 INFO: Waiting for API to be ready... 

To actively see the logs as they happen, what you might think of as a tail -f FILENAME, you actually use docker logs --follow which looks like this:

docker logs --follow cht_sentinel_1

I won’t show the full output of that command, as it’s quite lengthy.

It might be handy to just try stopping all containers and restarting them. Assuming you’ve followed the local setup guide and your project is named cht, then you would hit ctrl + c twice to stop the upgrade service and then kill just the containers for the cht project with docker kill $(docker ps --all --filter "name=cht" --quiet). Finally, restart everything with the original docker-compose up command. For me, this look like this:

[SNIP]
cht-upgrade-service_1  | 
^CGracefully stopping... (press Ctrl+C again to force)
Stopping upgrade_cht-upgrade-service_1 ... 
Killing upgrade_cht-upgrade-service_1  ... done
ERROR: 2

docker kill $(docker ps --all --filter "name=cht" --quiet)
27c2abde1d4d
815f70f0d960
08797749ad12
10bf5a062e22
3af3bdfe35da
6f6842320fa6

docker-compose -f ~/cht-local-setup/cht-upgrader.yml --env-file  ~/cht-local-setup/env up

Starting upgrade_cht-upgrade-service_1 ... done
Attaching to upgrade_cht-upgrade-service_1
cht-upgrade-service_1  | Listening on port 5008
[SNIP]