2

I am trying to run redmine+gitolite server using apache in an Ubuntu machine. I followed the instructions given here with the following server config file:

<VirtualHost *:80>
        ServerName redmine.xyz.com

        ServerAdmin someone@somewhere
        DocumentRoot /var/www/
        PassengerUserSwitching on
        RewriteEngine On
        RewriteRule ^/?$ /redmine [R]

        <Directory /var/www/redmine>
                RailsBaseURI /redmine
                PassengerResolveSymlinksInDocumentRoot on
                PassengerUser redmine
                PassengerGroup redmine
        </Directory>
        LogLevel info

        ErrorLog ${APACHE_LOG_DIR}/error-redmine.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Now, when I access the website the following gets logged in the default error.log file:

[ 2015-11-07 12:44:45.7366 1568/7f9da7df9780 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.1562/generation-0/request
[ 2015-11-07 12:44:45.7422 1574/7faddd156780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.1562/generation-0/logging
[ 2015-11-07 12:44:45.7424 1563/7f018bf01780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Sat Nov 07 12:44:45.743089 2015] [mpm_event:notice] [pid 1562:tid 139811192584064] AH00489: Apache/2.4.7 (Ubuntu) Phusion_Passenger/4.0.37 configured -- resuming normal operations
[Sat Nov 07 12:44:45.743162 2015] [core:notice] [pid 1562:tid 139811192584064] AH00094: Command line: '/usr/sbin/apache2'
App 1677 stdout:
App 1677 stderr:  --> No passenger_native_support.so found for current Ruby interpreter.
App 1677 stderr:      This library provides various optimized routines that make
App 1677 stderr:      Phusion Passenger faster. Please run 'sudo apt-get install passenger-dev'
App 1677 stderr:      so that Phusion Passenger can compile one on the next run.
App 1677 stderr:  --> Continuing without passenger_native_support.so.
App 1677 stderr: /var/lib/gems/2.2.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot"
[ 2015-11-07 12:45:17.4620 1568/7f9da7d02700 Pool2/SmartSpawner.h:301 ]: Preloader for /opt/redmine started on PID 1677, listening on unix:/tmp/passenger.1.0.1562/generation-0/backends/preloader.1677
App 1697 stdout:
App 1677 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:356:in `trap'
App 1677 stderr: : Invalid argument - SIGKILL (Errno::EINVAL)
App 1677 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:356:in `block in reset_signal_handlers'
App 1677 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:354:in `each_key'
App 1677 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:354:in `reset_signal_handlers'
App 1677 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:182:in `main_loop'
App 1677 stderr:        from /usr/share/passenger/helper-scripts/rack-preloader.rb:161:in `<module:App>'
App 1677 stderr:        from /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
App 1677 stderr:        from /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
[ 2015-11-07 12:45:18.0075 1568/7f9da7de6700 Pool2/Pool.h:777 ]: Process (pid=1697, group=/opt/redmine#default) no longer exists! Detaching it from the pool.
App 1706 stdout:
App 1677 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:356:in `trap'
App 1677 stderr: : Invalid argument - SIGKILL (Errno::EINVAL)
App 1677 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:356:in `block in reset_signal_handlers'
App 1677 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:354:in `each_key'
App 1677 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:354:in `reset_signal_handlers'
App 1677 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:182:in `main_loop'
App 1677 stderr:        from /usr/share/passenger/helper-scripts/rack-preloader.rb:161:in `<module:App>'
App 1677 stderr:        from /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
App 1677 stderr:        from /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'

and the following in the custom error-redmine.log:

[Sat Nov 07 12:45:17.629247 2015] [core:error] [pid 1584:tid 139811078739712] [client 106.51.26.94:30565] End of script output before headers: redmine

The server is working when started using the command:

bundle exec rails server -d -e production

What could be the reason for Apache's failure? I have enabled passenger and rewrite modules. The command

sudo apt-get install passenger-dev

as suggested in the error.log fails saying:

Unable to locate package passenger-dev

hjpotter92
  • 660
  • 1
  • 10
  • 20

1 Answers1

0

The issue was resolved by installing the passenger gem. The server now uses that instead of the mod-passenger (or phusion-passenger). So, basically, the following commands resolved it:

sudo gem install passenger
sudo a2dismod passenger

and that was all.

I'd love some explanation as to the difference between the two though.

hjpotter92
  • 660
  • 1
  • 10
  • 20