You are here
Home > Solved >

Phusion Passenger Preloader Error

You are on this page means, there is not much information on Error ID – c51399ee on google. Hope this post on how to solve phusion passenger preloader error might save your day. Well the LoadError comes from a failure by Ruby to load the phusion passenger.so module.  

The Secret of Error ID: c51399ee

I am using – ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [aarch64-linux] , this issue appears on ARM – aarch64 based system and it works well with ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu].

You can check apache error log from your /var/log/apach2 directory.

$ tail -100 /var/log/apache2/error.log
App 2001 stderr: /usr/bin/passenger-config:27:in `require': cannot load such file -- phusion_passenger (LoadError)
App 2001 stderr:        from /usr/bin/passenger-config:27:in `<main>'
App 2001 stdout:
[ 2021-09-30 07:27:30.0924 1907/ffff957fa190 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/<app>/current: An error occurred while starting up the preloader.
Error ID: c51399ee
Error details saved to: /tmp/passenger-error-3xV1ZX.html
Cannot checkout session because a spawning error occurred. The identifier of the error is c51399ee. Please see earlier logs for details about the error.
App 2158 stdout:

Good thing is you do not have error like “stack smashing detected” yet.

Lets Start Digging More

Confirm which version of Passenger is currently installed.

$ dpkg -l | grep passenger
ii  libapache2-mod-passenger          5.0.30-1+deb9u1build0.18.04.1       arm64        Rails and Rack support for Apache2
ii  passenger                         5.0.30-1+deb9u1build0.18.04.1       arm64        Rails and Rack support

Now confirm passenger installation path and number of installation on your system using following command

$ 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... (!)
Please add /home/ubuntu/.rvm/gems/ruby-2.7.0/gems/passenger-6.0.10/bin to PATH.
Otherwise you will get "command not found" errors upon running
any Passenger commands.
Learn more at about PATH at:
https://www.phusionpassenger.com/library/indepth/environment_variables.html#the-path-environment-variable
* Checking whether there are no other Passenger installations... (!)
You are currently validating against Phusion Passenger(R) 6.0.10, located in:
/home/ubuntu/.rvm/gems/ruby-2.7.0/gems/passenger-6.0.10/bin/passenger
Besides this Passenger installation, the following other
Passenger installations have also been detected:
/home/ubuntu/.rvm/gems/ruby-2.7.0/bin/passenger
/usr/local/bin/passenger
Please uninstall these other Passenger installations to avoid
confusion or conflicts.
Detected 0 error(s), 2 warning(s).

Though it gives warnings, you should correct the installation and use proper path.

If everything looks good then you should get following message

$ 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... ✓
Everything looks good. :-)
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... ✓
Everything looks good. :-)
$ passenger-config list-instances
Name                       PID      Description
--------------------------------------------------------------------------
kWPoouHW                   12164    Apache/2.4.29 (Ubuntu) Phusion_Passenger/6.0.11

passenger-config list-instances will show you phusion passenger version along with PID.

install libpcre3-dev to check “passenger-config install-standalone-runtime”

$sudo apt-get install libpcre3-dev

Here is quick way to solve preloader error

Following are quick fixes,

To install Phusion Passenger(R) against this specific Apache version:

/home/ubuntu/.rvm/gems/ruby-2.7.0/wrappers/ruby /home/ubuntu/.rvm/gems/ruby-2.7.0/gems/passenger-6.0.10/bin/passenger-install-apache2-module --apxs2-path='/usr/bin/apxs'

On ARM-arch64-linux system this issue happens to be there, but as per the online forum, it appears to happen on VM or docker. I am using AWS S2, so this issue should not have popped up. Are you also facing stack Smashed on AWS cloud server? If yes, do share your solution.

I was lucky to have development environment running on this server and it was easy for me to migrate from ARM – arch64 to x86_64. ARM support at the libv8-node repo is still under development and its recommended to manually cross compile to aarch64 on x86_64 [libv8-node host=x86_64/target=aarch64 ].

gem install libv8 host=x86_64/target=aarch64

Once this is done, verify if passenger is running.

$ passenger-status
Version : 6.0.11
Date    : 2021-10-07 07:40:34 +0530
Instance: kWPoouHW (Apache/2.4.29 (Ubuntu) Phusion_Passenger/6.0.11)
----------- General information -----------
Max pool size : 4
App groups    : 1
Processes     : 2
Requests in top-level queue : 0
----------- Application groups -----------
/var/www/vtpbook/current (development):
App root: /var/www/vtpbook/current
Requests in queue: 0
* PID: 12423   Sessions: 0       Processed: 181     Uptime: 23h 43m 21s
CPU: 0%      Memory  : 386M    Last used: 57s ago
* PID: 12446   Sessions: 0       Processed: 1       Uptime: 23h 43m 20s
CPU: 0%      Memory  : 177M    Last used: 8h 8m 9

re-install phusion passenger

If you are not getting above output for passenger status, then uninstall passenger and re-install it.

$ sudo apt-get remove -y passenger libapache2-mod-passenger
$ sudo apt-get remove libapache2-mod-passenger
$ gem install passenger --no-document
$ passenger-install-apache2-module

Install nodejs to latest version

This worked for me, as I was running older version of node

$ node --version
v8.10.0

I had updated node and npm as follows.

$ cd ~
$ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ node --version
v16.10.0
$ npm --version
7.24.0
Top
%d bloggers like this: