1. What is the problem? Be very detailed.
Is there any documentation or prior success getting ODK Central running on a Raspberry Pi?
2. What app or server are you using and on what device and operating system? Include version numbers.
Any support OS, Raspbian, Ubuntu etc as the Raspberry Pi 4 with 8Gb Ram makes for a great portable server and/or low power lite server. 3. What you have you tried to fix the problem?
I can't find any definitive answer on if it should/does work or not? 4. What steps can we take to reproduce the problem?
5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
Thanks Florian
Looks like it won't run on Arm architecture unless it was compiled to do so. I have ordered a Rock Pi X SBC which is x86 and should be able to serve the desired purpose.
Thanks you for the link!
Possible, but would need the compose file changing for an ARM architecture?
From what I have read it looks like the build scripts for compose are for a specific architecture. I am not a developer, so easiest path for me is to use an x86 SBC instead.
I think you are right that there would have to be a Central image available that is compatible with ARM. But hopefully the dev team would support that. I could raise it at a TAB meeting if it's something you want to pursue.
Thanks Freddy
Great info and Aggregate has proved a very reliable and stable platform.
Given the extra functionality of the Central server, that is what I was shooting for however.
Absolutely I would very much like to pursue this as I have a number of Raspberry Pi's that I could deploy as remote servers.
I ha e ordered a Rock Pi X and will update progress with that and Central when it arrives, but given the large community around the Raspberry Pi, this would make a more appealing platform longer term.
OK, I had an hour spare so - this is what I did / got. All commands executed as a root user:
Steps followed:
Installed Raspberry Pi OS 2020-08-20 Kernel 5.4, a clean build with apt-get update run (14/10/20)
Connected to network and system name set ODKCentServ
Installed Docker & Compose with the following commands:
a. curl -sSL https://get.docker.com | sh
b. sudo usermod -aG docker pi
Rebooted and tested:
a. tested with: docker run hello-world
b. Result – successfully pulled and ran hello-world
Added dependancies
a. sudo apt-get install -y libffi-dev libssl-dev
b. sudo apt-get remove python-configparser
Rebooted and added Compose
a. sudo pip3 -v install docker-compose
Enabled docker at startup with
a. Systemctl enable docker
Downloaded Central
a. git clone https://github.com/getodk/central
b. git submodule update -i
c. edited the .env file with SSL=letsencrypt and DOMAIN=mydomain and SYSADMIN_EMAIL=myemail
Rebooted, ran Compose from the central directory
a. Docker-compose build
Scripts failed at step 7 with:
Step 7/11: Run apt-get; update; apt-get install gettext-base
- Running in a6df92748e28
Standard_init_linux.go:211: exec user process caused “exec format error”
ERORR: Service ‘enketo’ failed to build: The command ‘/bin/sh -c apt-get update; apt-get install gettext-base’ returned a non-zero code: 1
Install gettext-base returns:
Gettext-base is already the newest version (0.19.8.1-9).
Gettext-base set to manually installed.
The following packages were automatically installed and are no longer required:
Libjs-sphinxdoc libjs-underscore python-dbus python-secretstorage
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
With the -y switch same as above.
After running apt autoremove and re-running install gettext-base:
The command returns without the information.
After reboot run docker-compose build again, it fails at 7/11 with a similar message, being:
---> Running in a8c3aa273df7
standard_init_linux.go:211: exec user process caused "exec format error"
ERROR: Service 'ebketo' failed to build: The command '/bin/sh -c apt-get update; apt-get install gettext-base' returned a non-zero code: 1
When I rerun ... install gettext-base I get a normal response, being:
...
Gettext-base is already the newest version (0.19.8.1-9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
So the autoremove was run the non-standard information was removed and install gettext-base returns without the additional information and looks a pretty normal return.
When you run apt install gettext-base successfully, is that running in the base OS of your Raspberry?
When the enketo image fails to build at the gettext install (here), the build environment is the base image (ODK builds image enketo FROM enketo/enketo-express:2.3.12), which again is based on docker-node (enketo Dockerfile), which seems to build on Debian buster (Dockerfile for node buster), (continue down the rabbithole...).
If you chase down the dependencies of the enketo Dockerfile until you find the actual build environment, does that environment have the package repo for gettext defined or could we need an add-apt repository ... to add the repo in the ODK Central enketo dockerfile?
OK, not a developer so you may have to help me out here.
I have found a file called 2.3.12, but when opening this with nano it only has a string in it.
It was in
/var/lib/docker/overlays/long string/diff/srv/src/enketo_express/.git/refs/tags/
I have searched for a file called Dockerfile (and dockerfile) but can't find anything.
What file am I looking for and is it human readable?
Ah, sorry for the jargon
What I meant was: when you're running docker-compose build, doesn't the failing command Step 7/11: Run apt-get update; apt-get install gettext-base run inside a Docker image and not in your Raspberry Pi's operating system (Raspberry Pi OS 2020-08-20 Kernel 5.4). If I understood that right, the failing command runs inside the virtual Debian image underneath enketo-express, while the passing command runs in your Pi's operating system. @yanokwa is that correct?
The links in my previous post traverse through the Dockerfiles used to build the image:
enketo-express in turn says here to use node:12 as base image
If you follow the Node Dockerhub repo links (this is where I might have gotten lost) to the Dockerfile for tag 12, you find that this builds off buildpack-stretch, but also adds repo keys like here which enables that image to apt-get install packages from those repos
Follow that rabbit hole by searching the base Docker images through Debian until you hit the base image "scratch" and bingo, it's pretty much a basic Debian OS.
To install gettext-base inside a virtual Debian stretch, according to https://packages.debian.org/stretch/gettext-base the supported architectures are listed there (Pi is ARM, right?), and there's a dependency to libc6. So what is failing?