[RESOLVED] Failed upgrade to kolibri-server 0.3.7-0ubuntu1

I was remotely attempting to upgrade Kolibri server in Papua, Indonesia and got errors from apt upgrade for kolibri-server 0.3.7-0ubuntu1

I made basic mistake of not making snapshot before upgrade attempt

This is apt log of failed upgrade

Blockquote
Log started: 2021-11-04 20:14:16
(Reading database …
(Reading database … 5%
(Reading database … 10%
(Reading database … 15%
(Reading database … 20%
(Reading database … 25%
(Reading database … 30%
(Reading database … 35%
(Reading database … 40%
(Reading database … 45%
(Reading database … 50%
(Reading database … 55%
(Reading database … 60%
(Reading database … 65%
(Reading database … 70%
(Reading database … 75%
(Reading database … 80%
(Reading database … 85%
(Reading database … 90%
(Reading database … 95%
(Reading database … 100%
(Reading database … 122071 files and directories currently installed.)
Preparing to unpack …/0-ubuntu-advantage-tools_27.3~20.04.1_amd64.deb …
Unpacking ubuntu-advantage-tools (27.3~20.04.1) over (27.2.2~20.04.1) …
Preparing to unpack …/1-linux-base_4.5ubuntu3.7_all.deb …
Unpacking linux-base (4.5ubuntu3.7) over (4.5ubuntu3.6) …
Preparing to unpack …/2-linux-firmware_1.187.20_all.deb …
Unpacking linux-firmware (1.187.20) over (1.187.19) …
Preparing to unpack …/3-cloud-initramfs-copymods_0.45ubuntu2_all.deb …
Unpacking cloud-initramfs-copymods (0.45ubuntu2) over (0.45ubuntu1) …
Preparing to unpack …/4-cloud-initramfs-dyn-netconf_0.45ubuntu2_all.deb …
Unpacking cloud-initramfs-dyn-netconf (0.45ubuntu2) over (0.45ubuntu1) …
Preparing to unpack …/5-overlayroot_0.45ubuntu2_all.deb …
Unpacking overlayroot (0.45ubuntu2) over (0.45ubuntu1) …
Setting up linux-base (4.5ubuntu3.7) …
Setting up linux-firmware (1.187.20) …
update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
update-initramfs: Generating /boot/initrd.img-5.4.0-88-generic
Setting up cloud-initramfs-copymods (0.45ubuntu2) …
Setting up cloud-initramfs-dyn-netconf (0.45ubuntu2) …
Setting up ubuntu-advantage-tools (27.3~20.04.1) …
Installing new version of config file /etc/logrotate.d/ubuntu-advantage-tools …
Installing new version of config file /etc/ubuntu-advantage/help_data.yaml …
Installing new version of config file /etc/ubuntu-advantage/uaclient.conf …
Created symlink /etc/systemd/system/timers.target.wants/ua-timer.timer → /lib/systemd/system/ua-timer.timer.
Created symlink /etc/systemd/system/multi-user.target.wants/ua-license-check.path → /lib/systemd/system/ua-license-check.path.
Setting up overlayroot (0.45ubuntu2) …
Processing triggers for man-db (2.9.1-1) …
Processing triggers for initramfs-tools (0.136ubuntu6.6) …
update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
Log ended: 2021-11-04 20:15:29

Blockquote Log started: 2021-11-05 19:26:56
Selecting previously unselected package anacron.
(Reading database …
(Reading database … 5%
(Reading database … 10%
(Reading database … 15%
(Reading database … 20%
(Reading database … 25%
(Reading database … 30%
(Reading database … 35%
(Reading database … 40%
(Reading database … 45%
(Reading database … 50%
(Reading database … 55%
(Reading database … 60%
(Reading database … 65%
(Reading database … 70%
(Reading database … 75%
(Reading database … 80%
(Reading database … 85%
(Reading database … 90%
(Reading database … 95%
(Reading database … 100%
(Reading database … 122096 files and directories currently installed.)
Preparing to unpack …/anacron_2.3-29_amd64.deb …
Unpacking anacron (2.3-29) …
Preparing to unpack …/kolibri-server_0.3.7-0ubuntu1_all.deb …
Unpacking kolibri-server (0.3.7-0ubuntu1) over (0.3.6-0ubuntu1) …
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/yo’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/vi’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/ur-PK’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/te’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/sw-TZ’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/pt-BR’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/ny’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/my’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/mr’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/la’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/ko’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/hi’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/gu-IN’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/fr’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/fa’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/es-ES’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/bn’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/bg’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages/ar’: Directory not empty
e[1mdpkg:e[0m e[1;33mwarning:e[0m unable to delete old directory ‘/etc/kolibri/dist/error_pages’: Directory not empty
Setting up anacron (2.3-29) …
Created symlink /etc/systemd/system/multi-user.target.wants/anacron.service → /lib/systemd/system/anacron.service.
Created symlink /etc/systemd/system/timers.target.wants/anacron.timer → /lib/systemd/system/anacron.timer.
Setting up kolibri-server (0.3.7-0ubuntu1) …
Installing new version of config file /etc/init.d/kolibri-server …
Installing new version of config file /etc/kolibri/dist/nginx.conf …
Installing new version of config file /etc/kolibri/dist/uwsgi.ini …
Traceback (most recent call last):
File “/usr/share/kolibri-server/kolibri_server_setup.py”, line 8, in
from kolibri.core.analytics.measurements import get_machine_info
File “/usr/lib/python3/dist-packages/kolibri/core/analytics/measurements.py”, line 6, in
from django.contrib.sessions.models import Session
File “/usr/lib/python3/dist-packages/kolibri/dist/django/contrib/sessions/models.py”, line 3, in
from django.contrib.sessions.base_session import (
File “/usr/lib/python3/dist-packages/kolibri/dist/django/contrib/sessions/base_session.py”, line 30, in
class AbstractBaseSession(models.Model):
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/base.py”, line 110, in new
app_config = apps.get_containing_app_config(module)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/apps/registry.py”, line 247, in get_containing_app_config
self.check_apps_ready()
File “/usr/lib/python3/dist-packages/kolibri/dist/django/apps/registry.py”, line 125, in check_apps_ready
raise AppRegistryNotReady(“Apps aren’t loaded yet.”)
django.core.exceptions.AppRegistryNotReady: Apps aren’t loaded yet.
e[0me[1mdpkg:e[0m error processing package kolibri-server (–configure):
installed kolibri-server package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.9.1-1) …
Processing triggers for systemd (245.4-4ubuntu3.13) …
Errors were encountered while processing:
kolibri-server
Log ended: 2021-11-05 19:27:11

The server now will not start and the Starting Kolibri page is displayed when trying to access server with browser

This is server info
kolibri-info-Oct2021

I took a look at kolibri.txt in log files, but the last entries were before the reboot.

May I please ask for assistance in beginning the troubleshooting process?

Is there a way to rollback to the previous 0.3.6 version?

Thank you
David

hi @mrdavidhaag , yes , of course it’s possible, but I’d need to know the version of Ubuntu you have.
I also would like to be able to reproduce the issue to fix it. Can you confirm you are using a clean installation without changing manually anything in the configs?

Thanks
José

Hello Jose,
Thank you for the prompt response.

The Kolibri server resides in a VM in Proxmox server. This is the release info from the Ubuntu VM that runs the Kolibri server

Blockquote
kolibri@kol-oa:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

The only changes I can recall making to Ubuntu server was to remove the Cloud-init

The upgrade process today was through apt upgrade without any intervention

The Kolibri server is the server version of Kolibri and we chose to change configuration to store the content files in separate storage drive

I hope I have answered your questions properly. If more information is needed, please let me know

Kind regards,
David

Thanks @mrdavidhaag for your feedback.
I apologize for the problem you’ve had. It’s an issue introduced in the last version of the package affecting your Ubuntu version. The problem is fixed and you should be able to be working again after doing

apt-get update
apt install kolibri-server

Best
José

Thank you so much for your help.

I will perform the update once the server power is on later today.

Success!! Thank you

The upgrade this time returned the following information

kolibri@kol-oa:~$ sudo apt install kolibri-server
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be upgraded:
kolibri-server
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 22.3 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 Index of /learningequality/kolibri/ubuntu focal/main amd64 kolibri-server all 0.3.8-0ubuntu1 [22.3 kB]
Fetched 22.3 kB in 2s (14.2 kB/s)
Preconfiguring packages …
(Reading database … 122137 files and directories currently installed.)
Preparing to unpack …/kolibri-server_0.3.8-0ubuntu1_all.deb …
Unpacking kolibri-server (0.3.8-0ubuntu1) over (0.3.7-0ubuntu1) …
Setting up kolibri-server (0.3.8-0ubuntu1) …
Installing new version of config file /etc/init.d/kolibri-server …
WARNING Options file /home/kolibri/.kolibri/options.ini has been updated; server restart is required before change will take effect.
WARNING Options file /home/kolibri/.kolibri/options.ini has been updated; server restart is required before change will take effect.
Processing triggers for systemd (245.4-4ubuntu3.13) …
kolibri@kol-oa:

The Kolibri server was working before I rebooted. Proceeded with reboot and all seems to be working well.

Info from Device Page is:

Version: 0.14.7
OS: Linux-5.4.0-89-generic-x86_64-with-glibc2.29
Python: 3.8.10
Installer: kolibri(apt) with kolibri-server Version: 0.3.8-0ubuntu1
Server: nginx/1.18.0 (Ubuntu)
Database: /home/kolibri/.kolibri/db.sqlite3
Free disk space: 310 GB
Server time: Sat Nov 06 2021 05:07:09 GMT+0900 (Japan Standard Time)
Server timezone: Asia/Jayapura
Device ID: 1a7cfa3ad9fc1886fccc88287c50efd4

Thank you again for the quick fix and expert help.
Thank you for your time and dedication to helping others.

Blessings,
David