-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot connect to server for downloading video files from current development installs #3704
Comments
Just a note here this test was performed immediately after installation restarting the server seems to have resolved this problem. I am rebooting now to see if the problem returns or remains resolved. |
Does this issue only occur on mac? Have you been able to reproduce it @ed? Were you logged in as a coach or an admin? |
Unable to reproduce, @cpauya can you try this on mac? |
I was able to reproduce this a few days ago @MCGallaspy - I will try again with the latest build from dungeon server: http://dungeon.learningequality.org:8085/browse/KL-KALITE014/latest and post a screenshot here. |
Yes @MCGallaspy, video downloads are failing on the latest Mac installer too (after successfully doing a One-click Registration). I am logged-in as admin. Here's the browser screenshot on Firefox v38.0.5: After the failed attempt to download a video, I ran cyril-lappy6:~ cyril$ kalite status
Unclean shutdown (7) There are also no logs because it crashed on the pyrun2.7 binary, meaning the ka-lite server has stopped. Here's the first few lines of the crash report:
Thus the ka-lite server has also stopped, so I have to restart the server (on the terminal or thru the status menu icon). When I tried to download a video again after restarting the ka-lite server, it only shows the "Launched video download process successfully." message but no progress indicator and no errors or crashes also. See screenshot below. So I think we need to check what's the reason why Does the |
I ran these commands on the terminal (repeat setup with new database and do runserver): kalite manage setup
kalite manage runserver And I was able to download videos successfully. I also tried Here's a screenshot of the video download happening: Then I tried to do So using Any ideas @benjaoming? |
@cpauya |
Hi @benjaoming, I noticed that any first attempt to download a video will crash the server. The succeeding attempts to download the same video will not. After the second attempt, it generates a Download Videos log at chronograph like this: Please note that there's no log or any sort for the first attempt which crashes the server. On the other hand, I'm not sure if this is related because this is about Secure Sync log but here's the last entry about it from Chronograph log: Stdout: Checking purgatory for unsaved models... Stderr: 'int' object is not callable
Traceback (most recent call last):
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/fle_utils/chronograph/models.py", line 209, in run_management_command
call_command(self.command, *args, **options)
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/core/management/__init__.py", line 161, in call_command
return klass.execute(*args, **defaults)
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/core/management/base.py", line 263, in execute
output = self.handle(*args, **options)
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/securesync/management/commands/syncmodels.py", line 62, in handle
results = client.sync_models()
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/securesync/engine/api_client.py", line 251, in sync_models
counters_to_download, counters_to_upload = self.sync_device_records()
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/securesync/engine/api_client.py", line 162, in sync_device_records
client_counters = self.get_client_device_counters()
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/securesync/engine/api_client.py", line 154, in get_client_device_counters
return get_device_counters(zone=self.session.client_device.get_zone())
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/securesync/engine/utils.py", line 71, in get_device_counters
device_counters[device.id] += cnt()
TypeError: 'int' object is not callable |
@cpauya strange!
|
Using
But then again, using |
@cpauya If no jobs are created, this indicates that something is wrong with the process running the server. Are you able to get output from the crashing |
Sadly I can't find any output or log, I tried looking up at the Console crash report but nothing there. I guess we have an issue with using |
Tried to do this:
So for now I would say the failing video download has something to do with the pyrun binary. Ok, really going to bed now. |
Heh, this is frustrating. The reason why we moved to PyRun in the first place was to get away from a buggy MacPython. If it's also crashing on PyRun, then we best just bundle the python installer, similar to what the windows installer does. Or perhaps get to the root of the issue of why it's segfaulting in the first place. |
@aronasorman it's not confirmed yet that it's a Pyrun segfault but it does sound an awful lot like it :( @cpauya sleep well, sounds like a problem worth sleeping on :) |
It's hard to trace this without a log file of which part of the |
Workaround for #3704. Running videodownload on OS X results in a strange quitting behaviour by the python process if run as a thread. If run as a process, it should work fine, albeit it might take longer. Good enough for now.
Update:
Process CommandProcess-4:
Traceback (most recent call last):
File "<pyrun>/multiprocessing/process.py", line 258, in _bootstrap
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/fle_utils/django_utils/command.py", line 92, in run
call_command(self.cmd, *self.args, **self.kwargs)
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/core/management/__init__.py", line 161, in call_command
return klass.execute(*args, **defaults)
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/core/management/base.py", line 263, in execute
output = self.handle(*args, **options)
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/fle_utils/chronograph/management/commands/cron.py", line 10, in handle
for job in Job.objects.due():
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/db/models/query.py", line 123, in _result_iter
self._fill_cache()
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/db/models/query.py", line 927, in _fill_cache
self._result_cache.append(next(self._iter))
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/db/models/query.py", line 301, in iterator
for row in compiler.results_iter():
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/db/models/sql/compiler.py", line 775, in results_iter
for rows in self.execute_sql(MULTI):
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
cursor.execute(sql, params)
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/db/backends/sqlite3/base.py", line 366, in execute
six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
File "/Applications/KA-Lite Monitor.app/Contents/Resources/ka-lite/python-packages/django/db/backends/sqlite3/base.py", line 362, in execute
return Database.Cursor.execute(self, query, params)
DatabaseError: no such table: chronograph_job We are tracing why we are now having this issue. |
Could you have a look in the database file itself? It's very strange that There's a great Firefox add-on for SQLite management: https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/ |
@cpauya running command |
We found that the call to Saw that PyRun doesn't include the So we have to modify the call to Ideally we must build our PyRun to include the We are now testing our changes and will issue a PR for this soon. |
Great work!! The Let's discuss a simple and low-risk for 0.14. One of the sad things in One much simpler approach would be to use normal threads that are signalled to shutdown by the main process in the same fashion that bin/kalite runs cronserver_blocking and tells it to exit. This reduces risks of process leaks clogging memory and leaked processes accessing the same files as newer processes. |
Should be fixed in the latest mac installer. |
While downloading videos from the current development installations we are not able to connect with the server in order to do so? The screen shot provided is from a MAC current in development installer installation but with no modification to the local_settings.py which was double checked to ensure there was no redirection to the video resources
.
The text was updated successfully, but these errors were encountered: