Kobo Install Not working

Hello,
I’m trying to install the kobo server on my Ubuntu 16.04 but I’ve been stuck on the “KoBoToolbox has not started yet… Wait for another 600seconds?” for the past 4 hours.
I have checked my Kpi.error.log and have this error:
“connect() failed (111: Connection refused) while connection to upstream, client: myIPAddress, server: mydomain.com, request: GET /service_health/HTTP/1.1, upstream :uwsgi://192.168.32.5:8000, host: kf.mydomain.com”.

What do I need to do to get the connection to take place?

Hi @derricknyakiba,
Do you use HTTPS proxy provided by kobo-install ?
What does docker ps command return?
Can you paste the output of ./run.py --setup (do not share your credential)

1 Like

Hi,
No, I’m not using https proxy by kobo-install
The following images are up:
1.kpi
2. kobocat
3. nginx
4. enketo-express-extra-widgets
5. mongo
6 redi
7. mdillon/postgis

Below is the output:

“Where do you want to install?
[/kobo-docker]:
Please confirm path [/kobo-docker]
1) Yes
2) No
[1]:
Do you want to see advanced options?
1) Yes
2) No
[2]:
What kind of installation do you need?
1) On your workstation
2) On a server
[2]:
Public domain name [mydomain.com]:
KPI sub domain [kf]:
KoBoCat sub domain [kc]:
Enketo Express sub domain name [ee]:
Do you want to use HTTPS?
1) Yes
2) No
[2]:
SMTP server:
SMTP port [25]:
SMTP user:
From email address [support@mydomain.com]:
Super user’s username [super_admin]:
Super user’s password [some_random_string]:
Do you want to activate backups?
1) Yes
2) No
[2]:
Already on ‘master’”

Is mydomain.com a valid domain? Does it resolve on your DNS?
What does ./run.py --logs says?

1 Like

Yes, Mydomain is a valid domain.
./run.py --logs returns evertything as okay and “worker ## ready for duty at port 8005”
. My kpi.access.logs now returns an error 499

worker ## ready for duty at port 8005 tells that enketo runs. It doesn’t say if kpi or kobocat are running.
Try to access http://kc.mydomain.com/service_health/ and copy/paste the logs docker returns.

1 Like

