User Cannot Log In: Phusion Passenger Error

We have a single user that, out of the blue, cannot log in to OnDemand. When they punch in their username and password, they get the below error message.

When I check the logs for that user, I see the following:

[ E 2026-09-15 11:31:18.2574 361791/T40 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/ood/apps/sys/dashboard: The application encountered the following error: File exists @ dir_s_mkdir - /home/<username>/ondemand (Errno::EEXIST)
  Error ID: e10b863e
  Error details saved to: /tmp/passenger-error-oYaB62.html

[ E 2026-09-15 11:31:18.2630 361791/Ta age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is e10b863e. Please see earlier logs for details about the error.
App 373443 output: Error: The application encountered the following error: File exists @ dir_s_mkdir - /home/<username>/ondemand (Errno::EEXIST)
App 373443 output:     /usr/share/ruby/fileutils.rb:243:in `mkdir'
App 373443 output:     /usr/share/ruby/fileutils.rb:243:in `fu_mkdir'
App 373443 output:     /usr/share/ruby/fileutils.rb:221:in `block (2 levels) in mkdir_p'
App 373443 output:     /usr/share/ruby/fileutils.rb:219:in `reverse_each'
App 373443 output:     /usr/share/ruby/fileutils.rb:219:in `block in mkdir_p'
App 373443 output:     /usr/share/ruby/fileutils.rb:211:in `each'
App 373443 output:     /usr/share/ruby/fileutils.rb:211:in `mkdir_p'
App 373443 output:     /usr/share/ruby/pathname.rb:585:in `mkpath'
App 373443 output:     /var/www/ood/apps/sys/dashboard/app/models/batch_connect/session.rb:138:in `block in cache_root'
App 373443 output:     <internal:kernel>:90:in `tap'
App 373443 output:     /var/www/ood/apps/sys/dashboard/app/models/batch_connect/session.rb:138:in `cache_root'
App 373443 output:     /var/www/ood/apps/sys/dashboard/config/initializers/upgrade_to_3.0.rb:8:in `block in <top (required)>'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:51:in `each'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/railties-6.1.7.6/lib/rails/application/finisher.rb:140:in `block in <module:Finisher>'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/railties-6.1.7.6/lib/rails/initializable.rb:32:in `instance_exec'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/railties-6.1.7.6/lib/rails/initializable.rb:32:in `run'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/railties-6.1.7.6/lib/rails/initializable.rb:61:in `block in run_initializers'
App 373443 output:     /usr/share/ruby/tsort.rb:228:in `block in tsort_each'
App 373443 output:     /usr/share/ruby/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
App 373443 output:     /usr/share/ruby/tsort.rb:431:in `each_strongly_connected_component_from'
App 373443 output:     /usr/share/ruby/tsort.rb:349:in `block in each_strongly_connected_component'
App 373443 output:     /usr/share/ruby/tsort.rb:347:in `each'
App 373443 output:     /usr/share/ruby/tsort.rb:347:in `call'
App 373443 output:     /usr/share/ruby/tsort.rb:347:in `each_strongly_connected_component'
App 373443 output:     /usr/share/ruby/tsort.rb:226:in `tsort_each'
App 373443 output:     /usr/share/ruby/tsort.rb:205:in `tsort_each'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/railties-6.1.7.6/lib/rails/initializable.rb:60:in `run_initializers'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/railties-6.1.7.6/lib/rails/application.rb:391:in `initialize!'
App 373443 output:     /var/www/ood/apps/sys/dashboard/config/environment.rb:7:in `<top (required)>'
App 373443 output:     config.ru:5:in `require_relative'
App 373443 output:     config.ru:5:in `block in <main>'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/rack-2.2.8/lib/rack/builder.rb:125:in `instance_eval'
App 373443 output:     /opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/3.1.9-1/gems/rack-2.2.8/lib/rack/builder.rb:125:in `initialize'
App 373443 output:     config.ru:1:in `new'
App 373443 output:     config.ru:1:in `<main>'
App 373443 output:     /opt/rh/ondemand/root/usr/share/passenger/helper-scripts/rack-loader.rb:96:in `eval'
App 373443 output:     /opt/rh/ondemand/root/usr/share/passenger/helper-scripts/rack-loader.rb:96:in `load_app'
App 373443 output:     /opt/rh/ondemand/root/usr/share/passenger/helper-scripts/rack-loader.rb:116:in `block in <module:App>'
App 373443 output:     /opt/rh/ondemand/root/usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:399:in `run_block_and_record_step_progress'
App 373443 output:     /opt/rh/ondemand/root/usr/share/passenger/helper-scripts/rack-loader.rb:115:in `<module:App>'
App 373443 output:     /opt/rh/ondemand/root/usr/share/passenger/helper-scripts/rack-loader.rb:28:in `<module:PhusionPassenger>'
App 373443 output:     /opt/rh/ondemand/root/usr/share/passenger/helper-scripts/rack-loader.rb:27:in `<main>'

The user was able to log in to OnDemand just a few days ago and we haven’t changed anything. They can log in via SSH just fine and there’s nothing wrong with their account. It looks like it’s trying to create the ondemand directory in their home directory but that directory already exists as the user has successfully used OnDemand many times in the past. However, I did notice that the ondemand directory is empty, which is strange. Any assistance would be greatly appreciated! Thanks!

I can replicate this behavior if it’s a broken symlink. FileUtils.mkdir_p should be safe under “normal” conditions. A broken symlink seems to fit abnormal conditions - but there could be others. I’d inspect that directory and it’s parent(s) more carefully to see if there’s anything strange about it.

Jeff,

Thank you for your help! When I checked the link didn’t appear broken so I’ll have to do some more investigation. However, I haven’t done anything and the user can now log in so the issue has resolved itself. Thank you again for your help! I really appreciate it!