Fresh installation on Ubuntu 18.04.05 doesn't work

Hi!
I have installed kobotoolbox using de official script provided on a Ubuntu Server 18.04.05 and the installation goes ok, it evens give me this message:

║ Ready                                                              
║ URL: http://data.yanapak.org                                      
║ User: xxxxxx                                               
║ Password: xxxxxx   

, but when i try to navigate into it nothing happens, literally not error message what so ever.
Domains are functionally and i choose server type installation.

Please help!!!

this is my installation

Where do you want to install?
[/home/chasqui/kobo-docker]: 
Please confirm path [/home/chasqui/kobo-docker]
	1) Yes
	2) No
[1]: 
Do you want to see advanced options?
	1) Yes
	2) No
[1]: 
What kind of installation do you need?
	1) On your workstation
	2) On a server
[2]: 
Please choose which network interface you want to use?
	enp0s3) 192.168.1.151
	other) Other
[enp0s3]: 
Do you want to use separate servers for front end and back end?
	1) Yes
	2) No
[2]: 
Public domain name? [yanapak.org]: 
KPI sub domain? [data]: 
KoBoCat sub domain? [kc]: 
Enketo Express sub domain name? [ee]: 
Do you want to use HTTPS?
	1) Yes
	2) No
[1]: 2
Are kobo-docker containers behind a reverse-proxy/load-balancer?
	1) Yes
	2) No
[1]: 1
Is your reverse-proxy/load-balancer installed on this server?
	1) Yes
	2) No
[2]: 2
Internal port used by reverse proxy?
[80]: 
SMTP server? []: 
SMTP port? [25]: 
SMTP user? []: 
From email address? [contacto@yanapak.org]: 
Super user's username? [xxxxx]: 
Super user's password? [xxxxxx]: 
Docker Compose prefix? (leave empty for default) []: 
Use staging mode?
	1) Yes
	2) No
[2]: 
KoBoCat PostgreSQL database name?
[xxxxx]: 
KPI PostgreSQL database name?
[xxxxx]: 
PostgreSQL user's username?
[xxxxx]: 
PostgreSQL user's password?
[xxxxxx]: 
Do you want to tweak PostgreSQL settings?
	1) Yes
	2) No
[2]: 
MongoDB root's username?
[xxxx]: 
MongoDB root's password?
[xxxxx]: 
MongoDB user's username?
[xxxxx]: 
MongoDB user's password?
xxxxx]: 
Redis password?
[xxxxx]: 
Do you want to expose back-end container ports (`PostgreSQL`, `MongoDB`, `redis`)?
	1) Yes
	2) No
[2]: 
Do you want to customize the application secret keys?
	1) Yes
	2) No
[2]: 
Do you want to use AWS S3 storage?
	1) Yes
	2) No
[2]: 
Google Analytics Identifier []: 
Google API Key []: 
Do you want to use Sentry?
	1) Yes
	2) No
[2]: 
Do you want to tweak uWSGI settings?
	1) Yes
	2) No
[2]: 
Do you want to activate backups?
	1) Yes
	2) No

Run docker ps.
Are your containers running?

1 Like

Yes they are running

Hi @Yanapak can you please check that your /etc/hosts file is set up as expected and then try a GET request to [your_url]/service_health/ – you should see something like this if things are working correctly:

OK KPI

Mongo: OK in 0.000704 seconds
Postgres: OK in 0.00617 seconds
Enketo [http://ee.docker.internal]: OK in 0.721 seconds
KoBoCAT [http://kc.docker.internal]: OK in 0.0127 seconds

----BEGIN KOBOCAT RESPONSE----
OK

Mongo: OK in 0.000674 seconds
Postgres: OK in 0.00327 seconds

---- END KOBOCAT RESPONSE ----
1 Like

Everything seems ok :frowning_face:
Captura de pantalla de 2021-04-16 11-53-44

Interesting… have you opened up your firewall to allow traffic to port 80?

1 Like

Firewall is inactive, both kobo machine and apache2 reverse proxy machine.

Can you try reinstalling with HTTPS and auto create SSL certificate option?

Are you running another reverse proxy on the same server machine that could also be trying to use port 80?

1 Like

In the kobo server there is nothing else than the kobo instance.
In the reverse proxy server, yes i do have another two reverse proxies pointing to port 80 on the kobo instance with the kc and ee DNS.

When i tried, it says that por 80 is already in use… i try change the port to 8080
Captura de pantalla de 2021-04-16 12-33-50

and now the server doesnt start
Captura de pantalla de 2021-04-16 12-38-37

From within the kobo-install directory you can run ./run.py --logs to see if there are issues and then check the /service_health/ so see if things are running. Sometimes it can take a while to start.

1 Like

Can you please explain this a little more. Did you set up additional reverse proxies manually apart from what the setup script does for you?

1 Like

Yes i did setup manually 3 reverse proxies in the Apache2 machine (192.168.1.96) because that machine is exposed to internet, because in the modem/router i have port 80 forwarding to 192.168.1.96

Those 3 reverse proxies configuration to kobo instance (192.168.1.151) goes like this:
Captura de pantalla de 2021-04-16 13-05-41

Captura de pantalla de 2021-04-16 13-05-24

Captura de pantalla de 2021-04-16 13-05-11

I’m not familiar with this kind of setup, but I’ll ping @jnm here to see if he can assist.

HI!
I tried run again the setup script with HTTPS but without the auto-certificate, instead i use SSL on the reverse proxy option (that reverse proxy IP is 192.168.1.96) Also i select port 8080 as internal reverse proxy, and this time server did start!

but, i still cannot navigate into it with a browser with https://data.yanapak.org, because it re-directs me to the private IP adress of the kobo machine (192.168.1.151)


.
.
.
So i tried GET https://data.yanapak.org/service_health/ and now I DO have an error!

I tried to change that file, but i do not know where! there is nothing as hostname in line 50.
Please help!!

also i paste here logs of the kobo machine, if it helps!

Attaching to kobofe_enketo_express_1, kobofe_kpi_1, kobofe_nginx_1, kobofe_kobocat_1
enketo_express_1  |
enketo_express_1  |                         -------------
enketo_express_1  |
enketo_express_1  | __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
enketo_express_1  |  _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
enketo_express_1  |   _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
enketo_express_1  |    _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
enketo_express_1  |     _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
enketo_express_1  |      _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
enketo_express_1  |       _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
enketo_express_1  |        _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
enketo_express_1  |         _\///______________\///______________\///__\///////////////__
enketo_express_1  |
enketo_express_1  |
enketo_express_1  |                           Runtime Edition
enketo_express_1  |
enketo_express_1  |         PM2 is a Production Process Manager for Node.js applications
enketo_express_1  |                      with a built-in Load Balancer.
enketo_express_1  |
enketo_express_1  |                 Start and Daemonize any application:
enketo_express_1  |                 $ pm2 start app.js
enketo_express_1  |
enketo_express_1  |                 Load Balance 4 instances of api.js:
enketo_express_1  |                 $ pm2 start api.js -i 4
enketo_express_1  |
enketo_express_1  |                 Monitor in production:
enketo_express_1  |                 $ pm2 monitor
enketo_express_1  |
enketo_express_1  |                 Make pm2 auto-boot at server restart:
enketo_express_1  |                 $ pm2 startup
enketo_express_1  |
enketo_express_1  |                 To go further checkout:
enketo_express_1  |                 http://pm2.io/
enketo_express_1  |
enketo_express_1  |
enketo_express_1  |                         -------------
enketo_express_1  |
enketo_express_1  | pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)
enketo_express_1  | 2021-04-17T19:20:09: PM2 log: Launching in no daemon mode
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: [PM2] Starting /srv/src/enketo_express/app.js in fork_mode (1 instance)
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: App [enketo:0] starting in -fork mode-
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: App [enketo:0] online
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: [PM2] Done.
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: ┌─────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
enketo_express_1  | │ id  │ name      │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
enketo_express_1  | ├─────┼───────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
enketo_express_1  | │ 0   │ enketo    │ default     │ 2.5.6   │ fork    │ 27       │ 0s     │ 0    │ online    │ 0%       │ 30.7mb   │ root     │ disabled │
enketo_express_1  | └─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: [--no-daemon] Continue to stream logs
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: [--no-daemon] Exit on target PM2 exit pid=1
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: [PM2] This PM2 is not UP TO DATE
enketo_express_1  | 2021-04-17T19:20:10: PM2 log: [PM2] Upgrade to version 4.5.6
enketo_express_1  | 19:20:10 PM2      | [PM2] This PM2 is not UP TO DATE
enketo_express_1  | 19:20:10 PM2      | [PM2] Upgrade to version 4.5.6
enketo_express_1  | 19:20:12 0|enketo | Worker 1 ready for duty at port 8005! (environment: production)
enketo_express_1  | 19:20:12 0|enketo | Worker 2 ready for duty at port 8005! (environment: production)
nginx_1           | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1           | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_1           | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1           | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx_1           | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
nginx_1           | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1           | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-init-kobo-nginx.sh
nginx_1           | Creating includes directory
nginx_1           | Overwriting default nginx configuration
nginx_1           | Clearing out any default configurations
nginx_1           | Proxying to `kpi` through uWSGI.
nginx_1           | Proxying to `kobocat` through uWSGI.
nginx_1           | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx_1           | /docker-entrypoint.sh: Configuration complete; ready for start up
kpi_1             | KoBoForm initializing...
kpi_1             | Waiting for container `mongo`.
kpi_1             | 2021/04/17 19:20:11 Waiting for: tcp://mongo.yanapak.private:27017
kpi_1             | 2021/04/17 19:20:11 Connected to tcp://mongo.yanapak.private:27017
kpi_1             | Container `mongo` up.
kpi_1             | Waiting for container `postgres`.
kpi_1             | 2021/04/17 19:20:11 Waiting for: tcp://postgres.yanapak.private:5432
kpi_1             | 2021/04/17 19:20:11 Connected to tcp://postgres.yanapak.private:5432
kpi_1             | Container `postgres` up.
kpi_1             | Waiting for Postgres service.
kpi_1             | postgres.yanapak.private:5432 - accepting connections
kpi_1             | Postgres service running; ensuring koboform database exists and has PostGIS extensions...
kpi_1             | ERROR:  database "koboform" already exists
kpi_1             | You are now connected to database "koboform" as user "kobo".
kpi_1             | CREATE EXTENSION
kpi_1             | NOTICE:  extension "postgis" already exists, skipping
kpi_1             | NOTICE:  extension "postgis_topology" already exists, skipping
kpi_1             | CREATE EXTENSION
kpi_1             | NOTICE:  extension "fuzzystrmatch" already exists, skipping
kpi_1             | CREATE EXTENSION
kpi_1             | CREATE EXTENSION
kpi_1             | NOTICE:  extension "postgis_tiger_geocoder" already exists, skipping
kpi_1             | Postgres database koboform ready for use!
kpi_1             | Running migrations...
kpi_1             | Operations to perform:
kpi_1             |   Apply all migrations: admin, auth, authtoken, contenttypes, database, django_celery_beat, django_digest, external_integrations, help, hook, hub, kpi, oauth2_provider, registration, reversion, sessions, taggit
kpi_1             | Running migrations:
kpi_1             |   No migrations to apply.
kpi_1             |   Your models have changes that are not yet reflected in a migration, and so won't be applied.
kpi_1             |   Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
kpi_1             | Creating superuser...
kpi_1             | User already exists.
kpi_1             | Copying static files to nginx volume...
kpi_1             | Cleaning up Celery PIDs...
kpi_1             | KoBoForm initialization completed.
kpi_1             | Running `kpi` container with uWSGI application server.
kpi_1             | [uWSGI] getting INI configuration from /srv/src/kpi/uwsgi.ini
kobocat_1         | *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
kobocat_1         | *** Running /etc/my_init.d/01_wait_for_mongo.bash...
kobocat_1         | Waiting for container `mongo`.
kobocat_1         | 2021/04/17 19:20:10 Waiting for host: tcp://mongo.yanapak.private:27017
kobocat_1         | 2021/04/17 19:20:10 Connected to tcp://mongo.yanapak.private:27017
kobocat_1         | Container `mongo` up.
kobocat_1         | *** Running /etc/my_init.d/02_wait_for_postgres.bash...
kobocat_1         | Waiting for container `postgres`.
kobocat_1         | 2021/04/17 19:20:10 Waiting for host: tcp://postgres.yanapak.private:5432
kobocat_1         | 2021/04/17 19:20:10 Connected to tcp://postgres.yanapak.private:5432
kobocat_1         | Container `postgres` up.
kobocat_1         | Waiting for Postgres service.
kobocat_1         | postgres.yanapak.private:5432 - accepting connections
kobocat_1         | Postgres service running; ensuring kobocat database exists and has PostGIS extensions...
kobocat_1         | ERROR:  database "kobocat" already exists
kobocat_1         | You are now connected to database "kobocat" as user "kobo".
kobocat_1         | NOTICE:  extension "postgis" already exists, skipping
kobocat_1         | CREATE EXTENSION
kobocat_1         | NOTICE:  extension "postgis_topology" already exists, skipping
kobocat_1         | CREATE EXTENSION
kobocat_1         | NOTICE:  extension "fuzzystrmatch" already exists, skipping
kobocat_1         | CREATE EXTENSION
kobocat_1         | NOTICE:  extension "postgis_tiger_geocoder" already exists, skipping
kobocat_1         | CREATE EXTENSION
kobocat_1         | Postgres database kobocat ready for use!
kobocat_1         | *** Running /etc/my_init.d/03_wait_for_kpi.bash...
kobocat_1         | Waiting for container `kpi`.
kobocat_1         | 2021/04/17 19:20:10 Waiting for host: tcp://kpi:8000
kobocat_1         | 2021/04/17 19:20:21 Connected to tcp://kpi:8000
kobocat_1         | Container `kpi` up.
kobocat_1         | Waiting for `kpi` web service.
kobocat_1         | `kpi` web service ready.
kobocat_1         | *** Running /etc/my_init.d/10_init_kobocat.bash...
kobocat_1         | KoBoCAT intializing...
kobocat_1         | Synchronizing database.
kobocat_1         | Your environment is:"onadata.settings.kc_environ"
kobocat_1         | Operations to perform:
kobocat_1         |   Synchronize unmigrated apps: gis, staticfiles, admindocs, messages, django_extensions, readonly, humanize, export, django_nose, rest_framework, libs, corsheaders, survey_report, sms_support, pure_pagination
kobocat_1         |   Apply all migrations: authtoken, oauth2_provider, reversion, django_celery_beat, admin, guardian, sessions, sites, auth, viewer, django_digest, contenttypes, api, taggit, registration, logger, main, restservice
kobocat_1         | Synchronizing apps without migrations:
kobocat_1         |   Creating tables...
kobocat_1         |     Running deferred SQL...
kobocat_1         |   Installing custom SQL...
kobocat_1         | Running migrations:
kobocat_1         |   No migrations to apply.
kobocat_1         |   Your models have changes that are not yet reflected in a migration, and so won't be applied.
kobocat_1         |   Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
kobocat_1         | Running migrations.
kobocat_1         | Your environment is:"onadata.settings.kc_environ"
kobocat_1         | Operations to perform:
kobocat_1         |   Synchronize unmigrated apps: gis, staticfiles, admindocs, messages, django_extensions, readonly, humanize, export, django_nose, rest_framework, libs, corsheaders, survey_report, sms_support, pure_pagination
kobocat_1         |   Apply all migrations: authtoken, oauth2_provider, reversion, django_celery_beat, admin, guardian, sessions, sites, auth, viewer, django_digest, contenttypes, api, taggit, registration, logger, main, restservice
kobocat_1         | Synchronizing apps without migrations:
kobocat_1         |   Creating tables...
kobocat_1         |     Running deferred SQL...
kobocat_1         |   Installing custom SQL...
kobocat_1         | Running migrations:
kobocat_1         |   No migrations to apply.
kobocat_1         |   Your models have changes that are not yet reflected in a migration, and so won't be applied.
kobocat_1         |   Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
kobocat_1         | KoBoCat tmp clean-up cron installed
kobocat_1         | KoBoCAT media automatic backups disabled.
kobocat_1         | KoBoCAT initialization complete.
kobocat_1         | *** Running /etc/my_init.d/10_syslog-ng.init...
kobocat_1         | Apr 17 19:20:38 kobocat syslog-ng[70]: syslog-ng starting up; version='3.5.6'
kobocat_1         | Apr 17 19:20:39 kobocat syslog-ng[70]: EOF on control channel, closing connection;
kobocat_1         | *** Running /etc/my_init.d/11_sync_static.bash...
kobocat_1         | Collecting static files...
kobocat_1         | Your environment is:"onadata.settings.kc_environ"
kobocat_1         | Done
kobocat_1         | Resetting ownership of media directory...
kobocat_1         | Done.
kobocat_1         | %%%%%%% NOTICE %%%%%%%
kobocat_1         | % To avoid long delays, we no longer reset ownership *recursively*
kobocat_1         | % every time this container starts. If you have trouble with
kobocat_1         | % permissions, please run the following command inside the
kobocat_1         | % `kobocat` container:
kobocat_1         | %	chown -R "wsgi" "/srv/src/kobocat"
kobocat_1         | %%%%%%%%%%%%%%%%%%%%%%
kobocat_1         | Syncing to nginx folder...
kobocat_1         | Done
kobocat_1         | *** Running /etc/rc.local...
kobocat_1         | *** Booting runit daemon...
kobocat_1         | *** Runit started as PID 92
kobocat_1         | Apr 17 19:20:41 kobocat cron[99]: (CRON) INFO (pidfile fd = 3)
kobocat_1         | Apr 17 19:20:41 kobocat cron[99]: (CRON) INFO (Running @reboot jobs)
kobocat_1         | *** Starting uWSGI 2.0.18 (64bit) on [Sat Apr 17 19:20:41 2021] ***
kobocat_1         | compiled with version: 5.4.0 20160609 on 11 June 2019 18:32:31
kobocat_1         | os: Linux-4.15.0-142-generic #146-Ubuntu SMP Tue Apr 13 01:11:19 UTC 2021
kobocat_1         | nodename: kobocat
kobocat_1         | machine: x86_64
kobocat_1         | clock source: unix
kobocat_1         | pcre jit disabled
kobocat_1         | detected number of CPU cores: 2
kobocat_1         | current working directory: /etc/service/uwsgi_wrong_port_warning
kobocat_1         | detected binary path: /usr/local/bin/uwsgi
kobocat_1         | setuid() to 1000
kobocat_1         | *** WARNING: you are running uWSGI without its master process manager ***
kobocat_1         | your memory page size is 4096 bytes
kobocat_1         | detected max file descriptor number: 1048576
kobocat_1         | lock engine: pthread robust mutexes
kobocat_1         | thunder lock: disabled (you can enable it with --thunder-lock)
kobocat_1         | uwsgi socket 0 bound to TCP address :8000 fd 3
kobocat_1         | Python version: 2.7.12 (default, Nov 12 2018, 14:36:49)  [GCC 5.4.0 20160609]
kobocat_1         | Running `kobocat` container with uWSGI application server.
kobocat_1         | *** Python threads support is disabled. You can enable it with --enable-threads ***
kobocat_1         | Python main interpreter initialized at 0x25cbf50
kobocat_1         | your server socket listen backlog is limited to 100 connections
kobocat_1         | your mercy for graceful operations on workers is 60 seconds
kobocat_1         | mapped 72920 bytes (71 KB) for 1 cores
kobocat_1         | *** Operational MODE: single process ***
kobocat_1         | WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x25cbf50 pid: 103 (default app)
kobocat_1         | *** uWSGI is running in multiple interpreter mode ***
kobocat_1         | spawned uWSGI worker 1 (and the only) (pid: 103, cores: 1)
kobocat_1         | [uWSGI] getting INI configuration from /srv/src/kobocat/docker/kobocat.ini

Hi @Yanapak as I mentioned before, I’m not familiar with the additional reverse proxy method you’re attempting. I would suggest doing a fresh install without the additional reverse proxies and see if you are able to access kobo at your domain name. If that works, then try adding your proxies and troubleshoot from there.

1 Like