I cannot view a form in Enketo and Share a form installed on own server

I cannot view a form in Enketo and Share a form. Trying to open the form to view the form tabs it keeps loading endless until it times out. Anyone who’s faced the same challenge and would like to help?

Hi @alexgmuriithi
Could you please confirm if this affects all your forms or just a particular one? Kindly also confirm if this process had worked previously and when you started encountering the problem. I believe this context will help us best understand how to support.


1 Like


I’m setting up with the latest kobo-install


After setting up and logging in all other functionalities are working but access to form is the problem even after trying to build the form from the form builder the same problem persist.

Hi @alexgmuriithi
I think this is similar to the same thread that I had seen you commenting on around the installation process using this server version. Could you please check and incorporate this within the same thread? As a standalone, I feel there is a lot of context lost.


1 Like

Tried this solution but seems like an old fix compared to the latest version that comes with this fix

@alexgmuriithi I will keep this open to allow for other users to chime in.

1 Like

@alexgmuriithi let me try to help you with my limited knowledge…
Have you done the complete installation from kobo-install? Can you run docker ps and post a screenshot here of the containers that are running along with the image names?

1 Like

Well, it looks like you’re running the correct versions. In my case it was incorrect versions which was causing the issue.

Do you have this problem with all the forms or just one form?

Basically any form I create I cannot access them using Enketo also previewing the designed form.