Below is the output of running docker logs kobo-docker_kobocat_1
docker logs kobo-docker_kobocat_1
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh…
*** Running /etc/my_init.d/01_wait_for_mongo.bash…
Waiting for container mongo.
2019/10/31 19:19:56 Waiting for host: tcp://mongo.mydomain.private:27017
2019/10/31 19:19:56 Connected to tcp://mongo.mydomain.private:27017
Container mongo up.
*** Running /etc/my_init.d/02_wait_for_postgres.bash…
Waiting for container postgres.
2019/10/31 19:19:56 Waiting for host: tcp://postgres.mydomain.private:5432
2019/10/31 19:19:56 Connected to tcp://postgres.mydomain.private:5432
Container postgres up.
Waiting for Postgres service.
postgres.mydomain.private:5432 - no response
postgres.mydomain.private:5432 - no response
postgres.mydomain.private:5432 - no response
postgres.mydomain.private:5432 - no response
postgres.mydomain.private:5432 - no response
postgres.mydomain.private:5432 - no response
postgres.mydomain.private:5432 - accepting connections
Postgres service running; ensuring kobotoolbox database exists and has PostGIS extensions…
ERROR: database “kobotoolbox” already exists
You are now connected to database “kobotoolbox” as user “kobo”.
CREATE EXTENSION
NOTICE: extension “postgis” already exists, skipping
NOTICE: extension “postgis_topology” already exists, skipping
CREATE EXTENSION
Postgres database kobotoolbox ready for use!
*** Running /etc/my_init.d/03_wait_for_kpi.bash…
Waiting for container kpi.
2019/10/31 19:20:03 Waiting for host: tcp://kpi:8000
2019/10/31 19:20:34 Connected to tcp://kpi:8000
Container kpi up.
Waiting for kpi web service.
kpi web service ready.
*** Running /etc/my_init.d/10_init_kobocat.bash…
KoBoCAT intializing…
Synchronizing database.
Your environment is:“onadata.settings.kc_environ”
Operations to perform:
Synchronize unmigrated apps: gis, staticfiles, admindocs, messages, django_extensions, readonly, humanize, export, django_nose, rest_framework, libs, corsheaders, survey_report, sms_support, pure_pagination
Apply all migrations: authtoken, oauth2_provider, reversion, django_celery_beat, admin, guardian, sessions, sites, auth, viewer, django_digest, contenttypes, api, taggit, registration, stats, logger, main, restservice
Synchronizing apps without migrations:
Creating tables…
Creating table corsheaders_corsmodel
Running deferred SQL…
Installing custom SQL…
Running migrations:
Rendering model states… DONE
Applying logger.0001_initial… OK
Applying main.0001_initial… OK
Applying api.0001_initial… OK
Applying guardian.0001_initial… OK
Applying logger.0002_attachment_filename_length… OK
Applying logger.0003_add-index-on-attachment-media-file… OK
Applying logger.0004_increase-length-of-attachment-mimetype-field… OK
Applying logger.0005_instance_xml_hash… OK
Applying logger.0006_add_validation_status_json_field_in_instance_table… OK
Applying logger.0007_add_validate_permission_on_xform… OK
Applying logger.0008_add_instance_is_synced_with_mongo_and_xform_has_kpi_hooks… OK
Applying logger.0009_add_posted_to_kpi_field_to_logger_instance… OK
Applying logger.0010_attachment_media_file_basename… OK
Applying logger.0011_add-index-to-instance-uuid_and_xform_uuid… OK
Applying main.0002_auto_20160205_1915… OK
Applying restservice.0001_initial… OK
Applying restservice.0002_add_related_name_with_delete_on_cascade… OK
Applying sites.0001_initial… OK
Applying stats.0001_initial… OK
Applying viewer.0001_initial… OK
Applying viewer.0002_auto_20160205_1915… OK
Applying viewer.0003_auto_20171123_1521… OK
Running migrations.
Your environment is:“onadata.settings.kc_environ”
Operations to perform:
Synchronize unmigrated apps: gis, staticfiles, admindocs, messages, django_extensions, readonly, humanize, export, django_nose, rest_framework, libs, corsheaders, survey_report, sms_support, pure_pagination
Apply all migrations: authtoken, oauth2_provider, reversion, django_celery_beat, admin, guardian, sessions, sites, auth, viewer, django_digest, contenttypes, api, taggit, registration, stats, logger, main, restservice
Synchronizing apps without migrations:
Creating tables…
Running deferred SQL…
Installing custom SQL…
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won’t be applied.
Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.
KoBoCat tmp clean-up cron installed
KoBoCAT media automatic backups disabled.
KoBoCAT initialization complete.
*** Running /etc/my_init.d/10_syslog-ng.init…
Oct 31 19:21:02 kobocat syslog-ng[231]: syslog-ng starting up; version=‘3.5.6’
Oct 31 19:21:03 kobocat syslog-ng[231]: EOF on control channel, closing connection;
*** Running /etc/my_init.d/11_sync_static.bash…
Collecting static files…
Your environment is:“onadata.settings.kc_environ”
Done
Resetting ownership of media directory…
Done.
%%%%%%% NOTICE %%%%%%%
% To avoid long delays, we no longer reset ownership recursively
% every time this container starts. If you have trouble with
% permissions, please run the following command inside the
% kobocat container:
% chown -R “wsgi” “/srv/src/kobocat”
%%%%%%%%%%%%%%%%%%%%%%
Syncing to nginx folder…
Done
*** Running /etc/rc.local…
*** Booting runit daemon…
*** Runit started as PID 315
Oct 31 19:21:06 kobocat cron[321]: (CRON) INFO (pidfile fd = 3)
Oct 31 19:21:06 kobocat cron[321]: (CRON) INFO (Running @reboot jobs)
Restoring ownership of Logs directory.
Running kobocat container with uWSGI application server.
[uWSGI] getting INI configuration from /srv/src/kobocat/docker/kobocat.ini

Kobocat is up&running.
What about kpi?
Have tried the url I gave you?

