Kobo Docker issues ...

571 views
Skip to first unread message

Donald Lobo

unread,
May 13, 2016, 4:25:00 PM5/13/16
to Kobo Users

hey folks:

(sorry, posted on the forums, but i think the group is a better place for these questions). i'll summarize the answer/solution and re-post on the forum

1. Got the latest code from git for the kobo-docker: https://github.com/kobotoolbox/kobo-docker

2. Followed the instructions from there for localhost hosting

3. Modified the envfile.local.txt, to use localhost and gave some trivial keys/tokens

4. ran docker-compose up which started various processes

5. Can create and edit a form, i.e. 127.0.0.1:8000 works (however localhost:8000 does not)

6. Can not preview form (gives error could not contact server)

7. the command

$ docker exec -it kobodocker_kpi_1 ping -c 1 kobocat-test.cruncher.ch 

works fine

8. Clicking on projects tab goes here:


which gives a Bad Gateway Error

9. 

$ docker-compose logs

gives this error at the very end 

kobocat_1         |     __import__(name)
kobocat_1         |   File "./onadata/apps/survey_report/views.py", line 24, in <module>
kobocat_1         |     from formpack import FormPack
kobocat_1         | ImportError: No module named formpack
kobocat_1         | [pid: 199|app: 0|req: 8/18] 172.17.0.1 () {44 vars in 939 bytes} [Fri May 13 16:22:49 2016] GET /kobo/ => generated 0 bytes in 23 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)

i'm a developer, so i can debug stuff if needed. Any clues on what i can do next to make progress

thanx

lobo

Donald Lobo

unread,
May 13, 2016, 4:50:52 PM5/13/16
to Kobo Users

an update on this:

i attached to the kobocat docker image:

$ docker exec -i -t kobodocker_kobocat_1 /bin/bash

and then ran the command

root@kobocat:/srv/src/kobocat# pip install -e git+https://github.com/kobotoolbox/formpack.git#egg=formpack

and that got me the projects page:


(note that the settings still does not work)

The formpack line above has been commented out from: requirements/base.pip

not sure why :(

I'll report back when i've got the preview form working

lobo

Donald Lobo

unread,
May 13, 2016, 5:22:43 PM5/13/16
to Kobo Users

one more discovery:

To preview the form, a call is made to:

enketo-express @ port 8005


however, the enketo machine, cannot reference the kobocat machine (unless there is port forwarding setup at port 8000). When i attach to the enketo image, a wget on that url gives me a connection refused

I think i'm reaching the limits of what i can discover :(

lobo

Esmail Fadae

unread,
May 18, 2016, 10:53:12 AM5/18/16
to Kobo Users
Hi, Donald. Apologies for the delay in responding to you. The KoBoCAT issue, as you discovered, was due to the `formpack` dependency not having been installed; this is now fixed in the latest `kobocat` Docker image.

The issue with previewing is due to following our recommendation to use 127.0.0.1 when not connected to a network or not wanting other devices on the network to access your KoBo Toolbox instance. Each Docker container gets it's own individual address on the same subnet as the main Docker network interface, so requests to 127.0.0.1 (or localhost) from a container are probably just coming back to the same container. I've written and tested updated instructions for this non-shared scenario in the repo; you can see them here: https://github.com/kobotoolbox/kobo-docker/commit/fd787e9a65010d05e68bdded4a911f678badcc7c

Donald Lobo

unread,
May 18, 2016, 12:09:32 PM5/18/16
to Kobo Users

great thanx

pulled in all the new images, update git repository and things are looking good

i'll start another thread on some plans / thoughts of what we'd like to do / contribute :)

lobo

Donald Lobo

unread,
May 18, 2016, 12:12:45 PM5/18/16
to Kobo Users


one small error still remains

going to the settings page:


gives me a 404

i can investigate later, but in case you know of a quick easy fix

lobo

Esmail Fadae

unread,
May 18, 2016, 5:00:52 PM5/18/16
to Kobo Users
The URI is supposed to be `kobo/settings/`, so you can manually enter that for the time being. This should be fixed in the latest KPI source, but we don't have images for it yet; hopefully in the next day or two.

Donald Lobo

unread,
May 18, 2016, 5:09:11 PM5/18/16
to Kobo Users

great, that worked. thanx for the quick response 

lobo


--
You received this message because you are subscribed to a topic in the Google Groups "Kobo Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kobo-users/UvTyhVTrVA8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kobo-users+...@googlegroups.com.
To post to this group, send email to kobo-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kobo-users.
For more options, visit https://groups.google.com/d/optout.

allan gladwel

unread,
May 19, 2016, 4:47:20 PM5/19/16
to Kobo Users
Hi am having almost the same error with kobocat..

Server Error (500)

I had already logged in for the first time and uploaded a form but the form could not be deployed..upon refreshing the  8000 page i received the error.
here are the logs
kobocat_1         | Trying again in 14.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:42:58,576: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 16.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:43:17,611: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 18.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:43:38,643: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 20.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:44:01,679: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 22.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:44:26,718: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 24.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:44:53,749: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 26.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:45:22,790: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 28.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:45:53,829: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 30.00 seconds...
kobocat_1         | 
kobocat_1         | [2016-05-19 16:46:26,868: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672//: Couldn't log in: a socket error occurred.
kobocat_1         | Trying again in 32.00 seconds...
kobocat_1         | 

I have tried pulling new images again but to no avail.
Kindly assist as soon as possible

Esmail Fadae

unread,
May 20, 2016, 1:32:25 PM5/20/16
to Kobo Users
Thanks for letting us know, Allan. This was a regression due to the upgrade to RabbitMQ 3.4+. The fix is already up in the `kobo-docker` repo (https://github.com/kobotoolbox/kobo-docker/commit/a117ea2b9c048dc4aba28c020855ab6c14b51e29); just waiting on the `rabbit` image to be rebuilt in the next hour or so (https://hub.docker.com/r/kobotoolbox/rabbit/builds/).

If you have any new issues, feel free to open up another thread.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages