learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
798 stars 655 forks source link

Kolibri videos cannot play on any Apple devices through Internet In A Box server #8164

Closed nzola closed 3 years ago

nzola commented 3 years ago

Observed behavior

Dear Team Kolibri, I have a very urgent request which I need your help if possible. I have an opportunity to run a pilot project with 10 Internet In A Box (IIAB) servers in the Congo DRC this July, but encounter a big problem. Kolibri videos cannot play on any of the Apple products (ipad, iphone, notebook) only on my Samsun phone, accessing them through IIAB server. I cannot implement this project until this problem is resolved. This the error I get on apple products when I click on play:

image

But the videos play on Apple products only if I downloaded them directly from Kolibri site onto the iphone. This is the details of the procedure I downloaded the videos from the Kolibri content library onto IIAB server: 1) From IIAB front menu, click on Kolibri 2) Login as Admin 3) Once on Kolibri main page, click on 3 bars on the upper left corner 4) Select Device on the pull down menu 5) From here click on import. A window opens 6) From window, select Local network or internet and click continue 7) Now paste the full network address : https://vodaeduc.vodacom.cd/fr-fr This will show all the program for you to select which one you need to download. …

Errors and logs

Expected behavior

User-facing consequences

Steps to reproduce

Context

holta commented 3 years ago

CLARIFICATION:

rtibbles commented 3 years ago

The most likely explanation for this is that Safari refuses to play videos when a byte range request fails. So the video codec is indeed compatible, but when the video player makes the initial request for a byte range request, and that fails to come back, the video will not play.

What is serving the content from the Raspberry Pi?

Are you using our Raspberry Pi image, or is this a custom deployment?

holta commented 3 years ago

FYI Internet-in-a-Box installs the latest Kolibri (0.14.7 in this case) with NGINX according to Learning Equality's recommendations (Benjamin Bach and José Redrejo Rodríguez) as shown here:

https://github.com/iiab/iiab/blob/master/roles/kolibri/tasks/install.yml

PS if the above Learning Equality recommendations have changed, please let us know, Thanks!

nzola commented 3 years ago

Hi Richard, do you know the organization Internet In A Box? I am using their install process and Kolibri is part of it.

On Mon, Jun 21, 2021 at 9:26 AM Richard Tibbles @.***> wrote:

The most likely explanation for this is that Safari refuses to play videos when a byte range request fails. So the video codec is indeed compatible, but when the video player makes the initial request for a byte range request, and that fails to come back, the video will not play.

What is serving the content from the Raspberry Pi?

Are you using our Raspberry Pi image, or is this a custom deployment?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/learningequality/kolibri/issues/8164#issuecomment-865175255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEH5MM5DALKLAJEDO57EBVLTT5R4RANCNFSM47AKBLAQ .

holta commented 3 years ago

Thanks also to Learning Equality's Ivan Savov who's greatly helped make this happen over the past 4 years.

do you know the organization Internet In A Box? I am using their install process and Kolibri is part of it.

As an aside, Internet-in-a-Box was # 1 on Hacker News yesterday:

https://news.ycombinator.com/item?id=27568332

(Internet-in-a-Box installs Kolibri or KA Lite depending on the requirements of the implementer.)

rtibbles commented 3 years ago

See here for the Apple Safari developer recommendations:

https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/CreatingVideoforSafarioniPhone/CreatingVideoforSafarioniPhone.html#//apple_ref/doc/uid/TP40006514-SW6

To confirm my hypothesis, could you please do the test recommended in there?

curl --range 0-99 http://192.168.0.19/kolibri/content/storage/9/5/951b1a4c7f0b2ab989c320b23818ac58.mp4 -o /dev/null

(replace the file URL with the appropriate server URL)

If it does not download 100 bytes, then the byte range request issue is indeed the cause.

holta commented 3 years ago

1) @rtibbles strangely when using non-Kolibri aspects of NGINX on this same server, it correctly downloads a 100-byte partial-range (byte-range):

   curl --range 0-99 http://192.168.0.19/js-menu/menu-files/images/iiab119.png -o /dev/null

2) However, attempting to download byte-ranges with Kolibri (using the very same NGINX server) incorrectly ends up downloading the full file: (corroborating your theory!)

   curl --range 0-99 http://192.168.0.19/kolibri/static/kolibri.core.default_frontend/kolibri-logo.svg -o /dev/null

Do you recommend any other tests towards narrowing down the root cause? Thank you!

rtibbles commented 3 years ago