Tue Mar 30 08:16:26 2021] GET /alexmacharia/forms/aCezMmXN4rBvKWrpEbmhzi/preview => generated 0 bytes in 11 msecs (HTTP/1.1 302) 5 headers in 271 bytes (1 switches on core 0)
Respawned uWSGI worker 2 (new pid: 198)
Tue Mar 30 08:20:21 2021 - *** HARAKIRI ON WORKER 1 (pid: 194, try: 1) ***
Tue Mar 30 08:20:21 2021 - HARAKIRI !!! worker 1 status !!!
Tue Mar 30 08:20:21 2021 - HARAKIRI [core 0] - GET /alexmacharia/forms/aCezMmXN4rBvKWrpEbmhzi/enter-data since 1617092300
Tue Mar 30 08:20:21 2021 - HARAKIRI !!! end of worker 1 status !!!
DAMN ! worker 1 (pid: 194) died, killed by signal 9 :( trying respawn ...
Respawned uWSGI worker 1 (new pid: 199)
worker 2 killed successfully (pid: 198)
uWSGI worker 2 cheaped.

What might be causing this issue? I think it’s related to what I’m facing. Just follow the solution from Got 502 Bad Gateway KPI Kobocat - #2 by nolive

“Harakiri” is logged by uWSGI when it terminates a Python worker process because of failure to respond to a HTTP request (in your case, GET /alexmacharia/forms/aCezMmXN4rBvKWrpEbmhzi/enter-data) within 120 seconds. This is the default time limit, but it can be configured in kobo-install. If you want to increase the timeout, re-run ./run.py --setup and answer yes to “Do you want to tweak uWSGI settings?”. Then, input a larger number when prompted for “Maximum time (in seconds) before killing an unresponsive worker”.

However, it’s very unusual for a form to take longer than two minutes to process. Is this form particularly large or complex, or is your server low on CPU or RAM capacity?

Additionally, is there a reason why you’re using the KoBoCAT enter-data endpoint, or was that just for testing? We’re planning to remove that endpoint very soon. You can distribute your project’s Enketo URL directly, since each deployed project has a unique and consistent Enketo URL. If you need to programmatically retrieve Enketo URLs, you can get the same URL returned by KoBoCAT’s enter-data from KPI’s asset detail endpoint, in the deployment_links.offline_url attribute. In your example, the asset detail endpoint would be https://[your kpi host]/api/v2/assets/aCezMmXN4rBvKWrpEbmhzi/.

1 Like

I cannot view or preview my form. Can somebody help please

Was it a recent kobo-install or it used to work before? My latest Kobo-install also has the same problem waiting to find a solution from the Kobotoolbox community

I'm still not getting a breakthrough through the issue mention in the topic. I have run test using tox and it passed the rest and failed in one. This might be the problem any ideas on how to solve it.

admin_datacollect@data-collect:~/kobo-install$ tox -e py36
py36 create: /home/admin_datacollect/kobo-install/.tox/py36
py36 installdeps: -rrequirements_py3_tests.txt
py36 installed: atomicwrites==1.2.1,attrs==18.2.0,more-itertools==4.3.0,pathlib2==2.3.2,pkg-resources==0.0.0,pluggy==0.8.0,py==1.7.0,pytest==3.9.2,six==1.11.0
py36 runtests: PYTHONHASHSEED='4153011534'
py36 runtests: commands[0] | pytest -vv
================================================================ test session starts =================================================================
platform linux -- Python 3.6.9, pytest-3.9.2, py-1.7.0, pluggy-0.8.0 -- /home/admin_datacollect/kobo-install/.tox/py36/bin/python3.6
cachedir: .pytest_cache
rootdir: /home/admin_datacollect/kobo-install, inifile:
collected 24 items                                                                                                                                   

tests/test_config.py::test_read_config PASSED                                                                                                  [  4%]
tests/test_config.py::test_advanced_options PASSED                                                                                             [  8%]
tests/test_config.py::test_installation PASSED                                                                                                 [ 12%]
tests/test_config.py::test_staging_mode PASSED                                                                                                 [ 16%]
tests/test_config.py::test_dev_mode PASSED                                                                                                     [ 20%]
tests/test_config.py::test_server_roles_questions PASSED                                                                                       [ 25%]
tests/test_config.py::test_use_https PASSED                                                                                                    [ 29%]
tests/test_config.py::test_proxy_letsencrypt PASSED                                                                                            [ 33%]
tests/test_config.py::test_proxy_no_letsencrypt_advanced PASSED                                                                                [ 37%]
tests/test_config.py::test_proxy_no_letsencrypt PASSED                                                                                         [ 41%]
tests/test_config.py::test_proxy_no_letsencrypt_retains_custom_nginx_proxy_port PASSED                                                         [ 45%]
tests/test_config.py::test_no_proxy_no_ssl PASSED                                                                                              [ 50%]
tests/test_config.py::test_proxy_no_ssl_advanced PASSED                                                                                        [ 54%]
tests/test_config.py::test_port_allowed PASSED                                                                                                 [ 58%]
tests/test_config.py::test_create_directory PASSED                                                                                             [ 62%]
tests/test_config.py::test_maintenance PASSED                                                                                                  [ 66%]
tests/test_config.py::test_exposed_ports PASSED                                                                                                [ 70%]
tests/test_config.py::test_force_secure_mongo PASSED                                                                                           [ 75%]
tests/test_config.py::test_secure_mongo_advanced_options PASSED                                                                                [ 79%]
tests/test_config.py::test_update_mongo_passwords PASSED                                                                                       [ 83%]
tests/test_config.py::test_update_mongo_usernames PASSED                                                                                       [ 87%]
tests/test_config.py::test_update_postgres_password PASSED                                                                                     [ 91%]
tests/test_config.py::test_update_postgres_username PASSED                                                                                     [ 95%]
tests/test_config.py::test_update_postgres_db_name_from_single_database FAILED                                                                 [100%]

====================================================================== FAILURES ======================================================================
_________________________________________________ test_update_postgres_db_name_from_single_database __________________________________________________

    def test_update_postgres_db_name_from_single_database():
        Simulate upgrade from single database to two databases.
        With two databases, KoBoCat has its own database. We ensure that
        `kc_postgres_db` gets `postgres_db` value.
        config_object = test_read_config()
        config = config_object.get_config()
        old_db_name = "postgres_db_kobo"
        config_object._Config__config["postgres_db"] = old_db_name
        assert config.get("kc_postgres_db") == config_object.get_config_template()["kc_postgres_db"]
        assert "postgres_db" in config
>       config = config_object._Config__upgrade_kc_db(config)
E       AttributeError: 'Config' object has no attribute '_Config__upgrade_kc_db'

tests/test_config.py:533: AttributeError
======================================================== 1 failed, 23 passed in 2.56 seconds =========================================================
ERROR: InvocationError: '/home/admin_datacollect/kobo-install/.tox/py36/bin/pytest -vv'
______________________________________________________________________ summary _______________________________________________________________________
ERROR:   py36: commands failed