Forum archive
Can't get import to work
I tried this unsuccessfully with 13.0 and was hoping that it would be fixed with 14.0. Here's the use case: I'm admin on a hosted production Canvas system. I want to spin up the Turnkey version as a kind of Read/Only emergency backup. To that end, I intend to manually export courses from prod and then import the cartridges into the Turnkey instance.
Using a single course to test, after exporting to a file, when I attempt the import, it shows up in Current Jobs" as 'Canvas Common Cartridge' but it remains in "Queued" status.
I found this solution:
Importing/Exporting Courses hangs on "Queuing"
https://groups.google.com/forum/#!topic/canvas-lms-users/VVxWNUvkWYo
but when I run ./canvas_init start from /var/www/canvas/script I get "This account is currently not available."
Next, I saw this "A note about long-running jobs" in https://github.com/instructure/canvas-lms/wiki/Quick-Start
so I tried the command: ./delayed_job run
which produced the following:
----------------------------------------------------------------------------------------------------------
grep: ./app/models/*rb: No such file or directory
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/railtie.rb:88:in `block (2 levels) in <class:Railtie>'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:25:in `each'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/railtie.rb:80:in `block in <class:Railtie>'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `instance_exec'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `run'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:55:in `block in run_initializers'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `each'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `run_initializers'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/application.rb:136:in `initialize!'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /var/www/canvas/config/environment.rb:11:in `<top (required)>'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `block in require'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in `load_dependency'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/canvas-jobs-0.9.13/lib/delayed/pool.rb:124:in `load_rails'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/canvas-jobs-0.9.13/lib/delayed/pool.rb:90:in `start'
from /var/www/canvas/vendor/bundle/ruby/2.1.0/gems/canvas-jobs-0.9.13/lib/delayed/pool.rb:56:in `run'
from ./delayed_job:10:in `<main>'
-------------------------
Any suggestions?
Thanks,
James
I applied the workaround [eliminating the duplicate "service" command in the last line] and the system seemed to slow to a crawl. top output extract:
A root web request produced this output:
An internal error occurred while trying to spawn the application. Exception type: Passenger::TimeoutException Error message: Read timeout Backtrace: in 'void Passenger::SpawningKit::SmartSpawner::sendSpawnCommand(Passenger::SpawningKit::Spawner::NegotiationDetails&)' (SmartSpawner.h:657) in 'Passenger::SpawningKit::Spawner::NegotiationDetails Passenger::SpawningKit::SmartSpawner::sendSpawnCommandAndGetNegotiationDetails(const Options&)' (SmartSpawner.h:618) in 'virtual Passenger::SpawningKit::Result Passenger::SpawningKit::SmartSpawner::spawn(const Options&)' (SmartSpawner.h:781) in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (SpawningAndRestarting.cpp:94)
Perhaps some of the other changes I made affected this? I could start fresh and apply the fix.
Here's a log extract from error.log:
[ 2015-11-24 22:57:29.3845 6877/7fe78f7cc700 age/Ust/UstRouterMain.cpp:337 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2015-11-24 22:57:29.3846 6877/7fe7950b4780 age/Ust/UstRouterMain.cpp:399 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2015-11-24 22:57:29.3846 6877/7fe78f7cc700 Ser/Server.h:752 ]: [LoggerApiServer] Freed 0 spare client objects
[ 2015-11-24 22:57:29.3846 6877/7fe78f7cc700 Ser/Server.h:443 ]: [LoggerApiServer] Shutdown finished
[ 2015-11-24 22:57:29.3848 6877/7fe7950b4780 age/Ust/UstRouterMain.cpp:424 ]: Passenger UstRouter shutdown finished
[ 2015-11-24 22:57:29.3607 6870/7fa21b7fe700 Ser/Server.h:752 ]: [ServerThr.1] Freed 128 spare client objects
[ 2015-11-24 22:57:29.3849 6870/7fa21b7fe700 Ser/Server.h:443 ]: [ServerThr.1] Shutdown finished
[ 2015-11-24 22:57:29.4225 6870/7fa2252ff780 age/Cor/CoreMain.cpp:942 ]: Passenger core shutdown finished
[ 2015-11-24 22:57:29.9233 6896/7f1548139780 age/Wat/WatchdogMain.cpp:1274 ]: Starting Passenger watchdog...
[ 2015-11-24 22:57:29.9293 6899/7f6044ac8780 age/Cor/CoreMain.cpp:957 ]: Starting Passenger core...
[ 2015-11-24 22:57:29.9294 6899/7f6044ac8780 age/Cor/CoreMain.cpp:234 ]: Passenger core running in multi-application mode.
[ 2015-11-24 22:57:29.9302 6899/7f6044ac8780 age/Cor/CoreMain.cpp:707 ]: Passenger core online, PID 6899
[ 2015-11-24 22:57:29.9375 6904/7fcc25caf780 age/Ust/UstRouterMain.cpp:430 ]: Starting Passenger UstRouter...
[ 2015-11-24 22:57:29.9378 6904/7fcc25caf780 age/Ust/UstRouterMain.cpp:311 ]: Passenger UstRouter online, PID 6904
[Tue Nov 24 22:57:29.939000 2015] [mpm_event:notice] [pid 6893:tid 140247796737920] AH00489: Apache/2.4.10 (Debian) Phusion_Passenger/5.0.17 OpenSSL/1.0.1k configured -- resuming normal operations
[Tue Nov 24 22:57:29.939187 2015] [core:notice] [pid 6893:tid 140247796737920] AH00094: Command line: '/usr/sbin/apache2'
[ 2015-11-24 22:57:34.5414 6821/7f1f08081780 age/Wat/WatchdogMain.cpp:453 ]: Some Phusion Passenger agent processes did not exit in time, forcefully shutting down all.
App 6997 stdout:
App 7028 stdout:
App 7037 stdout:
App 7045 stdout:
[ 2015-11-24 22:59:56.0826 6899/7f603effe700 age/Cor/Req/Utils.cpp:95 ]: [Client 1-3] Sending 502 response: application did not send a complete response
[ 2015-11-24 22:59:56.8418 6899/7f603effe700 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 7028, application /var/www/canvas
[ 2015-11-24 22:59:57.0621 6899/7f603effe700 age/Cor/Req/Utils.cpp:95 ]: [Client 1-4] Sending 502 response: application did not send a complete response
[ 2015-11-24 22:59:57.0621 6899/7f6044aa5700 App/Poo/AnalyticsCollection.cpp:104 ]: Process (pid=7037, group=/var/www/canvas) no longer exists! Detaching it from the pool.
[ 2015-11-24 22:59:57.1875 6899/7f6044aa5700 age/Cor/CoreMain.cpp:794 ]: Disconnecting long-running connections for process 7037, application /var/www/canvas
[ 2015-11-24 23:06:56.7806 6899/7f603effe700 age/Cor/Req/CheckoutSession.cpp:274 ]: [Client 1-6] Cannot checkout session (exception type Passenger::TimeoutException): Read timeout
[ 2015-11-24 23:06:58.3356 6899/7f603effe700 age/Cor/Req/CheckoutSession.cpp:274 ]: [Client 1-7] Cannot checkout session (exception type Passenger::TimeoutException): Read timeout
root@canvas log/apache2# tail -100 error.log
[ 2015-11-24 20:37:34.1777 719/7f3dc511a780 age/Ust/UstRouterMain.cpp:399 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2015-11-24 20:37:34.1777 719/7f3dbf832700 Ser/Server.h:752 ]: [LoggerApiServer] Freed 0 spare client objects
[ 2015-11-24 20:37:34.1777 719/7f3dbf832700 Ser/Server.h:443 ]: [LoggerApiServer] Shutdown finished
[ 2015-11-24 20:37:34.1778 719/7f3dc511a780 age/Ust/UstRouterMain.cpp:424 ]: Passenger UstRouter shutdown finished