[ARCHIVED] Error when copying or importing a course - self hosted

Jump to solution
nicolopez77
Community Explorer

Hi All, I'm having an issue with a self hosted Canvas. When I try to import a course (exported from the same or from another server), doesn't matter the size or content it has, the process ends with an error message. I've even tried with an empty course. Same result when copying a course. We have posted a message some time ago in the developers google group, but no one answered. It looks like the support from Instructure to the self hosted version is very limited.

We don't have any other issue in the server, the file upload/download and all other functionality works fine. The Canvas version si the latest stable from November 10, 2020. We have checked permissions on the /var/canvas/tmp folder, and we even see the export file is created, but then it fails to import it.

Here is the full error message, maybe someone can help:

 

#3752 No such file or directory - file

categoría: content_migration
creado a las: 2021-01-12 08:41:28 -0700

attempts: 0
handler: --- !ruby/struct:Canvas::Migration::Worker::CCWorker migration_id: 16
hostname: elearning
id: 553614
job_tag: Canvas::Migration::Worker::CCWorker#perform
max_attempts: 1
pid: 3898
priority: 20
process_type: BackgroundJob
request_id: 553614
run_at: 2021-01-12 15:41:26 UTC
session_id: elearning:3898
shard_id: 1
source:
strand: migrations:import_content/api_in_app_10000000000001
type: content_migration
worker_name:
 
 No such file or directory - file
/var/canvas/gems/canvas_mimetype_fu/lib/canvas_mimetype_fu/mimetype_fu.rb:25:in `popen' /var/canvas/gems/canvas_mimetype_fu/lib/canvas_mimetype_fu/mimetype_fu.rb:25:in `mime_type?' /var/canvas/gems/canvas_unzip/lib/canvas_unzip.rb:114:in `each_entry' /var/canvas/gems/canvas_unzip/lib/canvas_unzip.rb:78:in `extract_archive' /var/canvas/lib/canvas/migration/archive.rb:124:in `unzip_archive' /var/canvas/lib/canvas/migration/migrator.rb:57:in `unzip_archive' /var/canvas/lib/cc/importer/canvas/converter.rb:44:in `export' /var/canvas/lib/cc/importer/cc_worker.rb:49:in `perform' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/backend/base.rb:254:in `block in invoke_job' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:67:in `block in initialize' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:72:in `execute' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:45:in `run_callbacks' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/backend/base.rb:251:in `invoke_job' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/delayed/backend/base.rb:85:in `block in invoke_job' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:628:in `block in activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:96:in `activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:627:in `activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/delayed/backend/base.rb:85:in `invoke_job' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:210:in `block (2 levels) in perform' /usr/lib/ruby/2.6.0/benchmark.rb:308:in `realtime' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:204:in `block in perform' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-statsd-1.4.1/lib/inst_jobs_statsd/stats/timing/perform.rb:22:in `block (2 levels) in enable_perform_timing' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-statsd-1.4.1/lib/inst_jobs_statsd/stats/timing.rb:8:in `block in report_timing' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst_statsd-2.1.6/lib/inst_statsd/statsd.rb:89:in `time' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-statsd-1.4.1/lib/inst_jobs_statsd/stats/timing.rb:8:in `report_timing' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-statsd-1.4.1/lib/inst_jobs_statsd/stats/timing/perform.rb:21:in `block in enable_perform_timing' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:85:in `block (2 levels) in add' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-statsd-1.4.1/lib/inst_jobs_statsd/stats/timing/perform.rb:13:in `block (2 levels) in enable_batching' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst_statsd-2.1.6/lib/inst_statsd/statsd.rb:95:in `batch' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-statsd-1.4.1/lib/inst_jobs_statsd/stats/timing/perform.rb:12:in `block in enable_batching' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:85:in `block (2 levels) in add' /var/canvas/config/initializers/delayed_job.rb:151:in `block (2 levels) in <top (required)>' /var/canvas/lib/temp_cache.rb:28:in `enable' /var/canvas/config/initializers/delayed_job.rb:150:in `block in <top (required)>' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:85:in `block (2 levels) in add' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:67:in `block in initialize' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:85:in `block in add' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:85:in `block in add' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:85:in `block in add' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:72:in `execute' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:45:in `run_callbacks' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:201:in `perform' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:174:in `block (2 levels) in run' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:271:in `block in configure_for_job' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:40:in `running_job' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:267:in `configure_for_job' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:173:in `block in run' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:67:in `block in initialize' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:72:in `execute' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:45:in `run_callbacks' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:166:in `run' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/delayed/worker.rb:26:in `block in run' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:628:in `block in activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:96:in `activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:627:in `activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/delayed/worker.rb:26:in `run' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:133:in `block in start' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:67:in `block in initialize' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:72:in `execute' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/lifecycle.rb:45:in `run_callbacks' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/worker.rb:131:in `start' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/delayed/worker.rb:19:in `block in start' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:628:in `block in activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:96:in `activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-2.0.1/app/models/switchman/shard.rb:627:in `activate' /var/canvas/vendor/bundle/ruby/2.6.0/gems/switchman-inst-jobs-2.0.0/lib/switchman_inst_jobs/delayed/worker.rb:19:in `start' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:97:in `block in spawn_worker' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:108:in `block in fork_with_reconnects' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:105:in `fork' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:105:in `fork_with_reconnects' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:96:in `spawn_worker' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:74:in `block (2 levels) in spawn_all_workers' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:74:in `times' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:74:in `block in spawn_all_workers' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:73:in `each' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:73:in `spawn_all_workers' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/pool.rb:40:in `start' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/cli.rb:96:in `start' /var/canvas/vendor/bundle/ruby/2.6.0/gems/inst-jobs-0.16.0/lib/delayed/cli.rb:34:in `run' /var/canvas/script/delayed_job:11:in `<main>'
Labels (2)
0 Likes
1 Solution
pennedav
Community Participant

Make sure you have the "file" command available on the server this instance is installed on. It's a utility that identifies file types in the Linux/Unix world.

Here's a link to the line of code that's failing. The call to IO.popen is trying to run the "file" command but is failing because it cannot find the command. This could be because (1) "file" isn't installed on the server or (2) the PATH environment variable for the process the app server is running under isn't setup correctly so the process cannot find "file", or (3) there could be a permissions issue preventing the app server process from running "file", or (4) some other reason more subtle I'm not thinking of.

View solution in original post

0 Likes