Project

General

Profile

Cannot start Redmine 5.1.3 after upgrading to Ubuntu 22.04 (starting fine with WebRick but not with Apache)

Added by Nicolas Moinet 8 days ago

- Ruby : ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
- Rails : 6.1.7.8
- Operating system : Ubuntu 22.04.4 LTS
- MySQL : 10.6.18-MariaDB-0ubuntu0.22.04.1
- Server: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 Phusion_Passenger/6.0.22

I upgraded Redmine to 5.1.3 and it was working fine on Ubuntu 20.04.

Then I upgraded to Ubuntu 20.04 and I cannot open Redmine anymore, I'm stuck with this error message :

/usr/bin/ruby3.0: No such file or directory -- Passenger AppPreloader: /opt/redmine (LoadError)

But it is working fine with WebRick so I don't understand what is wrong.

I recompiled everything and passenger-status and passenger-config validate-install seems to show that everything is ok.

Do you have any clue ?

Thank you !


Replies (2)

RE: Cannot start Redmine 5.1.3 after upgrading to Ubuntu 22.04 (starting fine with WebRick but not with Apache) - Added by Nicolas Moinet 8 days ago

Here is my apache config :

LoadModule passenger_module /var/lib/gems/3.0.0/gems/passenger-6.0.22/buildout/apache2/mod_passenger.so    

<IfModule mod_passenger.c>
    PassengerDefaultUser redmine
    PassengerRoot /var/lib/gems/3.0.0/gems/passenger-6.0.22      
    PassengerDefaultRuby /usr/bin/ruby3.0    
</IfModule>

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        #PassengerMaxInstances 40
        #PassengerMaxInstancesPerApp 1

        DocumentRoot /opt/redmine/public
        ServerName redmine.dev.e-bizproduction.com

        PassengerRuby /usr/bin/ruby3.0
        RailsEnv production

        <Directory /opt/redmine/public>
            Allow from all
            Require all granted
            Options -MultiViews

            PassengerEnabled on
            PassengerAppEnv production
            #PassengerAppRoot /opt/redmine
            #PassengerBaseURI /
            PassengerMinInstances 0
            PassengerFriendlyErrorPages on
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLCertificateFile /etc/letsencrypt/live/redmine.dev.e-bizproduction.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/redmine.dev.e-bizproduction.com/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
    </VirtualHost>
</IfModule>

RE: Cannot start Redmine 5.1.3 after upgrading to Ubuntu 22.04 (starting fine with WebRick but not with Apache) - Added by Peter Sopko 1 day ago

Try adding "PassengerSpawnMethod direct" to you apache virtualhost config. I had the same issue with nginx (different ruby versions [3.2] and platforms [FreeBSD]) and switching from smart to direct spawn method was the only thing that helped. Not an ideal solution, but maybe it will help you keep up&running until someone finds the root cause of this issue.

    (1-2/2)