Import facility not working through setup wizard
See original GitHub issueObserved behavior
Tried importing facility from an existing one using the setup wizard on a new 0.14b14 setup.
Front end shows an invalid credentials error as below but that is not correct as have reverified the credentials and have tried both of super admin as well as facility admin.
Logs have this error -
INFO 2020-07-29 12:22:57,685 cherrypy.access 127.0.0.1 - - "GET /api/discovery/dynamicnetworklocation/" 200 0 "http://localhost:8080/en/setup_wizard/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
INFO 2020-07-29 12:22:57,712 kolibri.core.discovery.utils.network.client Attempting connection to: http://con.myscoolserver.in/
INFO 2020-07-29 12:22:58,365 kolibri.core.discovery.utils.network.client Success! We connected to: http://con.myscoolserver.in/api/public/info/
INFO 2020-07-29 12:22:58,379 cherrypy.access 127.0.0.1 - - "GET /api/discovery/staticnetworklocation/" 200 0 "http://localhost:8080/en/setup_wizard/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
INFO 2020-07-29 12:23:00,490 cherrypy.access 127.0.0.1 - - "GET /api/discovery/networklocation_facilities/82036dcd-a659-45b0-817d-913046512f95/" 200 0 "http://localhost:8080/en/setup_wizard/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
INFO 2020-07-29 12:23:25,314 kolibri.core.discovery.utils.network.client Attempting connections to variations of the URL: http://con.myscoolserver.in/
INFO 2020-07-29 12:23:25,315 kolibri.core.discovery.utils.network.client Attempting connection to: http://con.myscoolserver.in:8080/
INFO 2020-07-29 12:23:30,681 kolibri.core.discovery.utils.network.client Unable to connect: HTTPConnectionPool(host='con.myscoolserver.in', port=8080): Max retries exceeded with url: /api/public/info/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f3c89a62a30>, 'Connection to con.myscoolserver.in timed out. (connect timeout=5)'))
INFO 2020-07-29 12:23:30,683 kolibri.core.discovery.utils.network.client Attempting connection to: http://con.myscoolserver.in/
INFO 2020-07-29 12:23:31,383 kolibri.core.discovery.utils.network.client Success! We connected to: http://con.myscoolserver.in/api/public/info/
ERROR 2020-07-29 12:23:32,006 django.request Internal Server Error: /api/tasks/facilitytasks/startpeerfacilityimport/
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/fields/related_descriptors.py", line 178, in __get__
rel_obj = getattr(instance, self.cache_name)
AttributeError: 'Certificate' object has no attribute '_scope_definition_cache'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/kolibri/dist/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python3/dist-packages/kolibri/dist/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3/dist-packages/kolibri/dist/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/kolibri/dist/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/kolibri/dist/rest_framework/viewsets.py", line 116, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/kolibri/dist/rest_framework/views.py", line 495, in dispatch
response = self.handle_exception(exc)
File "/usr/lib/python3/dist-packages/kolibri/dist/rest_framework/views.py", line 455, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/lib/python3/dist-packages/kolibri/dist/rest_framework/views.py", line 492, in dispatch
response = handler(request, *args, **kwargs)
File "./kolibri/core/tasks/api.py", line 882, in startpeerfacilityimport
job_data = validate_and_prepare_peer_sync_job(
File "./kolibri/core/tasks/api.py", line 1054, in validate_and_prepare_peer_sync_job
get_client_and_server_certs(
File "./kolibri/core/auth/management/utils.py", line 195, in get_client_and_server_certs
client_cert = nc.certificate_signing_request(
File "/usr/lib/python3/dist-packages/kolibri/dist/morango/sync/syncsession.py", line 258, in certificate_signing_request
Certificate.save_certificate_chain(
File "/usr/lib/python3/dist-packages/kolibri/dist/morango/models/certificates.py", line 227, in save_certificate_chain
cert.check_certificate()
File "/usr/lib/python3/dist-packages/kolibri/dist/morango/models/certificates.py", line 168, in check_certificate
scope = self.get_scope()
File "/usr/lib/python3/dist-packages/kolibri/dist/morango/models/certificates.py", line 244, in get_scope
return self.scope_definition.get_scope(self.scope_params)
File "/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/fields/related_descriptors.py", line 184, in __get__
rel_obj = self.get_object(instance)
File "/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/fields/related_descriptors.py", line 159, in get_object
return qs.get(self.field.get_reverse_related_filter(instance))
File "/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py", line 378, in get
raise self.model.DoesNotExist(
morango.models.certificates.DoesNotExist: ScopeDefinition matching query does not exist.
INFO 2020-07-29 12:23:32,125 cherrypy.access 127.0.0.1 - - "POST /api/tasks/facilitytasks/startpeerfacilityimport/" 500 0 "http://localhost:8080/en/setup_wizard/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
However, importing another facility works once a new facility has been created via web or cli’s provisiondevice
Expected behavior
Import of chosen facility should have worked.
User-facing consequences
Can’t use Kolibri in an “Advanced”, formal learning setup without creating a “native” facility in a device.
Errors and logs
Error spotted in logs/kolibri.txt shared above.
Steps to reproduce
- Install kolibri 14.b14
- Follow the Setup wizard and choose “Advanced…” facility option and thereafter try to import and facility instead of creating a new one.
Context
Kolibri 0.14b14 deb Kolibri server 0.3.8b2 Ubuntu 20.04 Firefox
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Access can't start this wizard
Symptoms. When you run any wizard or attempt to import, append, or link a file in Microsoft Access 2010, you receive the error:....
Read more >Importing data via Setup Wizard | Jira
Solution. If you have Jira running and you wish to re-trigger the Setup Wizard, please refer to Reconfigure JIRA by running the setup...
Read more >Running the setup by using Custom setup in the setup wizard
The setup wizard runs you through setting up your database, configuring email settings, configuring the user registry, and registering applications.
Read more >Run the Web Setup Wizard - Fireware
To set up your Firebox, you can use the Web Setup Wizard. ... accept the certificate, or generate and import a certificate for...
Read more >Import Data with the Data Import Wizard
Unmapped fields are not imported into Salesforce. To see a list of standard Salesforce data fields, from the management settings for the object,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be fixed by https://github.com/learningequality/kolibri/pull/7414 (which adds extra safeguards for handling special cases like this).
The
--skip-update
option isn’t specific tomigrate
, it’s a Kolibri CLI option. It’s not documented because it wouldn’t typically be relevant to end users.Thanks @jamalex for the clarity.