Yes i have tried the url. I get a 504 bad gateway on the browser.
Below is the output in kpi.access.log
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:20:00 +0000] “GET /servic e_health/ HTTP/1.1” 502 (182 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:20:10 +0000] “GET /servic e_health/ HTTP/1.1” 502 (182 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:20:20 +0000] “GET /servic e_health/ HTTP/1.1” 502 (182 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:20:30 +0000] “GET /servic e_health/ HTTP/1.1” 502 (182 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:20:40 +0000] “GET /servic e_health/ HTTP/1.1” 500 (388 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:20:50 +0000] “GET /servic e_health/ HTTP/1.1” 500 (392 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:21:00 +0000] “GET /servic e_health/ HTTP/1.1” 500 (391 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:21:20 +0000] “GET /servic e_health/ HTTP/1.1” 499 (0 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:21:41 +0000] “GET /servic e_health/ HTTP/1.1” 499 (0 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:22:01 +0000] “GET /servic e_health/ HTTP/1.1” 499 (0 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:22:21 +0000] “GET /servic e_health/ HTTP/1.1” 499 (0 bytes) “-” “-”
kf.mydomain.com | myipaddress - - [31/Oct/2019:19:22:41 +0000] “GET /servic e_health/ HTTP/1.1” 499 (0 bytes) “-” “-”

This is what is under kpi.error.log.
2019/10/31 19:20:00 [error] 84#84: *1 connect() failed (111: Connection refused) while connecting to upstream, client: myipaddress, server: kf.mydomain.com, request: “GET /service_health/ HTTP/1.1”, upstream: “uwsgi://172.25.0.4:8000”, host: “kf.mydomain.com
2019/10/31 19:20:10 [error] 84#84: *3 connect() failed (111: Connection refused) while connecting to upstream, client: myipaddress, server: kf.mydomain.com, request: “GET /service_health/ HTTP/1.1”, upstream: “uwsgi://172.25.0.4:8000”, host: “kf.mydomain.com
2019/10/31 19:20:20 [error] 84#84: *5 connect() failed (111: Connection refused) while connecting to upstream, client: myipaddress, server: kf.mydomain.com, request: “GET /service_health/ HTTP/1.1”, upstream: “uwsgi://172.25.0.4:8000”, host: “kf.mydomain.com
2019/10/31 19:20:30 [error] 84#84: *7 connect() failed (111: Connection refused) while connecting to upstream, client: myipaddress, server: kf.mydomain.com, request: “GET /service_health/ HTTP/1.1”, upstream: “uwsgi://172.25.0.4:8000”, host: “kf.mydomain.com

The contents of the kobocat error and access log is similar

Ok, that means nginx is accessible but it cannot communicate with kpi from some reason.
Look at docker logs

$kobo-install>python run.py --logs

Try to activate DEBUG mode.

  1. Modify config files
    In kobo-deployments/envfiles/kpi.txt, change
    KPI_DJANGO_DEBUG=False to KPI_DJANGO_DEBUG=True
    and in kobo-deployments/envfiles/kobocat.txt change
    KOBOCAT_DJANGO_DEBUG=False to KOBOCAT_DJANGO_DEBUG=True

  2. Restart containers with this command from kobo-docker directory.

$kobo-docker> docker-compose -f docker-compose.frontend.yml -f docker-compose.frontend.override.yml up -d --force-recreate nginx kpi kobocat
  1. Look at kpi docker logs
$kobo-docker>docker-compose -f docker-compose.frontend.yml -f docker-compose.frontend.override.yml logs -f kpi
  1. Wait until you see request to /service_health/

You should see the error that kpi returns. Please report here, it can help.

One more thing, if you have an active firewall, ensure that containers can talk to each other. Be sure to not open PostgreSQL, Mongo and Redis ports publicly.

1 Like

I was getting an erro 499 which I still don’t understand the reason for. I cleared out everything and reinstalled using http only, as https installation was not working. I have generated my own certificates and would like to know how I can configure the server to use https instead of http. I have placed my certificates in the nginx/secrets folder and restarted the nginx certbot container but https connection is still refusing

According to what you pasted. HTTPS was not activated with KoBoInstall .

I’ve been trying to debug a similar issue and I can’t seem to get any logs from django in the docker logs.

I’ve tried modifying the kobo-deployments/envfiles/kpi.txt to include this:

KPI_DJANGO_DEBUG=True
TEMPLATE_DEBUG=True

I’ve also ran this (from the kobo-docker directory):

docker-compose -f docker-compose.frontend.yml -f docker-compose.frontend.override.yml up -d --force-recreate nginx kpi kobocat

which gives me an error - althought i’m not sure its relevant:

