instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.63k stars 2.49k forks source link

Installation error #1569

Open hassanayoub85 opened 4 years ago

hassanayoub85 commented 4 years ago

Hi, On Ubuntu 18.04 I run these commands:

sudo apt install ruby-full git
git clone https://github.com/instructure/canvas-lms.git
cd canvas-lms/
./script/docker_dev_setup.sh

then i reply yes to all questions, installer stuck here:

$ es-check es8 ./public/dist/**/*.js
ES-Check: there were no ES version matching errors!  šŸŽ‰
Done in 96.34s.
Killed
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
--> Finished: 'js:webpack_development' in 96.87949206300027
rake aborted!
Parallel::UndumpableException: RuntimeError: Error running js:webpack_production: 
ABORTING
/usr/src/app/lib/tasks/js.rake:50:in `block (2 levels) in <top (required)>'
/usr/src/app/lib/tasks/canvas.rake:76:in `block (5 levels) in <top (required)>'
/usr/src/app/lib/tasks/canvas.rake:7:in `log_time'
/usr/src/app/lib/tasks/canvas.rake:76:in `block (4 levels) in <top (required)>'
/home/docker/.gem/ruby/2.4.0/gems/parallel-1.18.0/lib/parallel.rb:506:in `call_with_index'
/home/docker/.gem/ruby/2.4.0/gems/parallel-1.18.0/lib/parallel.rb:360:in `block (2 levels) in work_in_threads'
/home/docker/.gem/ruby/2.4.0/gems/parallel-1.18.0/lib/parallel.rb:515:in `with_instrumentation'
/home/docker/.gem/ruby/2.4.0/gems/parallel-1.18.0/lib/parallel.rb:359:in `block in work_in_threads'
/home/docker/.gem/ruby/2.4.0/gems/parallel-1.18.0/lib/parallel.rb:209:in `block (3 levels) in in_threads'
Tasks: TOP => canvas:compile_assets
(See full trace by running task with --trace)
ERROR: Service 'jobs' failed to build: The command '/bin/sh -c COMPILE_ASSETS_NPM_INSTALL=0 bundle exec rake canvas:compile_assets' returned a non-zero code: 1
djbender commented 4 years ago

Hi @hassanayoub85! Do you know how much RAM you have available? The js:webpack_production step generally requires 6GB+ of RAM.

hassanayoub85 commented 4 years ago

Hi @djbender, 8 cores and 8 GB RAM

djbender commented 4 years ago

@hassanayoub85 OK! If you're able we can try to diagnose the issue by commenting out the last line of the Dockerfile and running docker-compose build followed by docker-compose run --rm web yarn run webpack-production.

Also, if you don't need production assets right away (i.e. running the app in development mode instead of production mode) you can also safely ignore them for now with the following workaround:

  1. Comment out the last line of the Dockerfile

    # RUN COMPILE_ASSETS_NPM_INSTALL=0 bundle exec rake canvas:compile_assets

  2. run the script/docker_dev_setup.sh script again.

  3. compile the dev assets manually:

    $ docker-compose run --rm web yarn run build:css $ docker-compose run --rm web yarn run webpack-development

hassanayoub85 commented 4 years ago

@djbender hi my friend thank you for your response, i upgraded ram to 16gb, and installation worked and finished. However i am facing anothet issue, since yesterday, i run the command docker-compose up and alot of sql commands issues are keep appearing, and the url canvas.docker is not working, any idea?

TheHippiez commented 4 years ago

@djbender I have the same issue on a machine with 16gb RAM.