Troubleshooting a private, customized KoBoToolbox installation

What Enketo image do you have? (from the output of docker ps). Mine shows

CONTAINER ID   IMAGE                                            COMMAND                  CREATED      STATUS      PORTS                  NAMES
15ed07dfbb75   kobotoolbox/enketo-express-extra-widgets:2.5.6   "docker-entrypoint.s…"   3 days ago   Up 3 days   8005/tcp               kobofe_enketo_express_1

Also, do your customizations include modifying Enketo?

1 Like

This is my image: kobotoolbox/enketo-express-extra-widgets:2.3.5
Yes there are modifications, but only cosmetic.

How do you apply the modifications?

Git pull from within the container.

(The method you suggested last time to modify the YML files and add the build folder from localhost wasn’t working because the containers kept restarting due to a permission error in the start.sh file.)

Okay. Do you remember if your modifications were working with Enketo 2.3.5 previously? I’m wondering if your image got upgraded automatically (by kobo-install or pulling kobo-docker).

1 Like

Everything was working normally, all I did was to shut down the VM, increase the disk size, and restart the VM.

There may have been some issue in the code previously that wasn’t translating to the website, but I’m thinking the act of restarting the VM caused it to show up somehow.

Ideas:

  • Go into the kobo-docker directory and run git reflog --date=iso. Look for changes that coincide with you rebooting the VM.
  • Try running vanilla Enketo 2.3.5 without any modifications. Do you still get the JavaScript error?
  • (Unlikely to work given your time crunch) Try updating to 2.5.6 and applying your modifications on top of that.
1 Like

Thanks for the suggestions.

I would like to try running the latest vanilla version without any modifications for tomorrow’s work… How do I build the latest version of only the enketo container without touching the others?

Change your docker-compose.frontend.yml file so that line starting with image: kobotoolbox/enketo-express-extra-widgets ends in 2.5.6. Here’s a snippet from the latest version of kobo-docker:

  enketo_express:
    image: kobotoolbox/enketo-express-extra-widgets:2.5.6
    env_file:
      - ../kobo-env/envfile.txt

Once you’ve done that, use Docker Compose to pull the new enketo-express-extra-widgets image. I use kobo-install/run.py for this, i.e. ./run.py -cf pull enketo_express, but you may have a custom docker-compose command.

Once the image has been pulled, use Docker Compose to recreate the enketo_express container. Again, I use kobo-install, but you may be invoking docker-compose directly. I would do ./run.py -cf up -d enketo_express. Sometimes it’s necessary to restart NGINX afterwards, i.e. ./run.py -cf restart nginx.

1 Like

@jnm. Thanks to you, I got Enketo up and running, finally.
But I guess I made some mistake with the docker-compose, because kc.domain now gives me this:

Will this get resolved if I update the kobocat container?

1 Like

Did you restart NGINX? (If not, make sure to try that first. That error is there to avoid accidentally serving the KPI content to the KoBoCAT domain and vice versa. That can happen when container IPs change but NGINX has not reloaded.)

1 Like

I’m so sorry for all this bother, but I seem to be out of one problem and into another… :frowning_face:

I tried restarting nginx, that didn’t work. Then I tried rebuilding kobocat from the public image (2.021.09) then restarting nginx. That didn’t work either.

Next, I rebuilt it using public image v 2.020.28 (which was commented out in my YML file). Now I get this when I go to kc.domain

but in enketo forms I get this:

OK, let’s continue. I don’t think you’ll be able to go back KoBoCAT 2.020.28 because there have been changes to the database schema since then. Switch again to 2.021.09. Can you get back at least to the “System configuration error” (port 8000 vs. 8001) message? We can work with that.

1 Like

Yes I’m back to that error now. And Enketo also shows the “Request failed” error.

Edit: Do you think I should update the docker-compose folder too?

Right. Enketo won’t be able to load forms if KoBoCAT isn’t working. One moment please…

I’m guessing that you don’t have this change in your kobo-docker:

I’d be afraid to attempt an upgrade right now, but in kobo-docker/nginx/docker-entrypoint.d/30-init-kobo-nginx.sh, you could try manually changing container_ports=( ['kpi']='8000' ['kobocat']='8000' ) to container_ports=( ['kpi']='8000' ['kobocat']='8001' ).

Edit: after doing that, you’ll need to recreate your NGINX container, e.g. with ./run.py -cf up -d --force-recreate nginx

If that doesn’t work, send me the commit of kobo-docker that you have. You can get this by going into the kobo-docker directory and running git show.

1 Like

OMG it worked. :boom:

I have no words to express my gratitude for you @jnm. Thank you so much for taking the time to resolve my complex issues. Wish there was some way to return the favor!

2 Likes

Great! Hopefully this public troubleshooting can help someone else in the future :smiley:
Best of luck with your data collection :+1:

2 Likes

Hi, I am facing the same issue and after checking the file the container ports are the same as yours but still, error has persisted. I have tried the restart but still not working.

1 Like