Do you recommend any other tests towards narrowing down the root cause? Thank you!

The first thing would be running the same test against the unproxied Kolibri server. This would help narrow down whether it's an issue with the server itself, or the proxying to the server.

nzola commented 3 years ago

I run the test on iphone without going through IIAB server it worked.

rtibbles commented 3 years ago

So, it seems that whatever is happening in the proxying layer is preventing the byte range requests.

@holta presumably http://192.168.0.19/js-menu/menu-files/images/iiab119.png is also being served by nginx, are there any significant differences in configuration that might account for this?

holta commented 3 years ago

I run the test on iphone without going through IIAB server it worked.

CLARIF: the above iPhone test (about a week ago) was browsing videos within Kolibri 0.12.10b3 at https://vodaeduc.vodacom.cd (successfully viewing videos & other source material, prior those being imported into IIAB's Kolibri 0.14.7).

The first thing would be running the same test against the unproxied Kolibri server. This would help narrow down whether it's an issue with the server itself, or the proxying to the server.

URL's shown by systemctl status kolibri do not work:

Specifically, when trying to visit the above URL's, browsers show the following:

Not Found
The requested resource was not found on this server.

But indeed the following unproxied URL correctly downloads exactly 100 bytes:

curl --range 0-99 http://192.168.0.182:8009/kolibri/static/kolibri.core.default_frontend/kolibri-logo.svg -o /dev/null

@holta presumably http://192.168.0.19/js-menu/menu-files/images/iiab119.png is also being served by nginx, are there any significant differences in configuration that might account for this?

