kolibri: 500 Internal Server error on import channel

Summary

While trying to import CK12 channel in a fresh development repo: fullscreen_02_10_17_01_58

System information

  • Version: develop branch
  • Operating system: OSX
  • Browser: Chrome

Traceback or relevant snippet from server.log or browser console

[02/Oct/2017 01:56:39] "GET /api/tasks/?1506902199429=1506902199429 HTTP/1.1" 200 2
ERROR    Internal Server Error: /api/tasks/startremoteimport/
Traceback (most recent call last):
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/viewsets.py", line 87, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/views.py", line 466, in dispatch
    response = self.handle_exception(exc)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/views.py", line 463, in dispatch
    response = handler(request, *args, **kwargs)
  File "kolibri/tasks/api.py", line 102, in startremoteimport
    get_content_database_file_url(channel_id)).status_code
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/requests/api.py", line 97, in head
    return request('head', url, **kwargs)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/requests/api.py", line 57, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/Users/mac/.venvs/kolibri/lib/python2.7/site-packages/requests/adapters.py", line 477, in send
    raise SSLError(e, request=request)
SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:661)
[02/Oct/2017 01:56:40] "POST /api/tasks/startremoteimport/?1506902199198=1506902199198 HTTP/1.1" 500 109686

After setting “http” instead of “https” here, as suggested by @jamalex, no more 500 error, but transfer still fails, with no apparent errors in console/terminal:

manage_device_content_-_kolibri

[02/Oct/2017 02:43:15] "GET /api/tasks/?1506904995392=1506904995392 HTTP/1.1" 200 151
INFO     Downloading data for channel id 95a52b386f2c485cb97dd60901674a98
INFO:kolibri.content.management.commands.importchannel:Downloading data for channel id 95a52b386f2c485cb97dd60901674a98
DEBUG    URL to fetch: http://studio.learningequality.org/content/databases/95a52b386f2c485cb97dd60901674a98.sqlite3
DEBUG:kolibri.content.management.commands.importchannel:URL to fetch: http://studio.learningequality.org/content/databases/95a52b386f2c485cb97dd60901674a98.sqlite3
DEBUG    Destination: /Users/mac/.kolibri/content/databases/95a52b386f2c485cb97dd60901674a98.sqlite3
DEBUG:kolibri.content.management.commands.importchannel:Destination: /Users/mac/.kolibri/content/databases/95a52b386f2c485cb97dd60901674a98.sqlite3
[02/Oct/2017 02:43:16] "GET /api/tasks/?1506904996392=1506904996392 HTTP/1.1" 200 957
[02/Oct/2017 02:43:17] "GET /api/tasks/?1506904997392=1506904997392 HTTP/1.1" 200 957

Will try installing packages suggested at SO next, to see if it solves something…

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments

Note that this was initially tested on develop, but happened on 0.6 for a different reason 😃 I’m reopening it for the issue on develop.

I changed our SSL cert for studio.learningequality.org @radinamatic, can you try and see if you can still replicate the issue?

No, the yarn error is because you had a database created by the version of 0.6.x that did not properly import licenses, and you are running it with the version that does now. The migration histories for these do not mix.