Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license CC4-BY
posted at 08. Mar '24

My Passenger Was Really Old

Couple of weeks ago I updated gems of myrtana and when I wanted to deploy, I got a really weird message:

[ E 2024-02-11 23:18:03.5773 33253/Ta age/Cor/Con/CheckoutSession.cpp:283 ]: [Client 2-72] Cannot checkout session because a spawning error occurred. The identifier of the error is 74d63c84. Please see earlier logs for details about the error.
App 96770 output: Error: The application encountered the following error: You have already activated base64 0.1.1, but your Gemfile requires base64 0.2.0. Since base64 is a default gem, you can either remove your dependency on it or try updating to a ne
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:304:in `check_for_activated_spec!'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:25:in `block in setup'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/spec_set.rb:206:in `each'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/spec_set.rb:206:in `each'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:24:in `map'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/runtime.rb:24:in `setup'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler.rb:162:in `setup'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/setup.rb:26:in `block in <top (required)>'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/ui/shell.rb:159:in `with_level'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/ui/shell.rb:111:in `silence'
App 96770 output:     /home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/setup.rb:26:in `<top (required)>'
App 96770 output:     <internal:/home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
App 96770 output:     <internal:/home/myrtana_sk/.rbenv/versions/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
App 96770 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `activate_gem'
App 96770 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
App 96770 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:544:in `running_bundler'
App 96770 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
App 96770 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app'
App 96770 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
App 96770 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:397:in `run_block_and_record_step_progress'
App 96770 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
App 96770 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
App 96770 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
[ E 2024-02-11 23:18:37.8920 33253/T4m age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /home/myrtana_sk/current: The application encountered the following error: You have already activated base64 0.1.1, but your Gemfile req
  Error ID: 88951123
  Error details saved to: /tmp/passenger-error-qZka67.html

After three attempts I found out that my passenger was really old. It took me two years to notice. It happened when I switched from passenger repository to Debian one. The version installed is “newer” than all passenger versions in Debian repository. Honestly, this is very shitty configuration of passenger repository and was really hard to overwrite.

I use Apache, so I need to have passenger and libapache2-mod-passenger installed.

Old Passenger

My passenger was quite old since it didn’t update automatically going back to Buster (2019).

root@starz:/etc/apache2/sites-enabled# dpkg -l | grep passenger
ii  libapache2-mod-passenger           1:6.0.12-1~buster1                           amd64        Apache integration for Passenger application server
rc  libnginx-mod-http-passenger        1:6.0.2-1~stretch1                           amd64        Nginx integration for Passenger application server
ii  passenger                          1:6.0.12-1~buster1                           amd64        Application server for Ruby, Node.js, Python, Meteor
ii  passenger-dev                      1:6.0.12-1~buster1                           amd64        Dependencies for compiling an Nginx module
ii  passenger-doc                      1:6.0.12-1~buster1                           all          Documentation for Passenger application server

The changelong is pretty clear: https://github.com/phusion/passenger/blob/stable-6.0/CHANGELOG

I used to have separate repositories for mariadb and passenger:

# MariaDB 10.1 repository list - created 2015-12-18 00:02 UTC
# http://mariadb.org/mariadb/repositories/
#deb [arch=amd64,i386] http://mirror.vpsfree.cz/mariadb/repo/10.1/debian stretch main
#deb-src http://mirror.vpsfree.cz/mariadb/repo/10.1/debian stretch main

# Debian 9
#deb https://oss-binaries.phusionpassenger.com/apt/passenger buster main

deb http://ftp.cz.debian.org/debian/ bookworm main
deb https://deb.debian.org/debian-security bookworm-security main
deb http://ftp.cz.debian.org/debian/ bookworm-updates main
deb http://ftp.debian.org/debian bookworm-backports main

Overwrite The Old (Higher) version

Installing the package of course didn’t work.

root@starz:/etc/apache2/sites-enabled# apt-get install passenger
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
passenger is already the newest version (1:6.0.12-1~buster1).
passenger set to manually installed.
The following packages were automatically installed and are no longer required:
  libboost-locale1.74.0 libboost-thread1.74.0 libtcl8.6
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

In this case just installing from specific repository didn’t work:

root@starz:/etc/apache2/sites-enabled# apt-get install -t bookworm passenger
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
passenger is already the newest version (1:6.0.12-1~buster1).
The following packages were automatically installed and are no longer required:
  libboost-locale1.74.0 libboost-thread1.74.0 libtcl8.6
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

And then run install with a specific version:

root@starz:/etc/apache2/sites-enabled# apt-get install 6.0.17+ds-1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package 6.0.17+ds-1
E: Couldn't find any package by glob '6.0.17+ds-1'
E: Couldn't find any package by regex '6.0.17+ds-1'
root@starz:/etc/apache2/sites-enabled# apt-get install passenger=6.0.17+ds-1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libboost-locale1.74.0 libboost-thread1.74.0 libtcl8.6 passenger-doc ruby2.7
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libev4
Suggested packages:
  rails
The following packages will be REMOVED:
  libapache2-mod-passenger passenger-dev
The following NEW packages will be installed:
  libev4
The following packages will be DOWNGRADED:
  passenger
0 upgraded, 1 newly installed, 1 downgraded, 2 to remove and 0 not upgraded.
Need to get 1,685 kB of archives.
After this operation, 49.1 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://ftp.cz.debian.org/debian bookworm/main amd64 libev4 amd64 1:4.33-1 [43.2 kB]
Get:2 http://ftp.cz.debian.org/debian bookworm/main amd64 passenger amd64 6.0.17+ds-1 [1,642 kB]
Fetched 1,685 kB in 0s (13.3 MB/s)   
(Reading database ... 91538 files and directories currently installed.)
Removing libapache2-mod-passenger (1:6.0.12-1~buster1) ...
Module passenger disabled.
To activate the new configuration, you need to run:
  systemctl restart apache2
Removing passenger-dev (1:6.0.12-1~buster1) ...
Selecting previously unselected package libev4:amd64.
(Reading database ... 91429 files and directories currently installed.)
Preparing to unpack .../libev4_1%3a4.33-1_amd64.deb ...
Unpacking libev4:amd64 (1:4.33-1) ...
dpkg: warning: downgrading passenger from 1:6.0.12-1~buster1 to 6.0.17+ds-1
Preparing to unpack .../passenger_6.0.17+ds-1_amd64.deb ...
Unpacking passenger (6.0.17+ds-1) over (1:6.0.12-1~buster1) ...
Setting up libev4:amd64 (1:4.33-1) ...
Setting up passenger (6.0.17+ds-1) ...
Processing triggers for libc-bin (2.36-9+deb12u4) ...
Processing triggers for man-db (2.11.2-2) ...

Now it is “downgraded” to a newer version. And then install apache module.

root@starz:/var/log/apache2# apt-get install libapache2-mod-passenger
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libboost-locale1.74.0 libboost-thread1.74.0 libtcl8.6 passenger-doc ruby2.7
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  libapache2-mod-passenger
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 393 kB of archives.
After this operation, 1,096 kB of additional disk space will be used.
Get:1 http://ftp.cz.debian.org/debian bookworm/main amd64 libapache2-mod-passenger amd64 6.0.17+ds-1 [393 kB]
Fetched 393 kB in 0s (7,250 kB/s)                
Selecting previously unselected package libapache2-mod-passenger.
(Reading database ... 93589 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-passenger_6.0.17+ds-1_amd64.deb ...
Unpacking libapache2-mod-passenger (6.0.17+ds-1) ...
Setting up libapache2-mod-passenger (6.0.17+ds-1) ...
Installing new version of config file /etc/apache2/mods-available/passenger.conf ...
Installing new version of config file /etc/apache2/mods-available/passenger.load ...
apache2_invoke passenger: already enabled

No need to run a2enmod passenger, should be enabled by default, just restart apache.

Validate Passenger Installation

root@starz:/var/log/apache2# /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 there are multiple Apache installations...
Only a single installation detected. This is good.

-------------------------------------------------------------------------

 * Checking whether this Passenger install is in PATH... ✓
 * Checking whether there are no other Passenger installations... ✓
 * Checking whether Apache is installed... ✓
 * Checking whether the Passenger module is correctly configured in Apache... ✗

   You did not specify 'LoadModule passenger_module' in any of your
   Apache configuration files. This means that Phusion Passenger(R)
   for Apache is not installed or not active. Please run the
   Phusion Passenger(R) Apache module installer:
   
      /usr/bin/ruby3.1 /usr/bin/passenger-install-apache2-module --apxs2=/usr/bin/apxs2


Detected 1 error(s), 0 warning(s).

Do not run the command shown there, run apt-get install libapache2-mod-passenger.

It is also possible to run with Apache details:

root@starz:/var/log/apache2# /usr/bin/ruby3.1 /usr/bin/passenger-config --detect-apache2
Looking for possible Apache installations...
 --> Looking for /usr/local/sbin/apxs2: not found
 --> Looking for /usr/local/bin/apxs2: not found
 --> Looking for /usr/sbin/apxs2: not found
 --> Looking for /usr/bin/apxs2: found
 --> Looking for /sbin/apxs2: not found
 --> Looking for /bin/apxs2: found
 --> Looking for /usr/local/sbin/apxs: not found
 --> Looking for /usr/local/bin/apxs: not found
 --> Looking for /usr/sbin/apxs: not found
 --> Looking for /usr/bin/apxs: found
 --> Looking for /sbin/apxs: not found
 --> Looking for /bin/apxs: found
3 symlink duplicate(s) detected; ignoring them.

Analyzing /usr/bin/apxs...
Detecting main Apache executable...
 --> Looking for /usr/bin/apache2: not found
 --> Looking for /usr/sbin/apache2: found
Detecting version...
 --> 2.4.57
Detecting control command...
 --> Looking for /usr/bin/apache2ctl: not found
 --> Looking for /usr/bin/apachectl2: not found
 --> Looking for /usr/bin/apachectl: not found
 --> Looking for /usr/sbin/apache2ctl: found
Detecting configuration file location...
 --> Cannot detect default config file location!
Detecting error log file...
 --> Cannot detect error log file!
Detecting a2enmod and a2dismod...
 --> Looking for /usr/bin/a2enmod: not found
 --> Looking for /usr/sbin/a2enmod: found
 --> Looking for /usr/bin/a2dismod: not found
 --> Looking for /usr/sbin/a2dismod: found
Found a usable Apache installation using /usr/bin/apxs.

Final autodetection results
 * Found Apache 2.4.57!
   Information:
      apxs2          : /usr/bin/apxs
      Main executable: /usr/sbin/apache2
      Control command: /usr/sbin/apache2ctl
      Config file    : unknown
      Error log file : unknown

   WARNING:
      The configuration file seems to be broken! Please double-check it by running:
      /usr/sbin/apache2ctl -t

   To install Phusion Passenger(R) against this specific Apache version:
      /usr/bin/ruby3.1 /usr/bin/passenger-install-apache2-module --apxs2-path='/usr/bin/apxs'

   To start, stop or restart this specific Apache version:
      /usr/sbin/apache2ctl start
      /usr/sbin/apache2ctl stop
      /usr/sbin/apache2ctl restart

Howto Get Information About Package In All Repositories

Don’t forget -a.

root@starz:/etc/apache2/sites-enabled# apt info -a passenger
Package: passenger
Version: 1:6.0.12-1~buster1
Status: install ok installed
Priority: optional
Section: ruby
Maintainer: Phusion <info@phusion.nl>
Installed-Size: 11.2 MB
Provides: ruby-passenger
Depends: libc6 (>= 2.28), libcurl4 (>= 7.16.2), libgcc1 (>= 1:3.0), libgmp10, libpcre3, zlib1g (>= 1:1.1.4), procps, ruby2.7 | ruby2.6 | ruby2.5 | ruby2.4 | ruby2.3 | ruby2.2 | ruby2.1 | ruby2.0 | ruby1.9.1 | ruby1.8 | ruby-interpreter, rubygems-integration (>= 1.8) | rubygems1.9.1 | rubygems1.9 | rubygems (>= 1.2), ruby-rack
Recommends: passenger-doc (= 1:6.0.12-1~buster1), passenger-dev (= 1:6.0.12-1~buster1)
Breaks: libapache2-mod-passenger (<< 1:6.0.12), libnginx-mod-http-passenger (<< 1:6.0.12), passenger-common, passenger-common1.8, passenger-common1.9.1, ruby-passenger
Replaces: libapache2-mod-passenger (<< 1:6.0.12), libnginx-mod-http-passenger (<< 1:6.0.12), passenger-common, passenger-common1.8, passenger-common1.9.1, ruby-passenger
Homepage: https://www.phusionpassenger.com/
Download-Size: unknown
APT-Manual-Installed: no
APT-Sources: /var/lib/dpkg/status
Description: Application server for Ruby, Node.js, Python, Meteor
 Passenger makes deployment of web apps very easy and robust.
 It can be used standalone or integrated with Nginx or Apache.
 Passenger is a Phusion product.

Package: passenger
Version: 6.0.17+ds-1
Priority: optional
Section: ruby
Maintainer: Debian Ruby Team <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Installed-Size: 6,431 kB
Depends: ruby | ruby-interpreter, ruby-rack, libc6 (>= 2.34), libcurl4 (>= 7.16.2), libev4 (>= 1:4.04), libgcc-s1 (>= 3.0), libssl3 (>= 3.0.0), libstdc++6 (>= 11), libuv1 (>= 1.4.2), libruby3.1 (>= 3.1.2), libruby (>= 1:3.1~0), libruby (<< 1:3.2~)
Suggests: nodejs, python3, rails
Breaks: libapache2-mod-passenger (<< 3.0.11debian), ruby-passenger (<< 4.0.53-2~)
Replaces: libapache2-mod-passenger (<< 3.0.11debian), ruby-passenger (<< 4.0.53-2~)
Homepage: https://www.phusionpassenger.com/
Download-Size: 1,642 kB
APT-Sources: http://ftp.cz.debian.org/debian bookworm/main amd64 Packages
Description: web application server
 Phusion Passenger is a web server and application server, designed to be fast,
 robust and lightweight. It takes a lot of complexity out of deploying web
 apps, adds powerful enterprise-grade features that are useful in production,
 and makes administration much easier and less complex. Phusion Passenger
 supports Ruby, Python, Node.js and Meteor.

Alternatively with apt-cache showpkg:

root@starz:/etc/apache2/sites-enabled# apt-cache showpkg passenger
Package: passenger
Versions: 
1:6.0.12-1~buster1 (/var/lib/dpkg/status)
 Description Language: 
                 File: /var/lib/dpkg/status
                  MD5: bccb98e77876deb307f9752399374162

6.0.17+ds-1 (/var/lib/apt/lists/ftp.cz.debian.org_debian_dists_bookworm_main_binary-amd64_Packages)
 Description Language: 
                 File: /var/lib/apt/lists/ftp.cz.debian.org_debian_dists_bookworm_main_binary-amd64_Packages
                  MD5: 265436b41f4cb63fd315ff0e0bc80deb
 Description Language: en
                 File: /var/lib/apt/lists/ftp.cz.debian.org_debian_dists_bookworm_main_i18n_Translation-en
                  MD5: 265436b41f4cb63fd315ff0e0bc80deb


Reverse Depends: 
  libnginx-mod-http-passenger,passenger 1:6.0.2-1~stretch1
  passenger-dev,passenger 1:6.0.12-1~buster1
  libapache2-mod-passenger,passenger 1:6.0.12-1~buster1
  libapache2-mod-passenger,passenger 6.0.17+ds-1
  redmine,passenger
Dependencies: 
1:6.0.12-1~buster1 - libc6 (2 2.28) libcurl4 (2 7.16.2) libgcc1 (2 1:3.0) libgmp10 (0 (null)) libpcre3 (0 (null)) zlib1g (2 1:1.1.4) procps (0 (null)) ruby2.7 (16 (null)) ruby2.6 (16 (null)) ruby2.5 (16 (null)) ruby2.4 (16 (null)) ruby2.3 (16 (null)) ruby2.2 (16 (null)) ruby2.1 (16 (null)) ruby2.0 (16 (null)) ruby1.9.1 (16 (null)) ruby1.8 (16 (null)) ruby-interpreter (0 (null)) rubygems-integration (18 1.8) rubygems1.9.1 (16 (null)) rubygems1.9 (16 (null)) rubygems (2 1.2) ruby-rack (0 (null)) libapache2-mod-passenger (3 1:6.0.12) libnginx-mod-http-passenger (3 1:6.0.12) passenger-common (0 (null)) passenger-common1.8 (0 (null)) passenger-common1.9.1 (0 (null)) ruby-passenger (0 (null)) passenger-doc (5 1:6.0.12-1~buster1) passenger-dev (5 1:6.0.12-1~buster1) libapache2-mod-passenger (3 1:6.0.12) libnginx-mod-http-passenger (3 1:6.0.12) passenger-common (0 (null)) passenger-common1.8 (0 (null)) passenger-common1.9.1 (0 (null)) ruby-passenger (0 (null)) 
6.0.17+ds-1 - ruby (16 (null)) ruby-interpreter (0 (null)) ruby-rack (0 (null)) libc6 (2 2.34) libcurl4 (2 7.16.2) libev4 (2 1:4.04) libgcc-s1 (2 3.0) libssl3 (2 3.0.0) libstdc++6 (2 11) libuv1 (2 1.4.2) libruby3.1 (2 3.1.2) libruby (2 1:3.1~0) libruby (3 1:3.2~) libapache2-mod-passenger (3 3.0.11debian) ruby-passenger (3 4.0.53-2~) nodejs (0 (null)) python3 (0 (null)) rails (0 (null)) libapache2-mod-passenger (3 3.0.11debian) ruby-passenger (3 4.0.53-2~) 
Provides: 
1:6.0.12-1~buster1 - ruby-passenger (= ) 
6.0.17+ds-1 - 
Reverse Provides: 

And that’s all, enough fun with Debian packages and versions.

Add Comment