question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot start Kolibri after upgrading Kolibri 0.14.7 to Kolibri 0.15.0 beta2

See original GitHub issue

Observed behavior

I’m getting a database error when I attempt to start Kolibri after an upgrade from the 0.14.7 version to 0.15.0 beta2

Expected behavior

It should be possible to upgrade the 0.14 version of Kolibri to the 0.15 version

Steps to reproduce the issue

  1. Install the a 0.14.7 version of Kolibri from here.
  2. Setup a facility, create classes, users, lesson etc and perform some user interactions such as completing a lesson or a quiz.
  3. Upgrade to the 0.15 version by Installing the following build..
  4. Attempt to start the Kolibri server.

Additional information

Console info when I execute the kolibri start --foreground command in Ubuntu:

le@osboxes:~$ kolibri start --foreground
INFO     Option DEBUG in section [Server] being overridden by environment variable KOLIBRI_DEBUG
INFO     Option DEBUG_LOG_DATABASE in section [Server] being overridden by environment variable KOLIBRI_DEBUG_LOG_DATABASE
/usr/lib/python3/dist-packages/kolibri/dist/rest_framework/utils/serializer_helpers.py:107: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if value is None or value is '':
INFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     Backed up database to: /home/le/.kolibri/backups/db-v0.14.7_2021-11-25_16-17-29.dump
INFO     Version was 0.14.7, new version: 0.15.0b2
INFO     Running update routines for new version...
Operations to perform:
  Apply all migrations: admin, analytics, auth, bookmarks, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, notifications, sessions
Running migrations:
  No migrations to apply.
Operations to perform:
  Apply all migrations: admin, analytics, auth, bookmarks, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, notifications, sessions
Running migrations:
  No migrations to apply.
Operations to perform:
  Apply all migrations: admin, analytics, auth, bookmarks, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, notifications, sessions
Running migrations:
  No migrations to apply.
Operations to perform:
  Apply all migrations: admin, analytics, auth, bookmarks, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, notifications, sessions
Running migrations:
  No migrations to apply.
