Upgrading ODK Central from 1.1.1 to 1.3.3

Recently I started to upgrade my ODK Server from v 1.1.1 up to 1.3.3
According to documentation Upgrading to Central v1.3 one need first upgrade docker-compose to v1.28.3 or later. While running the cURL I got the error

...failed writing body.

According to https://stackoverflow.com/a/28879552 the piped program closes the read pipe before the previous program is finished writing the whole page so the solution is adding | tac | tac | before the -o so use following code if you face the same problem

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" | tac | tac | -o /usr/local/bin/docker-compose

Hope this helps those who face the problems with upgrading


The docker-compose upgrade instructions are from https://docs.docker.com/compose/install/#install-compose-on-linux-systems. I'm sure they would appreciate it if you filed an issue to request changes.

1 Like

I think the likely root cause is that /usr/local/bin/docker-compose already exists, so I'd do this first before the curl command.

rm /usr/local/bin/docker-compose
rm /usr/bin/docker-compose

You're right, deleting the docker-compose from the bin solves the problem.

1 Like

Additional note.
If you are using the basic option in DigitalOcean (1GB CPU and 1GB Memory) most probably you'll face a problem with building an image (docker-compose build). The solution is to resize your droplet in DigitalOcean (I tested with 2GB CPU and 2GB Memory)

Then try docker-compose build
When you have successfully built the image you can continue the upgrading :

...Next, you need to do a little bit of maintenance. Run docker prune. If it thinks prune is not a docker command, run docker image prune instead. You'll be asked to confirm the removal of all dangling images. Agree by typing the letter y and pressing Enter.

Finally, restart the running server to pick up the changes: docker-compose stop and docker-compose up -d

When you see that your server is functioning you can resize back your Droplet.

Hope this helps.