Studio content invalid response

Operating System Linux online over a Digital Ocean server
Browser: Chrome, Firefox and Edge
Channel: Digital Literacy

Description of problem:

We are hosting an online instance of Kolibri at a cloud server (Digital Ocean) under the following URL:
https://kolibri.ytfacademy.org

Four years ago we developed the “Digital Literacy” channel in the form of SCORM zip files. We created a curriculum at Kolibri Studio with a token that I can share privately if needed for the resolution of this case.

That has been working until recently when the content would not display when called.

We tried to delete and re-import the channel. The channel content structure shows up but when trying to open any of the SCORM set of slides, we get the error message reported in the attached image.

Then we tested other public content and that worked. So we think the issue might be with the content or the Studio link. Maybe the channel content has some issue related to the recent upgrades to Studio?

We also tried to create a new test channel with other SCORM files, but we got the same error message as attached.

Hi @Antonio_Herrera,

Kolibri serves this type of content from a separate port to properly sandbox the content on an origin that is different than kolibri is served on.

Inspecting the page, I can see it trying to load content from:

https://kolibri.ytfacademy.org:46451/content/static/hashi/hashi-cea3be36e609aeba234a13b27afd33b8.html

So in this case, it’s loading from port 46451 which is bypassing the nginx reverse proxy handling the SSL connection, and therefore it fails to connect properly.

My recommendation would be to do the following:

  1. Set a custom port in Kolibri’s options.ini for the ZIP_CONTENT_PORT– using the existing 46451 is just fine
  2. Update your nginx configuration to listen on an additional port, by adding this line to the server block of your configuration:
listen 8443 ssl;
  1. Add an nginx map expression, outside of your server block which maps the incoming port to the upstream port:
map $server_port $upstream_port {
    443     8080;
    8443    46451;
}
  1. Update the proxy_pass of your nginx server block to use the $upstream_port:
proxy_pass http://127.0.0.1:$upstream_port;

Altogether, a simplified summary of these changes should look similar to this:

    map $server_port $upstream_port {
        443     8080;
        8443    46451;
    }

    server {
        listen 443 ssl;
        listen 8443 ssl;

        ssl_certificate /etc/nginx/ssl/nginx.crt;
        ssl_certificate_key /etc/nginx/ssl/nginx.key;

        location / {
            proxy_pass http://127.0.0.1:$upstream_port;
        }
    }

Please let us know if this helps
-Blaine

Hi Blaine,

Thank you very much for your detailed response !

We are going to apply your recommendations and get back to you.

Antonio Herrera

Hi Blaine, we tried your recommendations, but it did not work.

Instead, we have installed a new fresh installation on a different server with a different IP.

During the installation process, we found that the repository installation instructions did not work.

sudo add-apt-repository ppa:learningequality/kolibri
sudo apt-get update
sudo apt-get install kolibri

Therefore we downloaded the .deb file and took the installation from there.

Then we tried to install kolibri-server but the repository installation did not work.