Installed 2 object(s) from 1 fixture(s)
Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/kolibri/utils/cli.py", line 193, in invoke
    initialize(**get_initialize_params())
  File "/usr/lib/python3/dist-packages/kolibri/utils/main.py", line 268, in initialize
    update(version, kolibri.__version__)
  File "/usr/lib/python3/dist-packages/kolibri/utils/main.py", line 326, in update
    run_upgrades(old_version, new_version)
  File "/usr/lib/python3/dist-packages/kolibri/core/upgrade.py", line 156, in run_upgrades
    version_upgrade()
  File "/usr/lib/python3/dist-packages/kolibri/core/upgrade.py", line 51, in __call__
    return self.upgrade()
  File "/usr/lib/python3/dist-packages/kolibri/core/content/upgrade.py", line 306, in metadata_annotation_update
    get_all_contentnode_label_metadata()
  File "/usr/lib/python3/dist-packages/kolibri/core/content/utils/search.py", line 122, in get_all_contentnode_label_metadata
    return get_available_metadata_labels(
  File "/usr/lib/python3/dist-packages/kolibri/core/content/utils/search.py", line 86, in get_available_metadata_labels
    content_cache_key = ContentCacheKey.get_cache_key()
  File "/usr/lib/python3/dist-packages/kolibri/core/device/models.py", line 159, in get_cache_key
    cache.set(CONTENT_CACHE_KEY_CACHE_KEY, key, 5000)
  File "/usr/lib/python3/dist-packages/kolibri/dist/diskcache/djangocache.py", line 147, in set
    return self._cache.set(key, value, timeout, read, tag, retry)
  File "/usr/lib/python3/dist-packages/kolibri/dist/diskcache/fanout.py", line 97, in set
    return shard.set(key, value, expire, read, tag, retry)
  File "/usr/lib/python3/dist-packages/kolibri/dist/diskcache/core.py", line 836, in set
    self._row_update(rowid, now, columns)
  File "/usr/lib/python3/dist-packages/kolibri/dist/diskcache/core.py", line 860, in _row_update
    sql('UPDATE Cache SET'
sqlite3.DatabaseError: database disk image is malformed

Complete Windows 10 and Ubuntu folders with DBs and logs: https://drive.google.com/drive/folders/1ZWYLxZ24lghoBfYbyCU1b71YaMw5eJub?usp=sharing

Usage Details

  • OS: Windows 10, Ubuntu 20
  • Browser: Chrome

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rtibblescommented, Dec 1, 2021

OK, interesting - this is a completely different error to the one reported above, which makes me suspect that the original error might be a VirtualBox file system specific issue.

1reaction
pcenovcommented, Dec 1, 2021

Note that the issue is observed on a real device running Windows 10. Here’s the errors I get upon starting Kolibri 0.15 beta2:


<details>
<summary>Details</summary>

C:\Users\pcenov>kolibri start --foreground
←[37mINFO     Option DEBUG in section [Server] being overridden by environment variable KOLIBRI_DEBUG←[0m
←[37mINFO     Option DEBUG_LOG_DATABASE in section [Server] being overridden by environment variable KOLIBRI_DEBUG_LOG_DATABASE←[0m
←[37mINFO     Option RUN_MODE in section [Deployment] being overridden by environment variable KOLIBRI_RUN_MODE←[0m
←[37mINFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base←[0m
←[37mINFO     Detected updates to plugins: kolibri.plugins.user_auth, kolibri.plugins.perseus_viewer, kolibri.plugins.user_profile←[0m
←[37mINFO     Running installation routines for kolibri.plugins.user_auth, installing 0.15.0b2←[0m
←[37mINFO     kolibri.plugins.user_auth successfully updated←[0m
←[37mINFO     Running installation routines for kolibri.plugins.perseus_viewer, installing 0.15.0b2←[0m
←[37mINFO     kolibri.plugins.perseus_viewer successfully updated←[0m
←[37mINFO     Running installation routines for kolibri.plugins.user_profile, installing 0.15.0b2←[0m
←[37mINFO     kolibri.plugins.user_profile successfully updated←[0m
←[37mINFO     Importing 'tasks' module from django apps←[0m
←[37mINFO     Starting Kolibri 0.15.0b2←[0m
←[37mINFO     Bus state: ENTER←[0m
←[37mINFO     Listening for SIGTERM.←[0m
←[37mINFO     Listening for SIGINT.←[0m
←[37mINFO     Bus state: IDLE←[0m
←[37mINFO     Bus state: START←[0m
←[31mERROR    Error in 'START' listener <bound method ServicesPlugin.START of <kolibri.utils.server.ServicesPlugin object at 0x00000176115AA588>>
Traceback (most recent call last):
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\engine\base.py", line 1284, in _execute_context
    cursor, statement, parameters, context
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\engine\default.py", line 590, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: scheduledjobs.saved_job

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\python36\lib\site-packages\kolibri\dist\magicbus\base.py", line 273, in publish
    result = listener(*args, **kwargs)
  File "c:\python36\lib\site-packages\kolibri\utils\server.py", line 255, in START
    schedule_ping()
  File "c:\python36\lib\site-packages\kolibri\core\analytics\utils.py", line 533, in schedule_ping
    kwargs=dict(started=started, server=server, checkrate=checkrate),
  File "c:\python36\lib\site-packages\kolibri\core\tasks\job.py", line 402, in enqueue_at
    repeat=repeat,
  File "c:\python36\lib\site-packages\kolibri\core\tasks\scheduler.py", line 131, in enqueue_at
    dt, func, interval=interval, repeat=repeat, *args, **kwargs
  File "c:\python36\lib\site-packages\kolibri\core\tasks\scheduler.py", line 176, in schedule
    session.merge(scheduled_job)
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\session.py", line 2155, in merge
    _resolve_conflict_map=_resolve_conflict_map,
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\session.py", line 2228, in _merge
    merged = self.query(mapper.class_).get(key[1])
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\query.py", line 1021, in get
    return self._get_impl(ident, loading.load_on_pk_identity)
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\query.py", line 1138, in _get_impl
    return db_load_fn(self, primary_key_identity)
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\loading.py", line 287, in load_on_pk_identity
    return q.one()
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\query.py", line 3436, in one
    ret = self.one_or_none()
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\query.py", line 3405, in one_or_none
    ret = list(self)
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\query.py", line 3481, in __iter__
    return self._execute_and_instances(context)
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\orm\query.py", line 3506, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\engine\base.py", line 1020, in execute
    return meth(self, multiparams, params)
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\sql\elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\engine\base.py", line 1139, in _execute_clauseelement
    distilled_params,
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\engine\base.py", line 1324, in _execute_context
    e, statement, parameters, cursor, context
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\engine\base.py", line 1518, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\util\compat.py", line 178, in raise_
    raise exception
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\engine\base.py", line 1284, in _execute_context
    cursor, statement, parameters, context
  File "c:\python36\lib\site-packages\kolibri\dist\sqlalchemy\engine\default.py", line 590, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: scheduledjobs.saved_job
[SQL: SELECT scheduledjobs.id AS scheduledjobs_id, scheduledjobs.interval AS scheduledjobs_interval, scheduledjobs.repeat AS scheduledjobs_repeat, scheduledjobs.queue AS scheduledjobs_queue, scheduledjobs.saved_job AS scheduledjobs_saved_job, scheduledjobs.scheduled_time AS scheduledjobs_scheduled_time
FROM scheduledjobs
WHERE scheduledjobs.id = ?]
[parameters: ('0',)]
(Background on this error at: http://sqlalche.me/e/e3q8)
←[0m
←[37mINFO     Started monitor thread 'ProcessControlPlugin'.←[0m
←[37mINFO     Started monitor thread 'ZeroConfPlugin'.←[0m
←[37mINFO     Starting on 0.0.0.0:63960←[0m
←[37mINFO     Waiting for 0.0.0.0:63960←[0m
←[37mINFO     Serving on 0.0.0.0:63960←[0m
←[37mINFO     Starting on 0.0.0.0:8080←[0m
←[37mINFO     Waiting for 0.0.0.0:8080←[0m
←[37mINFO     Serving on 0.0.0.0:8080←[0m
←[37mINFO     Registering ourselves to zeroconf network with id 'd0f3c74fefb9824217f2e14830463eed' and port '8080'←[0m
INFO: 192.168.100.8 - - "PUT /api/auth/session/current/" 200 0 "http://192.168.100.2:8080/en/learn/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15"
←[37mINFO     Kolibri running on: http://192.168.100.2:8080/←[0m
←[37mINFO     Kolibri running on: http://169.254.88.90:8080/←[0m
←[37mINFO     Kolibri running on: http://127.0.0.1:8080/←[0m
←[37mINFO     Kolibri running on: http://192.168.56.1:8080/←[0m
←[37mINFO     Kolibri running on: http://169.254.136.108:8080/←[0m
←[37mINFO     Kolibri running on: http://169.254.110.72:8080/←[0m
←[37mINFO     Kolibri running on: http://169.254.49.49:8080/←[0m
←[37mINFO     Kolibri running on: http://169.254.117.183:8080/←[0m
←[37mINFO     Bus state: START_ERROR←[0m
←[31mERROR    Exiting due to error in start listener:
Traceback (most recent call last):
  File "c:\python36\lib\site-packages\kolibri\dist\magicbus\base.py", line 215, in _transition
    return self.publish(newstate, *args, **kwargs)
  File "c:\python36\lib\site-packages\kolibri\dist\magicbus\base.py", line 291, in publish
    raise exc
magicbus.base.ChannelFailures: OperationalError('(sqlite3.OperationalError) no such column: scheduledjobs.saved_job',)
←[0m
←[37mINFO     Bus state: STOP←[0m
←[37mINFO     HTTP Server kolibri.utils.server.Server(('0.0.0.0', 63960)) shut down←[0m
←[37mINFO     HTTP Server kolibri.utils.server.Server(('0.0.0.0', 8080)) shut down←[0m
←[37mINFO     Joining 'ProcessControlPlugin'←[0m
←[37mINFO     Kolibri instance '77793d82a5b9eaea1054752ac716d4cd' joined zeroconf network; device info: {'application': 'kolibri', 'kolibri_version': '0.15.0b2', 'instance_id': '77793d82a5b9eaea1054752ac716d4cd', 'device_name': 'osboxes', 'operating_system': 'Linux', 'subset_of_users_device': False}←[0m
←[37mINFO     Stopped thread 'ProcessControlPlugin'.←[0m
←[37mINFO     Joining 'ZeroConfPlugin'←[0m
←[37mINFO     Stopped thread 'ZeroConfPlugin'.←[0m
←[37mINFO     Bus state: IDLE←[0m
←[37mINFO     Bus state: EXIT←[0m
←[37mINFO     Waiting for child threads to terminate...←[0m
←[37mINFO     Bus state: EXITED←[0m

</details>

Logs and DB file: Win10LogsAndDB.zip

@radinamatic

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed 0.15 beta installation - Kolibri
Did you perhaps stop Kolibri prior to your attempt at installing the beta? I'm wondering if that could be an issue. Here are...
Read more >
Troubleshooting — Kolibri User Guide - Read the Docs
If you are trying to export on an attached USB drive, and Kolibri displays the message Could not find a writable drive connected...
Read more >
Kolibri User Guide - Read the Docs
Once the installation of the upgrade is nished, Kolibri will auto-start and open in ... Device super admin credentials cannot be retrieved when...
Read more >
Kolibri Install and Introduction (2021) - YouTube
In this video we will install and take a look at the latest version v0.14.7 of Kolibri by Learning Equality. We will be...
Read more >
ricecooker - PyPI
IMPORT the the channel into Kolibri using the channel token displayed in Kolibri Studio after the PUBLISH step is done. The diagram below...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found