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.

How do we fix Kolibri Channel Import failures with http://box/kolibri configured by KOLIBRI_URL_PATH_PREFIX=/kolibri ?

See original GitHub issue

Thanks to @shanti-bhardwa who helped spell out this longstanding issue, and also @jvonau, @tim-moody who both reconfirmed!

The solution might not be simple (?) but let’s try to find a way forward here together — as there are a quickly growing number of Internet-in-a-Box communities around the world using Kolibri:

PROBLEM SUMMARY: If you try to import a Kolibri channel using Kolibri > Channels > Import > Select a source > “Local network or internet”, it will fail as the other Kolibri machine’s KOLIBRI_URL_PATH_PREFIX=/kolibri is somehow being ignored:

  • The problem occurs when The Other Kolibri Machine has the form http://box/kolibri
  • Whereas if The Other Kolibri Machine is manually hacked to instead run Kolibri on http://box:8009, the channel import then works.

BACKGROUND: KOLIBRI_URL_PATH_PREFIX=/kolibri is installed within /etc/systemd/system/kolibri.service whenever you install Internet-in-a-Box, as seen on Line 10 below.

[Unit]
Description=Kolibri

[Service]
Type=forking
RemainAfterExit=yes
Environment=KOLIBRI_USER=kolibri
Environment=KOLIBRI_HOME=/library/kolibri
Environment=KOLIBRI_HTTP_PORT=8009
Environment=KOLIBRI_URL_PATH_PREFIX=/kolibri
User=kolibri
Group=www-data
# 2020-10-03: Kolibri was timing out on RaspiOS & Ubuntu 20 NUC: iiab/iiab#2555
TimeoutStartSec=1200
# The following is the systemd default, which is too much for most teachers in
# low-electricity environments (30-60 sec is about all they can handle before
# pulling the power cord, typically every hour at the end of class).  But since
# 90 seconds is the Linux / systemd default, it's prob good enough for now:
# TimeoutStopSec=90
# 2020-04-18 @jvonau: comment out both timeouts for now, in favor of 90 seconds
# or whatever systemd / Kolibri favor? https://github.com/iiab/iiab/issues/2318
# TimeoutStartSec=infinity
# TimeoutStopSec=10
ExecStart=/usr/bin/kolibri start
ExecStop=/usr/bin/kolibri stop

[Install]
WantedBy=multi-user.target

GENERAL KOLIBRI QUESTION (PERHAPS UNRELATED?) /etc/kolibri/daemon.conf currently always contains the single line KOLIBRI_HOME="/library/kolibri" on Internet-in-a-Box machines, so a suggestion was made — should this really contain all 4 variables above including KOLIBRI_URL_PATH_PREFIX=/kolibri ? As background, here’s the current /etc/kolibri configuration of all Internet-in-a-Box machines:

root@box:/etc/kolibri# ls
conf.d  daemon.conf  README  username

root@box:/etc/kolibri# ls conf.d

root@box:/etc/kolibri# more username
kolibri

root@box:/etc/kolibri# more daemon.conf
KOLIBRI_HOME="/library/kolibri"

CONTEXT: Internet-in-a-Box installs Kolibri’s latest .deb (https://learningequality.org/r/kolibri-deb-latest) according to the instructions provided by many helpful Learning Equality staff over the years (e.g. Benjamin Bach and others!) Then it runs…

export KOLIBRI_HOME=/library/kolibri &&
/usr/bin/kolibri manage provisiondevice \
--facility Kolibri-in-a-Box \
--superusername Admin \
--superuserpassword changeme \
--preset formal \
--language_id en

…according to https://github.com/iiab/iiab/blob/b1ce429f500cbac544a6f6f5f66eb2542d616039/roles/kolibri/tasks/install.yml#L70-L80

DOC: https://kolibri.readthedocs.io/en/latest/manage/resources.html#import-from-a-local-network-or-internet

Tangentially related:

  • learningequality/kolibri#5414
    • PR learningequality/kolibri#5415
  • PR learningequality/kolibri#8164
  • PR learningequality/kolibri#8366
  • iiab/iiab#3227

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rtibblescommented, Jul 12, 2022

This has now been fixed in #9533 - this update will be released by July 20th in 0.15.6.

1reaction
marcellamakicommented, Jul 1, 2022

Hi @holta - yes. As Richard mentioned in May, this issue is part of our planned/themed patch release schedule, which are released on a 6 week cadence. This is still our timeline - Planned Patch 4 for is scheduled for mid-July as Richard noted then, with the planned release date being July 20th, as indicated on the milestone. The PR associated with this issue will be part of that release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do we fix Kolibri Channel Import failures with http://box ...
PROBLEM SUMMARY: If you try to import a Kolibri channel using Kolibri > Channels > Import > Select a source > "Local network...
Read more >
Troubleshooting — Kolibri User Guide - Read the Docs
Problems with import and export from USB drives¶. Kolibri needs read and write access to USB drives in order to import and export...
Read more >
Import - Export issues - Kolibri - Learning Equality Community
When importing resources (Khan Academy) via a local drive I get the error message “Channel not found” even though Kolibri recognizes the ...
Read more >
Kolibri User Guide - Read the Docs
Hard drive space depends on the size of the channels you intend to import from. Kolibri Studio6 or a local storage device.
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