kobo-docker]$ docker-compose -f docker-compose.frontend.yml -f docker-compose.frontend.override.yml up -d --force-recreate nginx kpi kobocat
Removing kobo-docker_nginx_1
Recreating b185062393df_kobo-docker_nginx_1 ...
Recreating b185062393df_kobo-docker_nginx_1 ... error
Recreating kobo-docker_kpi_1                ...
WARNING: Host is already in use by another container

Recreating kobo-docker_kobocat_1            ... done
Recreating kobo-docker_kpi_1                ... done

ERROR: for nginx  Cannot start service nginx: driver failed programming external connectivity on endpoint kobo-docker_nginx_1 (b2b353ebcf2689fe09c642947ea2110a93d6e9b5d5f784a0c5a4c3aaec94902d): Bind for 0.0.0.0:8080 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

Error logs still aren’t getting printed when I do docker logs <kpi-id> or use the command above. Anyone have any tips here?

@roemhildtg,

There is an issue with errors not showing up in logs.

You can try the latest release of kobo-install and run setup with advanced option in dev mode with DEBUG = True.
DO NOT USE this in production. Errors will be displayed in the webpage.

1 Like

Hi nolive. Thanks for the update. I’ll investigate and give an update.

2 Likes

Hi guys! I am getting very similar error.
The command
docker-compose -f docker-compose.frontend.yml -f docker-compose.frontend.override.yml logs -f kpi
returns:
kpi_1 | KoBoForm initializing…
kpi_1 | Waiting for container mongo.
kpi_1 | 2021/03/31 16:48:44 Waiting for: tcp://mongo.censimento.natuplan.private:27017
kpi_1 | 2021/03/31 16:48:44 Connected to tcp://mongo.censimento.natuplan.private:27017
kpi_1 | Container mongo up.
kpi_1 | Waiting for container postgres.
kpi_1 | 2021/03/31 16:48:44 Waiting for: tcp://postgres.censimento.natuplan.private:5432
kpi_1 | 2021/03/31 16:48:44 Connected to tcp://postgres.censimento.natuplan.private:5432
kpi_1 | Container postgres up.
kpi_1 | Waiting for Postgres service.
kpi_1 | postgres.censimento.natuplan.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 | NOTICE: extension “postgis” already exists, skipping
kpi_1 | CREATE EXTENSION
kpi_1 | NOTICE: extension “postgis_topology” already exists, skipping
kpi_1 | CREATE EXTENSION
kpi_1 | CREATE EXTENSION
kpi_1 | NOTICE: extension “fuzzystrmatch” already exists, skipping
kpi_1 | NOTICE: extension “postgis_tiger_geocoder” already exists, skipping
kpi_1 | CREATE EXTENSION
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