I do not know. Is /etc/apache2/sites-available/kolibri.conf (pasted in below, sourced from https://github.com/iiab/iiab/blob/master/roles/kolibri/templates/kolibri.conf.j2) possibly suspicious after all these years?

RedirectMatch ^/kolibri$ /kolibri/

ProxyPreserveHost   On
ProxyPass           /kolibri/          http://localhost:8009/kolibri/
ProxyPassReverse    /kolibri/          http://localhost:8009/kolibri/

Thank you to @rtibbles & @jvonau who've greatly helped get us this far!

jvonau commented 3 years ago

I run the test on iphone without going through IIAB server it worked.

what exactly was "the test"?

holta commented 3 years ago

I run the test on iphone without going through IIAB server it worked.

what exactly was "the test"?

@nzola was successfully browsing pages and videos within Kolibri 0.12.10b3 at https://vodaeduc.vodacom.cd

(This was a separate test about a week ago, that did not involve IIAB in any way.)

jvonau commented 3 years ago

Do you recommend any other tests towards narrowing down the root cause? Thank you!

The first thing would be running the same test against the unproxied Kolibri server. This would help narrow down whether it's an issue with the server itself, or the proxying to the server.

That does not work at all: not_found found in /library/kolibri/logs/kolibri.txt:

INFO 2021-06-21 16:10:25,909 cherrypy.error ENGINE Serving on http://0.0.0.0:8009
INFO 2021-06-21 16:10:25,912 cherrypy.error ENGINE Bus STARTED
INFO 2021-06-21 16:10:27,362 kolibri.core.analytics.utils Ping succeeded! (response: {'id': 1628058, 'messages': [{'msg_id': 'd8a9226a-f24d-4ac5-9e4a-eb00037f8f84', 'version_range': '<0.14.7,>=0.14.0', 'link_url': 'https://learningequality.org/r/upgrade_kolibri', 'i18n': {'ar': {'msg': 'هناك إصدار جديد متاح من كوليبري.', 'title': 'التحديث للنسخة الجديدة أصبح متاحاً', 'link_text': 'تعلم المزيد وقم بتحميله هنا'}, 'de': {'msg': 'Eine neue Version von Kolibri ist verfügbar.', 'title': 'Upgrade verfügbar', 'link_text': 'Weitere Infos und hier herunterladen'}, 'en': {'msg': 'A new version of Kolibri is available.', 'title': 'Upgrade available', 'link_text': 'Learn more and download it here'}, 'fa': {'msg': 'یک نسخه جدید از Kolibri در دسترس می\u200cباشد.', 'title': 'به\u200cروز رسانی موجود است', 'link_text': 'اطلاعات بیشتری به دست بیاورید و از اینجا، آن را دانلود کنید'}, 'it': {'msg': 'È disponibile una nuova versione di Kolibri.', 'title': 'Aggiornamento disponibile', 'link_text': 'Scopri di più e scaricalo qui'}, 'km': {'msg': 'មានជំនាន់ថ្មីមួយនៃ Kolibri។', 'title': 'មាន Upgrade', 'link_text': 'សិក្សាបន្ថែមនិងទាញយកបាននៅទីនេះ'}, 'ko': {'msg': '새 버전의 Kolibri를 사용할 수 있습니다', 'title': '업그레이드 가능', 'link_text': '더 자세히 내용을 확인하거나 여기에서 다운로드하세요'}, 'mr': {'msg': 'कोलिब्रीची नवीन आवृत्ती उपलब्ध आहे.', 'title': 'अपग्रेड उपलब्ध आहे', 'link_text': 'अधिक माहिती मिळवा आणि येथे डाऊनलोड करा'}, 'my': {'msg': 'Kolibri ဗားရှင်းအသစ် ထွက်ပါပြီနော်', 'title': 'အဆင့်မြှင့်တင်နိုင်ပါသည်', 'link_text': 'နောက်ထပ်ကြည့်ရှုပြီးတော့ ဒေါင်းလုတ်ဆွဲမည်'}, 'te': {'msg': 'Kolibri కొత్త సంస్కరణ అందుబాటులో ఉంది.', 'title': 'అప్\u200cగ్రేడ్ అందుబాటులో ఉంది', 'link_text': 'మరింత తెలుసుకొని దీనిని ఇక్కడ డౌన్\u200cలోడ్ చేయండి'}, 'vi': {'msg': 'Đã có phiên bản mới của Kolibri.', 'title': 'Nâng cấp khả dụng', 'link_text': 'Tìm hiểu thêm và tải ở đây'}, 'yo': {'msg': 'Ẹyà tuntun kan ti Kolibri ti wà.', 'title': 'Igbesoke wa ni le', 'link_text': 'Ko si ki o si gba nibi'}, 'nyn': {'msg': 'Kolibri yatsopano ilipo.', 'title': 'Mafayilo opangira apugiledi alipo', 'link_text': 'Dziwani zambiri ndikuyipanga dawunilodi pano'}, 'bg-bg': {'msg': 'Налична е нова версия на Колибри.', 'title': 'Нова версия', 'link_text': 'Научи повече и изтегли оттук'}, 'bn-bd': {'msg': 'কলিব্রির একটি নতুন সংস্করণ পাওয়া যাচ্ছে।', 'title': 'আপগ্রেড পাওয়া যাচ্ছে', 'link_text': 'আরও জানুন এবং সেটি এখানে ডাউনলোড করুন'}, 'es-es': {'msg': 'Una nueva versión de Kolibri está disponible.', 'title': 'Actualización está disponible', 'link_text': 'Descubre más y descarga aquí'}, 'ff-cm': {'msg': 'Misaalu Kolibri kesum wanngi.', 'title': 'Kesum wanngi', 'link_text': "Ɓeydu janngugo. Ronndaaɗum diga ɗo'o"}, 'fr-fr': {'msg': 'Une nouvelle version de Kolibri est disponible.', 'title': 'Nouvelle version disponible', 'link_text': 'En savoir plus et télécharger ici'}, 'gu-in': {'msg': 'કોલિબ્રિનું નવું સંસ્કરણ ઉપલબ્ધ છે.', 'title': 'અપગ્રેડ ઉપલબ્ધ છે', 'link_text': 'વધુ જાણો અને તેને અહીં ડાઉનલોડ કરો'}, 'hi-in': {'msg': 'कोलिब्री का नया संस्करण उपलब्ध है।', 'title': 'अपग्रेड उपलब्ध है', 'link_text': 'और सीखिए और यहाँ डाउनलोड करें'}, 'pt-br': {'msg': 'Uma nova versão de Kolibri está disponível.', 'title': 'Atualização disponível', 'link_text': 'Apenda mais e baixe-a aqui'}, 'sw-tz': {'msg': 'Toleo mpya la Kolibri lipo.', 'title': 'Kuboresha kupatikana', 'link_text': 'Jifunze mengi na uipakue hapa'}, 'ur-pk': {'msg': 'کولیبری کا ایک نیا ورژن دستیاب ہے.', 'title': 'اپگریڈ دستیاب ہے', 'link_text': 'مزید جانیں اور اسے یہاں سے ڈاؤن لوڈ کریں'}, 'es-419': {'msg': 'Una nueva versión de Kolibri está disponible.', 'title': 'Actualización disponible', 'link_text': 'Descubre más y descarga aquí'}, 'zh-hans': {'msg': '有新版本的课励彼可用', 'title': '有可用更新', 'link_text': '了解更多且下载'}}, 'timestamp': '2021-02-05', 'ips_to_include': [], 'instances_to_include': []}]})
INFO 2021-06-21 16:11:09,860 cherrypy.access 127.0.0.1 - - "GET /" 404 0 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
WARNING 2021-06-21 16:11:09,861 django.request Not Found: /
INFO 2021-06-21 16:13:12,219 cherrypy.access 127.0.0.1 - - "GET /" 404 0 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
WARNING 2021-06-21 16:13:12,220 django.request Not Found: /
INFO 2021-06-21 16:13:12,389 cherrypy.access 127.0.0.1 - - "GET /favicon.ico" 404 0 "http://127.0.0.1:8009/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
WARNING 2021-06-21 16:13:12,390 django.request Not Found: /favicon.ico
jvonau commented 3 years ago

http://127.0.0.1:8009/kolibri/ brings up the login page correctly

INFO 2021-06-21 16:39:51,054 cherrypy.access 127.0.0.1 - - "GET /kolibri/" 302 0 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:51,637 cherrypy.access 127.0.0.1 - - "GET /kolibri/en/" 302 0 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:52,310 cherrypy.access 127.0.0.1 - - "GET /kolibri/en/user/" 200 0 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:52,427 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/assets/fonts/noto-subset.en.css?v=0.14.5 HTTP/1.1" 200 22261 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:52,432 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/kolibri.plugins.user.app/kolibri.plugins.user.app0.14.5.css HTTP/1.1" 200 1436 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:52,436 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/kolibri.core.default_frontend/kolibri.core.default_frontend0.14.5.css HTTP/1.1" 200 15552 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:52,445 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/kolibri.plugins.user.app/kolibri.plugins.user.app-0.14.5.js HTTP/1.1" 200 27745 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:52,476 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/assets/fonts/noto-common.css?v=0.14.5 HTTP/1.1" 200 112898 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:52,565 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/kolibri.core.default_frontend/kolibri.core.default_frontend-0.14.5.js HTTP/1.1" 200 372916 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,184 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/assets/logo.ico HTTP/1.1" 200 5430 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,295 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/assets/fonts/noto-full.en.modern.css?v=0.14.5 HTTP/1.1" 200 2531 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,357 cherrypy.access 127.0.0.1 - - "GET /kolibri/api/auth/session/current/" 200 0 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,602 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/assets/fonts/noto-full.NotoSans.400.woff HTTP/1.1" 200 131 "http://127.0.0.1:8009/kolibri/static/assets/fonts/noto-full.en.modern.css?v=0.14.5" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,618 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/assets/fonts/noto-full.NotoSans.700.woff HTTP/1.1" 200 131 "http://127.0.0.1:8009/kolibri/static/assets/fonts/noto-full.en.modern.css?v=0.14.5" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,620 cherrypy.access 127.0.0.1 - - "GET /kolibri/api/auth/facility/" 200 0 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,691 cherrypy.access 127.0.0.1 - - "GET /kolibri/api/auth/facilitydataset/" 200 0 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,777 cherrypy.access 127.0.0.1 - - "GET /kolibri/api/auth/facility/" 200 0 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:53,949 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/kolibri.core.default_frontend/kolibri-logo.svg?625360a31b0628f83d4ca2ef861dbd30 HTTP/1.1" 200 10220 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
INFO 2021-06-21 16:39:54,125 cherrypy.access.281472873679888 127.0.0.1 - - "GET /kolibri/static/background.jpg?0.14.5-Default%20theme-1 HTTP/1.1" 200 211311 "http://127.0.0.1:8009/kolibri/en/user/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0"
rtibbles commented 3 years ago

I assume that http://127.0.0.1:8009/kolibri/ is still going via nginx though, so I am not sure this is telling us anything new.

jvonau commented 3 years ago

Using :8009 should denote the port to directly connect with, no? FYI I stopped nginx, still connects

holta commented 3 years ago

Kolibri videos stopped working in 2019 in a similar fashion: (FWIW)

Possibly Related:

holta commented 3 years ago

@jredrejo can you tell what's causing Kolibri videos not to appear here, seemingly very similar to the issue you helped us with in April 2019?

Please see the 6 links I've posted above, as very plausibly related to the root cause?

Thank you as @jvonau has put in some hard work investigating — along with @rtibbles who identified the failure of HTTP/1.1 byte-range when Kolibri is proxied.

nzola commented 3 years ago

BIG thank you to all for taking care of this situation. I hope you will get some lead to resolve this problem as we are excited to implement IIAB devices in the Congo DRC.

jvonau commented 3 years ago

I'm thinking adding proxy_force_ranges to IIAB's nginx configuration might straighten this issue out?

rtibbles commented 3 years ago

@jredrejo can you tell what's causing Kolibri videos not to appear here, seemingly very similar to the issue you helped us with in April 2019?

@holta - I've told you the issue, there's a problem serving byte range requests. This is an issue with IIAB's nginx configuration.

This is completely different from the issue you are referencing, which was a bug in the URL_PATH_PREFIX option that we added specifically at IIAB's request so that you could serve multiple servers at sub paths on the same host.

I'm thinking adding proxy_force_ranges to IIAB's nginx configuration might straighten this issue out?

@jvonau I think that seems like the best next step, yes.

rtibbles commented 3 years ago

FYI Internet-in-a-Box installs the latest Kolibri (0.14.7 in this case) with NGINX according to Learning Equality's recommendations (Benjamin Bach and José Redrejo Rodríguez) as shown here:

https://github.com/iiab/iiab/blob/master/roles/kolibri/tasks/install.yml

PS if the above Learning Equality recommendations have changed, please let us know, Thanks!

Just to flag also that the NGINX configuration is not according to our recommendations, as per https://github.com/iiab/iiab/issues/1646#issuecomment-604563863 IIAB was recommended to use a copy of the NGINX configuration from our kolibri-server package, but nothing has changed in the NGINX configuration since @jredrejo made that recommendation. So, no, our recommendations have not changed, but you've not implemented our previous recommendation either.

holta commented 3 years ago

Videos should now work (on Apple & LG too!) thanks to @jvonau who guided PR iiab/iiab#2824 — huge thanks to Everyone for making this happen!

@rtibbles are you talking about @jredrejo's 97-line https://github.com/learningequality/kolibri-server/blob/master/nginx.conf ? Thank you for this tip as I regret I did not quite understand @jredrejo back in March 2020. Many would like to understand NGINX recommendations for Kolibri for the coming decade. And specifically, how to act on these pragmatically. With regards to the above 97-line nginx.conf:

Many thanks for sharing so we can try to understand! We all have a lot to learn.

jvonau commented 3 years ago

Videos should now work (on Apple & LG too!) thanks to @jvonau who guided PR iiab/iiab#2824huge thanks to Everyone for making this happen!

@rtibbles are you talking about @jredrejo's 97-line https://github.com/learningequality/kolibri-server/blob/master/nginx.conf ? Thank you for this tip as I regret I did not quite understand @jredrejo back in March 2020. Many would like to understand NGINX recommendations for Kolibri for the coming decade. And specifically, how to act on these pragmatically. With regards to the above 97-line nginx.conf

It seems to require /usr/share/kolibri which does not exist within IIAB. Should this refer to some other directory within /library/kolibri or something related to /usr/lib/python3/dist-packages/kolibri/dist or otherwise? Possibly we should shoot for a general approach to softcode/parametrize such hardcoded paths?

This appears to be about handling 502 Bad Gateway Errors. Do these arise often, and from what generally? In any case, to address 502 errors if these are common, I'm also not finding the 20 /error.html files (possibly because non-English languages are not installed in the Kolibri-with-IIAB I looked at?) The default /error.html (the English one presumably?) is also being missing — which is seemingly more concerning? As I'm not finding error_pages anywhere in the filesystem :/

@holta The files are in the kolibri-server git repo and would be installed with the deb package.

The rest of the 97-line nginx.conf uses wsgi for reasons I don't yet understand. Possibly @jredrejo can say just a bit more the purpose?

Using wsgi would replace the builtin cherrypi server within kolibri the port would not be open as kolibri is not running, different way of running the kolibri python backend. Don't think it would be overly hard to try to run kolibri in this fashion, captive-portal and admin-console are run like that, drop the uwsgi.ini into place and take elements(proxy_cache_path 'location' ) from kolibri-server's nginx.conf with some tuning could work. The proxy_cache_path would be a new addition into iiab's mix with the concern about the needed space to run a true caching nginx server so I'm a bit hesitant given the deployed sdcard are pushed to the max already.

rtibbles commented 3 years ago

Glad this was resolved - hope the project is a great success @nzola!

nzola commented 3 years ago

Glad this was resolved - hope the project is a great success @nzola!

@rtibbles Thank you so much for your quick response to this issue. Keep up good care of Kolibri users!