Kobo Docker gives error

I encounter an error when running kobo docker setup. All the pre-requisites including docker and docker compose are installed. However the kobo docker installation throws an error right after installing nginx and certbot. Can anyone point out where the problem is? Below a screenshot

Hello @kenGIS,
Do you run KoboInstall with default options or do you use advanced options and specify few options?

I did try with default options.

$ ./run.py -s
║ Welcome to KoBoInstall!                                       ║
║                                                               ║
║ You are going to be asked some questions that will            ║
║ determine how to build the configuration of `KoBoToolBox`.    ║
║                                                               ║
║ Some questions already have default values (within brackets). ║
║ Just press `enter` to accept the default value or enter `-`   ║
║ to remove previously entered value.                           ║
║ Otherwise choose between choices or type your answer.         ║
Where do you want to install?
Please confirm path [/tmp/https]
	1) Yes
	2) No
Do you want to see advanced options?
	1) Yes
	2) No
What kind of installation do you need?
	1) On your workstation
	2) On a server
Public domain name [kobo.example]:
KPI sub domain [kf]:
KoBoCat sub domain [kc]:
Enketo Express sub domain name [ee]:
Do you want to use HTTPS?
	1) Yes
	2) No
║ Please note that certificates must be installed on a reverse-proxy ║
║ or a load balancer.                                                ║
║ KoBoInstall can install one, if needed.                            ║
Auto-install HTTPS certificates with Let's Encrypt?
	1) Yes
	2) No - Use my own reserve-proxy/load-balancer
║ Domain names must be publicly accessible.      ║
║ Otherwise Let's Encrypt won't be able to valid ║
║ your certificates.                             ║
Email address for Let's Encrypt [user@kobo.example]:
Please confirm [user@kobo.example]
	1) Yes
	2) No
SMTP server:
SMTP port [25]:
SMTP user:
From email address [support@kobo.example]:
Super user's username [super_admin]:
Super user's password [$Ht5BxfB~54]:
Do you want to activate backups?
	1) Yes
	2) No
Already on 'master'
From https://github.com/kobotoolbox/kobo-docker
 * branch            master     -> FETCH_HEAD
Existing data found for kf.kobo.example,kc.kobo.example,ee.kobo.example. Continue and replace existing certificate? (y/N) y
Creating network "nginx-certbot_default" with the default driver
Creating nginx-certbot_nginx_1 ... done
Stopping https_redis_main_1  ... done
Stopping https_postgres_1    ... done
Stopping https_redis_cache_1 ... done
Stopping https_mongo_1       ... done
Removing https_redis_main_1  ... done
Removing https_postgres_1    ... done
Removing https_redis_cache_1 ... done
Removing https_mongo_1       ... done
Removing network https_default
Removing network https_kobo-fe-network
Stopping nginx-certbot_nginx_1 ... done
Removing nginx-certbot_nginx_1 ... done
Removing network nginx-certbot_default
Launching environment
Creating network "https_default" with the default driver
Creating https_mongo_1       ... done
Creating https_redis_cache_1 ... done
Creating https_redis_main_1  ... done
Creating https_postgres_1    ... done
Creating network "https_kobo-fe-network" with driver "bridge"
WARNING: Found orphan containers (https_redis_main_1, https_postgres_1, https_redis_cache_1, https_mongo_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Pulling kpi (kobotoolbox/kpi:2.019.35b-hotfix2)...
Pulling kobocat (kobotoolbox/kobocat:2.019.39)...
Creating https_kobocat_1        ... done
Creating https_enketo_express_1 ... done
Creating https_kpi_1            ... done
Creating https_nginx_1          ... done
Creating network "nginx-certbot_default" with the default driver
Creating nginx-certbot_certbot_1 ... done
Creating nginx-certbot_nginx_1   ... done
Waiting for environment to be ready. It can take a few minutes.
║ Ready                                    ║
║ URL: https://kf.kobo.example/            ║
║ User: super_admin                        ║
║ Password: $Ht5BxfB~54                    ║

It works on my end with:

  • KoBoInstall Version: 76206ba
  • Python 3.7.5
  • Ubuntu 18.04
  • Docker version 19.03.3, build a872fc2f86
  • docker-compose version 1.24.1, build 4667896b

I also made it work with Python 2.7.15.

You can also verify ports 80 and 443 are opened on your server.

1 Like

I run it with default options. I dont get into advanced options. Would advanced options help resolve the issue?

As you can see, I run it with default options too and it worked.
Advanced options are useful when you want to customize settings such as ports or HTTPS proxy.

Be sure to have the latest version of KoBoInstall (which I guess you have).
Can you provide all the versions you have?

If you feel confortable to edit Python files, you can insert this print(command) at line 88 in file helpers/cli.py.

It should look like this:

            stdout = None
                stdout = subprocess.check_output(command, universal_newlines=True, cwd=cwd)
            except subprocess.CalledProcessError as cpe:
                # Error will be display by above command.
                cls.colored_print("An error has occurred", CLI.COLOR_ERROR)
            return stdout

Then run again ./run.py --setup. It should display which command fails just before the message: An error has occured

1 Like