My installation logs are:
kpi_1 | KoBoForm initializing…
kpi_1 | Waiting for container mongo.
kpi_1 | 2021/03/31 17:10:44 Waiting for: tcp://mongo.censimento.natuplan.private:27017
kpi_1 | 2021/03/31 17:10:44 Connected to tcp://mongo.censimento.natuplan.private:27017
kpi_1 | Container mongo up.
kpi_1 | Waiting for container postgres.
kpi_1 | 2021/03/31 17:10:44 Waiting for: tcp://postgres.censimento.natuplan.private:5432
kpi_1 | 2021/03/31 17:10:44 Connected to tcp://postgres.censimento.natuplan.private:5432
kpi_1 | Container postgres up.
kpi_1 | Waiting for Postgres service.
kpi_1 | postgres.censimento.natuplan.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 | NOTICE: extension “postgis” already exists, skipping
kpi_1 | CREATE EXTENSION
kpi_1 | CREATE EXTENSION
kpi_1 | NOTICE: extension “postgis_topology” already exists, skipping
kpi_1 | CREATE EXTENSION
kpi_1 | NOTICE: extension “fuzzystrmatch” already exists, skipping
kpi_1 | NOTICE: extension “postgis_tiger_geocoder” already exists, skipping
kpi_1 | CREATE EXTENSION
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…
nginx_1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
kobocat_1 | Waiting for container mongo.
kobocat_1 | 2021/03/31 17:10:42 Waiting for host: tcp://mongo.censimento.natuplan.private:27017
nginx_1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
kobocat_1 | 2021/03/31 17:10:42 Connected to tcp://mongo.censimento.natuplan.private:27017
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
kobocat_1 | Container mongo up.
nginx_1 | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
kobocat_1 | *** Running /etc/my_init.d/02_wait_for_postgres.bash…
nginx_1 | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
kobocat_1 | Waiting for container postgres.
kobocat_1 | 2021/03/31 17:10:42 Waiting for host: tcp://postgres.censimento.natuplan.private:5432
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
kobocat_1 | 2021/03/31 17:10:42 Connected to tcp://postgres.censimento.natuplan.private:5432
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-init-kobo-nginx.sh
nginx_1 | Creating includes directory
kobocat_1 | Container postgres up.
nginx_1 | Overwriting default nginx configuration
nginx_1 | Clearing out any default configurations
kobocat_1 | Waiting for Postgres service.
enketo_express_1 |
nginx_1 | Proxying to kpi through uWSGI.
kobocat_1 | postgres.censimento.natuplan.private:5432 - accepting connections
nginx_1 | Proxying to kobocat through uWSGI.
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
kobocat_1 | Postgres service running; ensuring kobocat database exists and has PostGIS extensions…
nginx_1 | /docker-entrypoint.sh: Configuration complete; ready for start up
enketo_express_1 | -------------
kobocat_1 | ERROR: database “kobocat” already exists
enketo_express_1 |
kobocat_1 | You are now connected to database “kobocat” as user “kobo”.
enketo_express_1 | /\\\\\\_/\\/\\/\\\\_
kobocat_1 | NOTICE: extension “postgis” already exists, skipping
enketo_express_1 | _/\/////////\_/\\\
/\\\/\///////\_
enketo_express_1 | /\_
/\_/\//\_/\//\_/////\_
kobocat_1 | CREATE EXTENSION
enketo_express_1 | _/\\\\\\/
/\\///\/\/
/\_
/\/
enketo_express_1 | /\/////////
/\_
///\/
/\_/\//_____
kobocat_1 | NOTICE: extension “postgis_topology” already exists, skipping
enketo_express_1 | /\_
/\_////\_/\//_____
kobocat_1 | CREATE EXTENSION
enketo_express_1 | /\_
/\_/\_/\/________
kobocat_1 | NOTICE: extension “fuzzystrmatch” already exists, skipping
enketo_express_1 | /\_/\_/\_/\\\\\\\_
kobocat_1 | CREATE EXTENSION
enketo_express_1 | _////////////////////////
kobocat_1 | NOTICE: extension “postgis_tiger_geocoder” already exists, skipping
enketo_express_1 |
enketo_express_1 |
kobocat_1 | CREATE EXTENSION
enketo_express_1 | Runtime Edition
kobocat_1 | Postgres database kobocat ready for use!
enketo_express_1 |
kobocat_1 | *** Running /etc/my_init.d/03_wait_for_kpi.bash…
enketo_express_1 | PM2 is a Production Process Manager for Node.js applications
kobocat_1 | Waiting for container kpi.
enketo_express_1 | with a built-in Load Balancer.
kobocat_1 | 2021/03/31 17:10:42 Waiting for host: tcp://kpi:8000
enketo_express_1 |
kobocat_1 | 2021/03/31 17:10:51 Connected to tcp://kpi:8000
enketo_express_1 | Start and Daemonize any application:
kobocat_1 | Container kpi up.
enketo_express_1 | $ pm2 start app.js
kobocat_1 | Waiting for kpi web service.
enketo_express_1 |
kobocat_1 | kpi web service ready.
enketo_express_1 | Load Balance 4 instances of api.js:
kobocat_1 | *** Running /etc/my_init.d/10_init_kobocat.bash…
enketo_express_1 | $ pm2 start api.js -i 4
kobocat_1 | KoBoCAT intializing…
enketo_express_1 |
kobocat_1 | Synchronizing database.
enketo_express_1 | Monitor in production:
kobocat_1 | Your environment is:“onadata.settings.kc_environ”
enketo_express_1 | $ pm2 monitor
kobocat_1 | Operations to perform:
enketo_express_1 |
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
enketo_express_1 | Make pm2 auto-boot at server restart:
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
enketo_express_1 | $ pm2 startup
kobocat_1 | Synchronizing apps without migrations:
kobocat_1 | Creating tables…
enketo_express_1 |
enketo_express_1 | To go further checkout:
kobocat_1 | Running deferred SQL…
enketo_express_1 | http://pm2.io/
kobocat_1 | Installing custom SQL…
enketo_express_1 |
kobocat_1 | Running migrations:
enketo_express_1 |
kobocat_1 | No migrations to apply.
enketo_express_1 | -------------
kobocat_1 | Your models have changes that are not yet reflected in a migration, and so won’t be applied.
enketo_express_1 |
enketo_express_1 | pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)
kobocat_1 | Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: Launching in no daemon mode
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: [PM2] This PM2 is not UP TO DATE
kobocat_1 | Running migrations.
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: [PM2] Upgrade to version 4.5.5
kobocat_1 | Your environment is:“onadata.settings.kc_environ”
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: [PM2] Starting /srv/src/enketo_express/app.js in fork_mode (1 instance)
kobocat_1 | Operations to perform:
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: App [enketo:0] starting in -fork mode-
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
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: App [enketo:0] online
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…
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: [PM2] Done.
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: ┌─────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
kobocat_1 | Running deferred SQL…
enketo_express_1 | │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
kobocat_1 | Installing custom SQL…
enketo_express_1 | ├─────┼───────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
kobocat_1 | Running migrations:
enketo_express_1 | │ 0 │ enketo │ default │ 2.5.6 │ fork │ 27 │ 0s │ 0 │ online │ 0% │ 29.0mb │ root │ disabled │
kobocat_1 | No migrations to apply.
enketo_express_1 | └─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
kobocat_1 | Your models have changes that are not yet reflected in a migration, and so won’t be applied.
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: [–no-daemon] Continue to stream logs
kobocat_1 | Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.
enketo_express_1 | 2021-03-31T17:10:43: PM2 log: [–no-daemon] Exit on target PM2 exit pid=1
kobocat_1 | KoBoCat tmp clean-up cron installed
enketo_express_1 | 17:10:45 0|enketo | Worker 1 ready for duty at port 8005! (environment: production)
kobocat_1 | KoBoCAT media automatic backups disabled.
enketo_express_1 | 17:10:45 0|enketo | Worker 3 ready for duty at port 8005! (environment: production)
kobocat_1 | KoBoCAT initialization complete.
enketo_express_1 | 17:10:45 0|enketo | Worker 2 ready for duty at port 8005! (environment: production)
enketo_express_1 | 17:10:45 0|enketo | Worker 4 ready for duty at port 8005! (environment: production)
kobocat_1 | *** Running /etc/my_init.d/10_syslog-ng.init…
kobocat_1 | Mar 31 17:11:02 kobocat syslog-ng[82]: syslog-ng starting up; version=‘3.5.6’
kobocat_1 | Mar 31 17:11:03 kobocat syslog-ng[82]: 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 106
kobocat_1 | Mar 31 17:11:05 kobocat cron[113]: (CRON) INFO (pidfile fd = 3)
kobocat_1 | Mar 31 17:11:05 kobocat cron[113]: (CRON) INFO (Running @reboot jobs)
kobocat_1 | Running kobocat container with uWSGI application server.
kobocat_1 | *** Starting uWSGI 2.0.18 (64bit) on [Wed Mar 31 17:11:05 2021] ***
kobocat_1 | compiled with version: 5.4.0 20160609 on 11 June 2019 18:32:31
kobocat_1 | os: Linux-4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018
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: 4
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 | *** Python threads support is disabled. You can enable it with --enable-threads ***
kobocat_1 | Python main interpreter initialized at 0xa57100
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 0xa57100 pid: 116 (default app)
kobocat_1 | *** uWSGI is running in multiple interpreter mode ***
kobocat_1 | spawned uWSGI worker 1 (and the only) (pid: 116, cores: 1)
kobocat_1 | [uWSGI] getting INI configuration from /srv/src/kobocat/docker/kobocat.ini
kobocat_1 | Mar 31 17:17:01 kobocat CRON[155]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
kobocat_1 | Mar 31 17:50:01 kobocat CRON[158]: (root) CMD (find /tmp/ -mmin +60 -print -delete >/dev/null 2>&1)

Can somebody please help? I have got a tough deadline.

Hello @ramiz ,
Have you tried all the advice I gave earlier in the thread? Especially about http://kc.mydomain.com/service_health/. What does the page report? (use https if you are using https obviously)

2 Likes

Hi @nolive! Thanks for checking, I was making a mistake, it has been solved. I mentioned the solution here: `kobo-install` on a fresh Ubuntu 18.04 LTS VPS - #82 by ramiz

Now I have issues with ssl cert, I am trying to fix it