ComPlat / chemotion_ELN

Electronic Lab Notebook
https://www.chemotion.net
GNU Affero General Public License v3.0
125 stars 51 forks source link

Error during deployment #365

Closed roma28 closed 4 years ago

roma28 commented 4 years ago

I'm trying to install ELN on clean Ubuntu 18.04 instance via the script. Everything goes fine until deployment stage, looks like it cannot find some ruby gem. Here is the error message:

01:39 bundler:install
      The Gemfile's dependencies are satisfied, skipping installation
01:39 deploy:migrate
      [deploy:migrate] Run `rake db:migrate`
01:39 deploy:migrating
      01 /tmp/chemotion/nvm-exec.sh ~/.rvm/bin/rvm 2.5.6 do bundle exec rake db…
      01 Now using node v12.16.1 (npm v6.13.7)
      01 rake aborted!
      01 LoadError: cannot load such file -- /home/production/.rvm/gems/ruby-2.…
      01 /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890…
      01 /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890…
      01 /var/www/chemotion_ELN/releases/20200819151752/config/application.rb:1…
      01 /var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `require'
      01 /var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `<top (re…
      01 /home/production/.rvm/gems/ruby-2.5.6/gems/rake-12.3.3/exe/rake:27:in …
      01 /home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in …
      01 /home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in …
      01 (See full trace by running task with --trace)
#<Thread:0x000055df7bdacea0@/home/production/.rvm/gems/ruby-2.5.6/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    1: from /home/production/.rvm/gems/ruby-2.5.6/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/home/production/.rvm/gems/ruby-2.5.6/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as production@localhost: rake exit status: 1 (SSHKit::Runner::ExecuteError)
rake stdout: Now using node v12.16.1 (npm v6.13.7)
rake stderr: rake aborted!
LoadError: cannot load such file -- /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/rdkit_chem/lib/RDKitChem
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `require_relative'
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/config/application.rb:18:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `require'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `eval'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)
#<Thread:0x000055df7bdaed40@/home/production/.rvm/gems/ruby-2.5.6/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    1: from /home/production/.rvm/gems/ruby-2.5.6/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/home/production/.rvm/gems/ruby-2.5.6/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as production@localhost: Exception while executing as production@localhost: rake exit status: 1 (SSHKit::Runner::ExecuteError)
rake stdout: Now using node v12.16.1 (npm v6.13.7)
rake stderr: rake aborted!
LoadError: cannot load such file -- /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/rdkit_chem/lib/RDKitChem
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `require_relative'
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/config/application.rb:18:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `require'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `eval'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as production@localhost: Exception while executing as production@localhost: rake exit status: 1
rake stdout: Now using node v12.16.1 (npm v6.13.7)
rake stderr: rake aborted!
LoadError: cannot load such file -- /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/rdkit_chem/lib/RDKitChem
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `require_relative'
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/config/application.rb:18:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `require'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `eval'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

Caused by:
SSHKit::Runner::ExecuteError: Exception while executing as production@localhost: rake exit status: 1
rake stdout: Now using node v12.16.1 (npm v6.13.7)
rake stderr: rake aborted!
LoadError: cannot load such file -- /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/rdkit_chem/lib/RDKitChem
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `require_relative'
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/config/application.rb:18:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `require'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `eval'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

Caused by:
SSHKit::Command::Failed: rake exit status: 1
rake stdout: Now using node v12.16.1 (npm v6.13.7)
rake stderr: rake aborted!
LoadError: cannot load such file -- /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/rdkit_chem/lib/RDKitChem
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `require_relative'
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/config/application.rb:18:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `require'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `eval'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

Tasks: TOP => deploy:migrate
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as production@localhost: Exception while executing as production@localhost: rake exit status: 1
rake stdout: Now using node v12.16.1 (npm v6.13.7)
rake stderr: rake aborted!
LoadError: cannot load such file -- /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/rdkit_chem/lib/RDKitChem
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `require_relative'
/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/config/application.rb:18:in `<top (required)>'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `require'
/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `eval'
/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:

 DEBUG [c15e4829] Finished in 2.686 seconds with exit status 0 (successful).

  INFO The Gemfile's dependencies are satisfied, skipping installation

  INFO [deploy:migrate] Run `rake db:migrate`

 DEBUG [d5e87a8a] Running if test ! -d /var/www/chemotion_ELN/releases/20200819151752; then echo "Directory does not exist '/var/www/chemotion_ELN/releases/20200819151752'" 1>&2; false; fi as production@localhost

 DEBUG [d5e87a8a] Command: if test ! -d /var/www/chemotion_ELN/releases/20200819151752; then echo "Directory does not exist '/var/www/chemotion_ELN/releases/20200819151752'" 1>&2; false; fi

 DEBUG [3996b1c0] Finished in 0.044 seconds with exit status 0 (successful).

  INFO [b758ceb0] Running /tmp/chemotion/nvm-exec.sh ~/.rvm/bin/rvm 2.5.6 do bundle exec rake db:migrate as production@localhost

 DEBUG [b758ceb0] Command: cd /var/www/chemotion_ELN/releases/20200819151752 && ( export NODE_VERSION="v12.16.1" RAILS_ENV="production" ; /tmp/chemotion/nvm-exec.sh ~/.rvm/bin/rvm 2.5.6 do bundle exec rake db:migrate )

 DEBUG [a93c4ab2]   Now using node v12.16.1 (npm v6.13.7)

 DEBUG [a93c4ab2]   rake aborted!

 DEBUG [a93c4ab2]   LoadError: cannot load such file -- /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/rdkit_chem/lib/RDKitChem

 DEBUG [a93c4ab2]   /home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `require_relative'

/home/production/.rvm/gems/ruby-2.5.6/bundler/gems/rdkit_chem-cf8a3890c5aa/lib/rdkit_chem.rb:3:in `<top (required)>'

/var/www/chemotion_ELN/releases/20200819151752/config/application.rb:18:in `<top (required)>'

/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `require'

/var/www/chemotion_ELN/releases/20200819151752/Rakefile:4:in `<top (required)>'

/home/production/.rvm/gems/ruby-2.5.6/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'

/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `eval'

/home/production/.rvm/gems/ruby-2.5.6/bin/ruby_executable_hooks:24:in `<main>'

 DEBUG [a93c4ab2]   (See full trace by running task with --trace)

removing tmp files..
removing tmp repo..
An error has occured
PiTrem commented 4 years ago

Hi @roma28,

compilation of the bindings for the gem rdkit_chem appears to not have completed properly (this compilation is quite demanding) so that some files are missing. You could try to re-install the gem. (be sure to have the libboost-all-dev package installed ) cd to the latest release attempt ( /var/www/chemotion_ELN/releases/20200819151752 ?) as the production user and reinstall the gem source ~/.profile && RAILS_ENV=production bundle pristine rdkit_chem . This can take some time

Then try to update again.

roma28 commented 4 years ago

Hello @PiTrem, yes, the compilation is very time consuming. At the start of it I have following message: Using rdkit_chem 2020.04.30.1 from https://github.com/CamAnNguyen/rdkit_chem (at master@cf8a389) /home/production/.rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/rubygems/ext/builder.rb:183: warning: conflicting chdir during another chdir block Is that ok?

roma28 commented 4 years ago

I've managed to successfully run it using more powerful instance. In my opinion it worth mentioning in installation guide that the cheapest instance (1 CPU core ang 1Gb of RAM) isn't enough.

PiTrem commented 4 years ago

Yes you are right. Before it was possible to install it on a raspberry Pi B. The binding of rdkit has made the installation more demanding. We ll have to look into this.