Install issue on RHEL7 : Could not spawn process for application
Added by Julien Savard almost 3 years ago
I followed the install procedure here :
https://www.redmine.org/projects/redmine/wiki/Install_Redmine_421_on_Centos_7
The only diffrences from the procedure are :
- Runing on RHEL7 instead of Centos7
- Redmine version 4.2.2 instead of 4.2.1
- Running Passenger 6.0.12 instead of 6.0.6
- Redmine app server is behind a http/https forward proxy (no direct access to internet. Not a reverse proxy)
More info :
[root@lqcl1-red redmine-4.2.2]# RAILS_ENV=production ./bin/about sh: svn: command not found sh: hg: command not found sh: cvs: command not found sh: bzr: command not found sh: git: command not found Environment: Redmine version 4.2.2.stable Ruby version 2.7.2-p137 (2020-10-01) [x86_64-linux] Rails version 5.2.6 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Filesystem Redmine plugins: no plugin installed
Here are the errors as ther appear in the error.log :
App 92389 output: Ignoring bigdecimal-3.1.1 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.1 App 92389 output: Ignoring date-3.2.2 because its extensions are not built. Try: gem pristine date --version 3.2.2 App 92389 output: Ignoring digest-3.0.0 because its extensions are not built. Try: gem pristine digest --version 3.0.0 App 92389 output: Ignoring etc-1.3.0 because its extensions are not built. Try: gem pristine etc --version 1.3.0 App 92389 output: Ignoring fcntl-1.0.1 because its extensions are not built. Try: gem pristine fcntl --version 1.0.1 App 92389 output: Ignoring fiddle-1.1.0 because its extensions are not built. Try: gem pristine fiddle --version 1.1.0 App 92389 output: Ignoring io-console-0.5.9 because its extensions are not built. Try: gem pristine io-console --version 0.5.9 App 92389 output: Ignoring io-wait-0.2.1 because its extensions are not built. Try: gem pristine io-wait --version 0.2.1 App 92389 output: Ignoring json-2.6.1 because its extensions are not built. Try: gem pristine json --version 2.6.1 App 92389 output: Ignoring mysql2-0.5.3 because its extensions are not built. Try: gem pristine mysql2 --version 0.5.3 App 92389 output: Ignoring nio4r-2.5.8 because its extensions are not built. Try: gem pristine nio4r --version 2.5.8 App 92389 output: Ignoring openssl-2.2.1 because its extensions are not built. Try: gem pristine openssl --version 2.2.1 App 92389 output: Ignoring passenger-6.0.12 because its extensions are not built. Try: gem pristine passenger --version 6.0.12 App 92389 output: Ignoring psych-4.0.3 because its extensions are not built. Try: gem pristine psych --version 4.0.3 App 92389 output: Ignoring puma-5.5.2 because its extensions are not built. Try: gem pristine puma --version 5.5.2 App 92389 output: Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --version 1.6.0 App 92389 output: Ignoring readline-ext-0.1.3 because its extensions are not built. Try: gem pristine readline-ext --version 0.1.3 App 92389 output: Ignoring redcarpet-3.5.1 because its extensions are not built. Try: gem pristine redcarpet --version 3.5.1 App 92389 output: Ignoring stringio-3.0.1 because its extensions are not built. Try: gem pristine stringio --version 3.0.1 App 92389 output: Ignoring strscan-3.0.1 because its extensions are not built. Try: gem pristine strscan --version 3.0.1 App 92389 output: Ignoring websocket-driver-0.7.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.5 App 92389 output: Ignoring zlib-2.1.1 because its extensions are not built. Try: gem pristine zlib --version 2.1.1 App 92389 output: [passenger_native_support.so] not compiling because PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 App 92389 output: [passenger_native_support.so] not downloading because PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 App 92389 output: [passenger_native_support.so] will not be used (can't compile or download) App 92389 output: --> Passenger will still operate normally. App 92389 output: Error: The application encountered the following error: Could not find redcarpet-3.5.1, mysql2-0.5.3, puma-5.5.2, racc-1.6.0, nio4r-2.5.8, websocket-driver-0.7.5 in any of the sources (Bundler::GemNotFound) App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler/definition.rb:492:in `materialize' App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler/definition.rb:190:in `specs' App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler/definition.rb:238:in `specs_for' App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler/runtime.rb:18:in `setup' App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler.rb:151:in `setup' App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler/setup.rb:20:in `block in <top (required)>' App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler/ui/shell.rb:136:in `with_level' App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler/ui/shell.rb:88:in `silence' App 92389 output: /usr/local/rvm/gems/ruby-2.7.2/gems/bundler-2.3.1/lib/bundler/setup.rb:20:in `<top (required)>' App 92389 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require' App 92389 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require' App 92389 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `activate_gem' App 92389 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code' App 92389 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:544:in `running_bundler' App 92389 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code' App 92389 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app' App 92389 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>' App 92389 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:397:in `run_block_and_record_step_progress' App 92389 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>' App 92389 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>' App 92389 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>' [ E 2021-12-29 15:47:10.8708 92362/Tf age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/html/redmine-4.2.2: The application encountered the following error: Could not find redcarpet-3.5.1, mysql2-0.5.3, puma-5.5.2, racc-1.6.0, nio4r-2.5.8, websocket-driver-0.7.5 in any of the sources (Bundler::GemNotFound) Error ID: 333d0e78 Error details saved to: /tmp/passenger-error-un2Jhm.html [ E 2021-12-29 15:47:10.8747 92362/T8 age/Cor/Con/CheckoutSession.cpp:283 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 333d0e78. Please see earlier logs for details about the error.
All the rpms packages seems to be correctly installed as well as all the gems. Ruby seems to be to the right version and passenger seems to be OK too:
[root@lqcl1-red redmine-4.2.2]# rvm reload RVM reloaded! [root@lqcl1-red redmine-4.2.2]# rvm requirements run Checking requirements for centos. Requirements installation successful. [root@lqcl1-red redmine-4.2.2]# rvm install 2.7 Already installed ruby-2.7.2. To reinstall use: rvm reinstall ruby-2.7.2 [root@lqcl1-red redmine-4.2.2]# rvm list =* ruby-2.7.2 [ x86_64 ] # => - current # =* - current && default # * - default [root@lqcl1-red redmine-4.2.2]# ruby --version ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] [root@lqcl1-red redmine-4.2.2]# cd /var/www/html/redmine-4.2.2/ RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too, you can ignore these warnings with 'rvm rvmrc warning ignore /var/www/html/redmine-4.2.2/Gemfile'. To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'. Unknown ruby interpreter version (do not know how to handle): >=2.4.0,<2.8.0. [root@lqcl1-red redmine-4.2.2]# gem install bundler Successfully installed bundler-2.3.4 Done installing documentation for bundler after 0 seconds 1 gem installed [root@lqcl1-red redmine-4.2.2]# bundle install --without development test [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'development test'`, and stop using this flag Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Using rake 13.0.6 Using concurrent-ruby 1.1.9 Using i18n 1.8.11 Using minitest 5.15.0 Using thread_safe 0.3.6 Using tzinfo 1.2.9 Using activesupport 5.2.6 Using builder 3.2.4 Using erubi 1.10.0 Using racc 1.6.0 Using nokogiri 1.11.7 (x86_64-linux) Using rails-dom-testing 2.0.3 Using crass 1.0.6 Using loofah 2.13.0 Using rails-html-sanitizer 1.4.2 Using actionview 5.2.6 Using rack 2.2.3 Using rack-test 1.1.0 Using actionpack 5.2.6 Using nio4r 2.5.8 Using websocket-extensions 0.1.5 Using websocket-driver 0.7.5 Using actioncable 5.2.6 Using globalid 1.0.0 Using activejob 5.2.6 Using mini_mime 1.0.3 Using mail 2.7.1 Using actionmailer 5.2.6 Using method_source 1.0.0 Using thor 1.1.0 Using railties 5.2.6 Using actionpack-xml_parser 2.0.1 Using activemodel 5.2.6 Using arel 9.0.0 Using activerecord 5.2.6 Using marcel 1.0.2 Using activestorage 5.2.6 Using public_suffix 4.0.6 Using addressable 2.8.0 Using bundler 2.3.1 Using chunky_png 1.4.0 Using css_parser 1.11.0 Using csv 3.1.9 Using htmlentities 4.3.4 Using mini_magick 4.11.0 Using mysql2 0.5.3 Using net-ldap 0.17.0 Using ruby-openid 2.9.2 Using rack-openid 1.4.2 Using sprockets 4.0.2 Using sprockets-rails 3.4.2 Using rails 5.2.6 Using rbpdf-font 1.19.1 Using rbpdf 1.20.1 Using redcarpet 3.5.1 Using request_store 1.5.0 Using roadie 4.0.0 Using roadie-rails 2.2.0 Using rotp 6.2.0 Using rouge 3.26.1 Using rqrcode_core 1.2.0 Using rqrcode 2.1.0 Using rubyzip 2.3.2 Bundle complete! 36 Gemfile dependencies, 63 gems now installed. Gems in the groups 'development' and 'test' were not installed. Bundled gems are installed into `./vendor/bundle` [root@lqcl1-red redmine-4.2.2]# bundle exec rake generate_secret_token Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead. [root@lqcl1-red redmine-4.2.2]# RAILS_ENV=production REDMINE_LANG=en bundle exec rake db:migrate Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead. [root@lqcl1-red redmine-4.2.2]# RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead. Some configuration data is already loaded. [root@lqcl1-red redmine-4.2.2]# yum install -y pygpgme curl Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Package pygpgme-0.3-9.el7.x86_64 already installed and latest version Package curl-7.29.0-59.el7_9.1.x86_64 already installed and latest version Nothing to do [root@lqcl1-red redmine-4.2.2]# yum install -y mod_passenger Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Package mod_passenger-6.0.12-1.el7.x86_64 already installed and latest version Nothing to do [root@lqcl1-red redmine-4.2.2]# /usr/bin/passenger-config validate-install What would you like to validate? Use <space> to select. If the menu doesn't display correctly, press '!' ‣ ⬢ Passenger itself ⬡ Apache ------------------------------------------------------------------------- * Checking whether this Passenger install is in PATH... ✓ * Checking whether there are no other Passenger installations... (!) You are currently validating against Phusion Passenger(R) 6.0.12, located in: /usr/bin/passenger Besides this Passenger installation, the following other Passenger installations have also been detected: /usr/local/rvm/gems/ruby-2.7.2/bin/passenger Please uninstall these other Passenger installations to avoid confusion or conflicts. Detected 0 error(s), 1 warning(s). [root@lqcl1-red redmine-4.2.2]# /usr/bin/passenger-config validate-install What would you like to validate? Use <space> to select. If the menu doesn't display correctly, press '!' ⬢ Passenger itself ‣ ⬡ Apache ------------------------------------------------------------------------- * Checking whether this Passenger install is in PATH... ✓ * Checking whether there are no other Passenger installations... (!) You are currently validating against Phusion Passenger(R) 6.0.12, located in: /usr/bin/passenger Besides this Passenger installation, the following other Passenger installations have also been detected: /usr/local/rvm/gems/ruby-2.7.2/bin/passenger Please uninstall these other Passenger installations to avoid confusion or conflicts. Detected 0 error(s), 1 warning(s). [root@lqcl1-red redmine-4.2.2]# /usr/bin/passenger-config --ruby-command passenger-config was invoked through the following Ruby interpreter: Command: /usr/local/rvm/gems/ruby-2.7.2/wrappers/ruby Version: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] To use in Apache: PassengerRuby /usr/local/rvm/gems/ruby-2.7.2/wrappers/ruby To use in Nginx : passenger_ruby /usr/local/rvm/gems/ruby-2.7.2/wrappers/ruby To use with Standalone: /usr/local/rvm/gems/ruby-2.7.2/wrappers/ruby /usr/bin/passenger start ## Notes for RVM users Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config about ruby-command'.
apache vhost file is pretty similar too (Seems I can't paste a vhost file without beeing blocked... Adding it as screenshot)
Did also change permission as specified.
I also tried to debug a little. It seems when running passenger without apache I can access redmine login page :
[root@lqcl1-red redmine-4.2.2]# systemctl stop httpd [root@lqcl1-red redmine-4.2.2]# rails server webrick -p 80 -e production => Booting WEBrick => Rails 5.2.6 application starting in production on http://0.0.0.0:80 => Run `rails server -h` for more startup options [2021-12-29 16:26:06] INFO WEBrick 1.6.0 [2021-12-29 16:26:06] INFO ruby 2.7.2 (2020-10-01) [x86_64-linux] [2021-12-29 16:26:06] INFO WEBrick::HTTPServer#start: pid=96044 port=80 10.27.128.80 - - [29/Dec/2021:16:26:17 EST] "GET / HTTP/1.1" 302 153 - -> / 10.27.128.80 - - [29/Dec/2021:16:26:17 EST] "GET /login?back_url=http%3A%2F%2Frp.redmine.qual.sqgd.com%2F HTTP/1.1" 200 3894 - -> /login?back_url=http%3A%2F%2Frp.redmine.qual.sqgd.com%2F [2021-12-29 16:26:35] INFO going to shutdown ... [2021-12-29 16:26:35] INFO WEBrick::HTTPServer#start done. Exiting
Issue seems to be somewhere between apache, passenger and ruby but i can't figure it out. Like if passenger does not use the right ruby but there is only one installed so I'm out of idea. Any help would be aprreciated.
Thanks!
Redmine-vhost.jpg (28 KB) Redmine-vhost.jpg |
Replies (10)
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Fletcher Johnston almost 3 years ago
Are you running SELinux? If you disable SELinux do things start to work?
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Julien Savard almost 3 years ago
SElinux is on Permissive mode. Still doesn't work. :(
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Fletcher Johnston almost 3 years ago
Hmm, that's too bad. Always nice when putting SELinux into permissive mode magically fixes everything.
After taking a closer look at your post, I think I see two possible issues:
1) In your vhost, the Directory block path does not match the DocumentRoot path. I think it should be: <Directory "/var/www/html/redmine-4.2.2/public">
2) It looks like you have two versions of passenger installed. Somehow the GEM version got installed. If fixing the vhost above doesn't do it, I'd try to remove the GEM version of Passenger and see if that helps.
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Julien Savard almost 3 years ago
Hi,
1) Indeed there was a typo there. Changed it to /var/www/html/redmine-4.2.2/public. Still not working
2) Removed the gem version of passenger. Still getting this error :
App 31304 output: Ignoring bigdecimal-3.1.1 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.1 App 31304 output: Ignoring date-3.2.2 because its extensions are not built. Try: gem pristine date --version 3.2.2 App 31304 output: Ignoring digest-3.0.0 because its extensions are not built. Try: gem pristine digest --version 3.0.0 App 31304 output: Ignoring etc-1.3.0 because its extensions are not built. Try: gem pristine etc --version 1.3.0 App 31304 output: Ignoring fcntl-1.0.1 because its extensions are not built. Try: gem pristine fcntl --version 1.0.1 App 31304 output: Ignoring fiddle-1.1.0 because its extensions are not built. Try: gem pristine fiddle --version 1.1.0 App 31304 output: Ignoring io-console-0.5.9 because its extensions are not built. Try: gem pristine io-console --version 0.5.9 App 31304 output: Ignoring io-wait-0.2.1 because its extensions are not built. Try: gem pristine io-wait --version 0.2.1 App 31304 output: Ignoring json-2.6.1 because its extensions are not built. Try: gem pristine json --version 2.6.1 App 31304 output: Ignoring mysql2-0.5.3 because its extensions are not built. Try: gem pristine mysql2 --version 0.5.3 App 31304 output: Ignoring nio4r-2.5.8 because its extensions are not built. Try: gem pristine nio4r --version 2.5.8 App 31304 output: Ignoring openssl-2.2.1 because its extensions are not built. Try: gem pristine openssl --version 2.2.1 App 31304 output: Ignoring psych-4.0.3 because its extensions are not built. Try: gem pristine psych --version 4.0.3 App 31304 output: Ignoring puma-5.5.2 because its extensions are not built. Try: gem pristine puma --version 5.5.2 App 31304 output: Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --version 1.6.0 App 31304 output: Ignoring readline-ext-0.1.3 because its extensions are not built. Try: gem pristine readline-ext --version 0.1.3 App 31304 output: Ignoring redcarpet-3.5.1 because its extensions are not built. Try: gem pristine redcarpet --version 3.5.1 App 31304 output: Ignoring stringio-3.0.1 because its extensions are not built. Try: gem pristine stringio --version 3.0.1 App 31304 output: Ignoring strscan-3.0.1 because its extensions are not built. Try: gem pristine strscan --version 3.0.1 App 31304 output: Ignoring websocket-driver-0.7.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.5 App 31304 output: Ignoring zlib-2.1.1 because its extensions are not built. Try: gem pristine zlib --version 2.1.1 App 31304 output: [passenger_native_support.so] not compiling because PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 App 31304 output: [passenger_native_support.so] not downloading because PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 App 31304 output: [passenger_native_support.so] will not be used (can't compile or download) App 31304 output: --> Passenger will still operate normally. App 31304 output: Error: The application encountered the following error: Could not find rails-5.2.6, rouge-3.26.1, mini_mime-1.0.3, roadie-rails-2.2.0, csv-3.1.9, nokogiri-1.11.7-x86_64-linux, redcarpet-3.5.1, mysql2-0.5.3, puma-5.5.2, actioncable-5.2.6, actionmailer-5.2.6, activejob-5.2.6, activerecord-5.2.6, activestorage-5.2.6, railties-5.2.6, racc-1.6.0, nio4r-2.5.8, websocket-driver-0.7.5 in any of the sources (Bundler::GemNotFound) App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:492:in `materialize' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:190:in `specs' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:238:in `specs_for' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:18:in `setup' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler.rb:151:in `setup' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:20:in `block in <top (required)>' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/ui/shell.rb:136:in `with_level' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/ui/shell.rb:88:in `silence' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:20:in `<top (required)>' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require' App 31304 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require' App 31304 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `activate_gem' App 31304 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code' App 31304 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:544:in `running_bundler' App 31304 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code' App 31304 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app' App 31304 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>' App 31304 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:397:in `run_block_and_record_step_progress' App 31304 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>' App 31304 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>' App 31304 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>' [ E 2022-01-06 14:39:39.4103 30995/Tk age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/html/redmine-4.2.2: The application encountered the following error: Could not find rails-5.2.6, rouge-3.26.1, mini_mime-1.0.3, roadie-rails-2.2.0, csv-3.1.9, nokogiri-1.11.7-x86_64-linux, redcarpet-3.5.1, mysql2-0.5.3, puma-5.5.2, actioncable-5.2.6, actionmailer-5.2.6, activejob-5.2.6, activerecord-5.2.6, activestorage-5.2.6, railties-5.2.6, racc-1.6.0, nio4r-2.5.8, websocket-driver-0.7.5 in any of the sources (Bundler::GemNotFound) Error ID: 7bc964fe Error details saved to: /tmp/passenger-error-fEyoG6.html [ E 2022-01-06 14:39:39.4141 30995/Ta age/Cor/Con/CheckoutSession.cpp:283 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 7bc964fe. Please see earlier logs for details about the error.
I double check the version installed and there seems to be an issue here :
[root@lqcl1-red redmine]# gem list | egrep "rails|rouge|mini|csv" csv (3.2.1, default: 3.1.2) mini_magick (4.11.0) mini_mime (1.1.2) minitest (5.15.0, 5.13.0) rails (7.0.0) rails-dom-testing (2.0.3) rails-html-sanitizer (1.4.2) roadie-rails (2.3.0) rouge (3.27.0) rubocop-rails (2.9.1) sprockets-rails (3.4.2)
Is it there any way to force install a gem version ?
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Julien Savard almost 3 years ago
I found a way to install specific version of gem with "gem install [gem_name] -v [version]". Some gems seems to be removed from the error message however there is still some that seems to be there but for an unknown reason are simply not "seen" :
App 34447 output: Ignoring bigdecimal-3.1.1 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.1 App 34447 output: Ignoring date-3.2.2 because its extensions are not built. Try: gem pristine date --version 3.2.2 App 34447 output: Ignoring digest-3.0.0 because its extensions are not built. Try: gem pristine digest --version 3.0.0 App 34447 output: Ignoring etc-1.3.0 because its extensions are not built. Try: gem pristine etc --version 1.3.0 App 34447 output: Ignoring fcntl-1.0.1 because its extensions are not built. Try: gem pristine fcntl --version 1.0.1 App 34447 output: Ignoring fiddle-1.1.0 because its extensions are not built. Try: gem pristine fiddle --version 1.1.0 App 34447 output: Ignoring io-console-0.5.9 because its extensions are not built. Try: gem pristine io-console --version 0.5.9 App 34447 output: Ignoring io-wait-0.2.1 because its extensions are not built. Try: gem pristine io-wait --version 0.2.1 App 34447 output: Ignoring json-2.6.1 because its extensions are not built. Try: gem pristine json --version 2.6.1 App 34447 output: Ignoring mysql2-0.5.3 because its extensions are not built. Try: gem pristine mysql2 --version 0.5.3 App 34447 output: Ignoring nio4r-2.5.8 because its extensions are not built. Try: gem pristine nio4r --version 2.5.8 App 34447 output: Ignoring openssl-2.2.1 because its extensions are not built. Try: gem pristine openssl --version 2.2.1 App 34447 output: Ignoring psych-4.0.3 because its extensions are not built. Try: gem pristine psych --version 4.0.3 App 34447 output: Ignoring puma-5.5.2 because its extensions are not built. Try: gem pristine puma --version 5.5.2 App 34447 output: Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --version 1.6.0 App 34447 output: Ignoring readline-ext-0.1.3 because its extensions are not built. Try: gem pristine readline-ext --version 0.1.3 App 34447 output: Ignoring redcarpet-3.5.1 because its extensions are not built. Try: gem pristine redcarpet --version 3.5.1 App 34447 output: Ignoring stringio-3.0.1 because its extensions are not built. Try: gem pristine stringio --version 3.0.1 App 34447 output: Ignoring strscan-3.0.1 because its extensions are not built. Try: gem pristine strscan --version 3.0.1 App 34447 output: Ignoring websocket-driver-0.7.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.5 App 34447 output: Ignoring zlib-2.1.1 because its extensions are not built. Try: gem pristine zlib --version 2.1.1 App 34447 output: [passenger_native_support.so] not compiling because PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 App 34447 output: [passenger_native_support.so] not downloading because PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 App 34447 output: [passenger_native_support.so] will not be used (can't compile or download) App 34447 output: --> Passenger will still operate normally. App 34447 output: Error: The application encountered the following error: Could not find redcarpet-3.5.1, mysql2-0.5.3, puma-5.5.2, racc-1.6.0, nio4r-2.5.8, websocket-driver-0.7.5 in any of the sources (Bundler::GemNotFound) App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:492:in `materialize' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:190:in `specs' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:238:in `specs_for' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:18:in `setup' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler.rb:151:in `setup' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:20:in `block in <top (required)>' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/ui/shell.rb:136:in `with_level' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/ui/shell.rb:88:in `silence' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:20:in `<top (required)>' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require' App 34447 output: /usr/local/rvm/rubies/ruby-2.7.2/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require' App 34447 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `activate_gem' App 34447 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code' App 34447 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:544:in `running_bundler' App 34447 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code' App 34447 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app' App 34447 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>' App 34447 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:397:in `run_block_and_record_step_progress' App 34447 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>' App 34447 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>' App 34447 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>' [ E 2022-01-06 14:57:51.9691 30995/Tu age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/html/redmine-4.2.2: The application encountered the following error: Could not find redcarpet-3.5.1, mysql2-0.5.3, puma-5.5.2, racc-1.6.0, nio4r-2.5.8, websocket-driver-0.7.5 in any of the sources (Bundler::GemNotFound) Error ID: eafcba65 Error details saved to: /tmp/passenger-error-x62ykb.html [ E 2022-01-06 14:57:51.9723 30995/Ta age/Cor/Con/CheckoutSession.cpp:283 ]: [Client 2-2] Cannot checkout session because a spawning error occurred. The identifier of the error is eafcba65. Please see earlier logs for details about the error. [root@lqcl1-red redmine]# gem list | grep redcarpet redcarpet (3.5.1) [root@lqcl1-red redmine]# gem list | egrep "redcarpet|mysql2|puma|racc|nio4r|websocket" mysql2 (0.5.3) nio4r (2.5.8) puma (5.5.2) racc (1.6.0, default: 1.4.16) redcarpet (3.5.1) websocket-driver (0.7.5) websocket-extensions (0.1.5) [root@lqcl1-red redmine]#
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Fletcher Johnston almost 3 years ago
Interesting that it appears to work when you run webrick directly.
Are these apache, redmine or ruby error logs that you're posting? Is there anything showing up in the apache error/access logs? Can you see the requests hitting apache?
Sorry I'm not able to be more helpful. I don't have access to RHEL7 and am not super familiar with it.
If I have some time tomorrow I'll try to replicate your setup on a fresh CentOS7 box to see if I run into the same issue.
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Fletcher Johnston almost 3 years ago
I just walked through the steps in the howto on a fresh CentOS7 install and it all worked fine for me. I installed Redmine 4.2.3 and Passenger 6.0.12. I configured the apache vhost as in the guide since I'm not a vhost expert and I'm not sure how to go about setting up a forward proxy as you describe.
Looking at your logs again, it really seems like the issue is that apache is not using the correct version of ruby, or some sort of path is set incorrectly; the fact that the logs mention being unable to find various gems that were installed is what is really catching my attention. Maybe this is because of the forward proxy as opposed to the reverse proxy? Does it work if you configure your vhost like in the guide, or do you still see the errors?
Sorry I couldn't be more help.
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Julien Savard almost 3 years ago
Hi,
the error you see is the errors in apache log but it seems to be a mix betwwen apache logs and application logs.
I might have to clarify some facts about the proxy.
A REVERSE PROXY takes the traffic FROM the internet and send it to one or more web/application server.
A FORWARD PROXY take the request FROM the application servers TO access internet.
Any traffic TO the application (redmine) goes through a reverse proxy.
Any traffic comming from (and innitiated from) the application server ( for instance curl, wget or if you open a browser) will go through a forward proxy.
Forward proxy a mostly used to filter traffic from users to make sure they don't access forbidden sites ( for instance p*rn) on the corporate network or (in my case) if you want to add some monitoring on what access the internet from your servers.
It shouldn't affect anything unless the application NEEDS to download things from the internet on start.
FYI : I have been able to make it work but I had to make it my own way. I will post my procedure today.
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Julien Savard almost 3 years ago
Related :
- My servers must use a forward proxy to reach internet (for curl, wget, etc...)
- I also have a reverse proxy configured with a vhost and SSL Certificate so I'm not going to explain this part
- I also have a MariaDB Server with redmine database and user. I'm not going to explain this part too
- I really wanted to run redmine as a normal user not root. I used port 3000 because no user other than root can bind a service on port <= 1024
- I also wanted to use Red Hat Software Collection. It does provide update and security patches for ruby27 with yum.
- Redmine was installed in /opt. We tend to use /var/www for apache or nginx. Most of the HowTo i've seen seems to install redmine in /var/www so if you don't like /opt you can go with /var/www
So for the procedure / How To :
- AS ROOT
yum install -y gcc rh-ruby27.x86_64 rh-ruby27-ruby.x86_64 rh-ruby27-ruby-devel.x86_64 rh-ruby27-rubygem-bundler.noarch rh-ruby27-rubygem-did_you_mean.noarch rh-ruby27-rubygem-minitest.noarch rh-ruby27-rubygem-mysql2.x86_64 rh-ruby27-rubygem-mysql2-doc.noarch rh-ruby27-rubygem-racc.x86_64 # If your server needs to go through a Forward Proxy to reach Internet #export http_proxy="http://PROXY_FQDN_OR_IP:PORT_HERE"; export https_proxy="https://PROXY_FQDN_OR_IP:PORT_HERE" wget https://www.redmine.org/releases/redmine-4.2.3.tar.gz wget http://repo.okay.com.mx/centos/7/x86_64/release/mariadb-connector-c-3.0.10-1.el7.x86_64.rpm wget http://repo.okay.com.mx/centos/7/x86_64/release/mariadb-connector-c-devel-3.0.10-1.el7.x86_64.rpm yum localinstall -y mariadb-connector-c-devel-3.0.10-1.el7.x86_64.rpm mariadb-connector-c-3.0.10-1.el7.x86_64.rpm useradd redmine tar -C /opt/ -xvf redmine-4.2.3.tar.gz #<- Replace 4.2.3 by your version if needed cd /opt/ chown redmine:redmine redmine-4.2.3 ln -s redmine-4.2.3/ redmine firewall-cmd --zone=public --add-port=3000/tcp --permanent systemctl restart firewalld
#AS REDMINE USER
su - redmine # If your server needs to go through a Forward Proxy to reach Internet #export http_proxy="http://PROXY_FQDN_OR_IP:PORT_HERE"; export https_proxy="https://PROXY_FQDN_OR_IP:PORT_HERE" . /opt/rh/rh-ruby27/enable cd /opt/redmine gem install passenger gem install bundler cd /opt/redmine/config/ cp database.yml.example database.yml vim database.yml ################# production: adapter: mysql2 database: [DATABASE_NAME_HERE] host: [DATABASE_HOST_HERE] username: [DATABASE_USERMAME_HERE] password: "[DATABASE_PASSWORD_HERE]" # Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7 ################# cd /opt/redmine bundle config set --local path '/opt/redmine/vendor/bundle' #Don't mess up the Software Collection Ruby GEM_PATH=$GEM_PATH:/opt/redmine/vendor/bundle/ruby/2.7.0/gems/ bundle install gem install yard gem install railties /opt/redmine-4.2.3/vendor/bundle/ruby/2.7.0/bin/yard config --gem-install-yri RAILS_ENV=production bundle exec rake generate_secret_token RAILS_ENV=production bundle exec rake db:migrate #Test /opt/rh/rh-ruby27/root/bin/ruby /opt/redmine-4.2.3/vendor/bundle/ruby/2.7.0/bin/rails server -b 0.0.0.0 -e production -p 3000 #If you want redmine runned as a simple user, use port number over 1024 (no port 80) #Stop Redmine with Ctrl + C
- AS ROOT (AGAIN)
vim /etc/systemd/system/redmine.service ################# [Unit] Description=Redmine server After=network.target remote-fs.target nss-lookup.target [Service] Type=simple User=redmine Group=redmine EnvironmentFile=/etc/sysconfig/httpd Environment="PATH=/opt/rh/rh-ruby27/root/usr/local/bin:/opt/rh/rh-ruby27/root/usr/bin" Environment="LD_LIBRARY_PATH=/opt/rh/rh-ruby27/root/usr/local/lib64:/opt/rh/rh-ruby27/root/usr/lib64" Environment="MANPATH=/opt/rh/rh-ruby27/root/usr/local/share/man:/opt/rh/rh-ruby27/root/usr/share/man" Environment="PKG_CONFIG_PATH=/opt/rh/rh-ruby27/root/usr/local/lib64/pkgconfig:/opt/rh/rh-ruby27/root/usr/lib64/pkgconfig" Environment="XDG_DATA_DIRS=/opt/rh/rh-ruby27/root/usr/local/share:/opt/rh/rh-ruby27/root/usr/share" WorkingDirectory=/opt/redmine ExecStart=/opt/rh/rh-ruby27/root/bin/ruby /opt/redmine-4.2.3/vendor/bundle/ruby/2.7.0/bin/rails server -b 0.0.0.0 -e production -p 3000 TimeoutSec=300 ExecStop=/bin/kill -WINCH ${MAINPID} [Install] WantedBy=multi-user.target ################# systemctl daemon-reload systemctl start redmine systemctl status redmine
RE: Install issue on RHEL7 : Could not spawn process for application - Added by Fletcher Johnston almost 3 years ago
Thanks for the clarification re FORWARD and REVERSE proxies.
It looks like the key was setting the appropriate paths so that redmine could find the GEMs?
Glad you were able to get it working! Seems like there is some interesting nuances to working with RHEL.