Passenger, 403 Forbidden - ruby-on-rails

I am trying to install passenger for my rails app, but i dont know where is the problem. I already try do chmod 775 in my app folder, nothing works. Fallow the files:
sites-avaliable and enable
"meuapp.conf"
<VirtualHost *:80>
ServerName meuapp,localhost
ServerAlias meuapp.localhost
ServerAdmin webmaster#localhost
DocumentRoot "/home/pedro/projects/meuapp/public"
<Directory "/home/pedro/projects/meuapp/public">
Options FollowSymLinks
AllowOverride None
</Directory>
RailsEnv development
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
"hosts"
127.0.0.1 localhost
127.0.0.1 meuapp,localhost
127.0.1.1 pedro-pcl
"apache2.conf"
LoadModule passenger_module /home/pedro/.rvm/gems/ruby-1.9.3-p194/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/pedro/.rvm/gems/ruby-1.9.3-p194/gems/passenger-4.0.45
PassengerDefaultRuby /home/pedro/.rvm/gems/ruby-1.9.3-p194/wrappers/ruby
</IfModule>
My log:
[ 2014-07-15 19:26:32.8459 1368/7ff21372a780 agents/HelperAgent/Main.cpp:649 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.1358/generation-0/request
[ 2014-07-15 19:26:32.8519 1374/7f6b9f6ac780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.1358/generation-0/logging
[ 2014-07-15 19:26:32.8522 1359/7f5ef2f45780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Tue Jul 15 19:26:32.870422 2014] [so:warn] [pid 1358] AH01574: module passenger_module is already loaded, skipping
[ 2014-07-15 19:26:32.8745 1387/7f657ffb6780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/pedro/.rvm/gems/ruby-1.9.3-p194/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/pedro/.rvm/gems/ruby-1.9.3-p194/gems/passenger-4.0.45', 'passenger_version' => '4.0.45', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.37', 'web_server_pid' => '1385', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2014-07-15 19:26:32.8787 1391/7f21df2fe780 agents/HelperAgent/Main.cpp:649 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.1385/generation-0/request
[ 2014-07-15 19:26:32.8858 1397/7fa1e768c780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.1385/generation-0/logging
[ 2014-07-15 19:26:32.8861 1387/7f657ffb6780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Tue Jul 15 19:26:33.387955 2014] [mpm_prefork:notice] [pid 1385] AH00163: Apache/2.4.7 (Ubuntu) Phusion_Passenger/4.0.37 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Tue Jul 15 19:26:33.388003 2014] [core:notice] [pid 1385] AH00094: Command line: '/usr/sbin/apache2'
And i try the "Require all granted" thing, still dosent work

You may be encountering the same problem as the StackOverflow user describing his 403 Error with Passenger.
The recommendation, after checking your error log (the way you have configured it, it is likely in /var/log/apache2/error.log) and confirming that you are seeing a client denied by server configuration issue, would be to add Require all granted within your <Directory> block in the virtual host file. So, your block would look like this:
<Directory "/home/pedro/projects/meuapp/public">
Require all granted
Options FollowSymLinks
AllowOverride None
</Directory>

Related

Rails - Caught SIGTERM, shutting down on AWS EC2 running on Apache Server [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I get this error when I make some changes in my app. Previously it works well until i pushed the last code. I made a lot of changes in my file so that i can not track which one is causing this error.
I haved tried to search at other threads but i could not find solution that can solve my problem. This problem is similar to other threads that have been discussed few times here but only few people interested to post any solutions.
Please can someone shared their experience on this?
This error can be found in /var/log/apache2/error.log
mpm_event:notice] [pid 14458:tid 140091015935872] AH00491: caught SIGTERM, shutting down
[ 2014-10-13 09:48:43.7713 14759/7fb04324c780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/ubuntu/.rvm/gems/ruby-2.1.2/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.46', 'passenger_version' => '4.0.46', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.46', 'web_server_pid' => '14758', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2014-10-13 09:48:43.7759 14762/7f11d7132780 agents/HelperAgent/Main.cpp:649 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.14758/generation-0/request
[ 2014-10-13 09:48:43.7825 14767/7f1165b73780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.14758/generation-0/logging
[ 2014-10-13 09:48:43.7829 14759/7fb04324c780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[ 2014-10-13 09:48:43.7914 14782/7f938c30f780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/ubuntu/.rvm/gems/ruby-2.1.2/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.46', 'passenger_version' => '4.0.46', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.46', 'web_server_pid' => '14779', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2014-10-13 09:48:43.7958 14785/7f3da825f780 agents/HelperAgent/Main.cpp:649 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.14779/generation-0/request
[ 2014-10-13 09:48:43.8019 14790/7fcd26fe4780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.14779/generation-0/logging
[Mon Oct 13 09:48:43.802685 2014] [mpm_event:notice] [pid 14779:tid 140057092278144] AH00489: Apache/2.4.7 (Ubuntu) Phusion_Passenger/4.0.46 configured -- resuming normal operations
[Mon Oct 13 09:48:43.802751 2014] [core:notice] [pid 14779:tid 140057092278144] AH00094: Command line: '/usr/sbin/apache2'
[ 2014-10-13 09:48:43.8053 14782/7f938c30f780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
Try to check your configurations. This problem may be because you set your config.force_ssl equal to true. Change it back to false then restart your server using sudo service apache2 restart.

RoR Application and nginx with Passenger on Ubuntu

i installed Ruby using RVM on a Ubuntu 13.10 Server. The same thing i do with rubygems and Rails. When i start my application with
rails server
and enter
localhost:3000
in my Browser it works.
Now i want to make the application visible for other users.
So i checked rubyonrails.org/deploy-Site and decided to install nginx with Passenger.
gem install passenger
rvmsudo passenger-install-nginx-module
After this i downloaded stuff who was missing and do
rvmsudo passenger-install-nginx-module
again.
Before i runned
sudo service nginx start
i edit my .conf-File in /opt/nginx/conf/nginx.conf
server {
listen 80;
server_name example.com;
passenger_enabled on;
root /var/www/my_awesome_rails_app/public;
}
As server name i take the ip-Adress for the domain.
The passenger_enabled Line i added and as root i take /home/ServerName/AppName/public
My Problem is that i doesn't see anything when i open the server-ip-page.
When i run 'top' i see that nginx is running.
The Ruby on Rails Application is also running.
AND i restartet nginx after editing the .conf-File.
Anybody know i solution
OR
how i can test nginx?
Thanks
Update - error.log, access.log
access.log: file is empty (no content inside)
error.log:
[ 2014-05-13 14:08:18.9450 2548/7fc38986d740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/mustermann/.rvm/gems/ruby-2.1.1/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/mustermann/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.42', 'passenger_version' => '4.0.42', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.42', 'web_server_pid' => '2547', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '65534', 'web_server_worker_uid' => '65534' }
[ 2014-05-13 14:08:18.9501 2551/7fbf96162740 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.2547/generation-0/request
[ 2014-05-13 14:08:18.9590 2556/7fcd93dab780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.2547/generation-0/logging
[ 2014-05-13 14:08:18.9604 2548/7fc38986d740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[ 2014-05-13 14:10:33.6645 2592/7f40a1fe8740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/mustermann/.rvm/gems/ruby-2.1.1/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/mustermann/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.42', 'passenger_version' => '4.0.42', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.42', 'web_server_pid' => '2591', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '65534', 'web_server_worker_uid' => '65534' }
[ 2014-05-13 14:10:33.6693 2595/7fc930750740 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.2591/generation-0/request
[ 2014-05-13 14:10:33.6777 2600/7f645bf0f780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.2591/generation-0/logging
[ 2014-05-13 14:10:33.6780 2592/7f40a1fe8740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[ 2014-05-13 14:18:19.9938 2638/7fae3ef32740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/mustermann/.rvm/gems/ruby-2.1.1/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/mustermann/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.42', 'passenger_version' => '4.0.42', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.42', 'web_server_pid' => '2637', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '65534', 'web_server_worker_uid' => '65534' }
[ 2014-05-13 14:18:19.9990 2641/7f6ed18af740 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.2637/generation-0/request
[ 2014-05-13 14:18:20.0074 2646/7fbb3494b780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.2637/generation-0/logging
[ 2014-05-13 14:18:20.0077 2638/7fae3ef32740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[ 2014-05-13 14:18:25.2711 2673/7f292be1d740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/mustermann/.rvm/gems/ruby-2.1.1/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/mustermann/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.42', 'passenger_version' => '4.0.42', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.42', 'web_server_pid' => '2656', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '65534', 'web_server_worker_uid' => '65534' }
[ 2014-05-13 14:18:25.2760 2676/7f26f5920740 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.2656/generation-0/request
[ 2014-05-13 14:18:25.2839 2681/7f0cf6b96780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.2656/generation-0/logging
[ 2014-05-13 14:18:25.2847 2673/7f292be1d740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[ 2014-05-13 14:18:35.0327 2709/7f19099b8740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/mustermann/.rvm/gems/ruby-2.1.1/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/mustermann/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.42', 'passenger_version' => '4.0.42', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.42', 'web_server_pid' => '2708', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '65534', 'web_server_worker_uid' => '65534' }
[ 2014-05-13 14:18:35.0374 2712/7f6ce241a740 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.2708/generation-0/request
[ 2014-05-13 14:18:35.0457 2718/7fba54563780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.2708/generation-0/logging
[ 2014-05-13 14:18:35.0461 2709/7f19099b8740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
Update - ps aux | egrep '(PID|nginx)'
http://s1.directupload.net/images/140513/v2lv5dpe.jpg
Now its running.
Port 80 was blocked by the firewall of our university.
After unlocking Port 80 we get the nginx page when running the ip-adress of the server.
Finally we just needed to change the .conf of nginx with the following lines:
location / {
proxy_pass http://localhost:3000/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
}
Source: Link
This part is important if you don't want access your Application with ip-adress:3000
The old location-part can be deleted.
Now you can restart/reload the nginx:
sudo service nginx restart
and start the rails server (on Port 3000 - default):
rails server
If you want you can start the rails server i another mode with:
rails server -e ....
Now you can access your RoR-Application.
Good Luck :-)

Rails app only displaying public directory with passenger

My rails app will only display the public directory when I go to the url.
I'm using apache, passenger and ubuntu.
My apache virtualhosts file is;
<VirtualHost *:80>
ServerName www.phusion.nl
DocumentRoot /websites/phusion
<Directory /websites/phusion>
Allow from all
</Directory>
# These have been added:
Alias /subapp /websites/rails/public
<Location /subapp>
PassengerBaseURI /subapp
PassengerAppRoot /websites/rails
</Location>
<Directory /websites/rails/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
I think everything is installed properly, my config.ru is;
require ::File.expand_path('../config/environment', __FILE__)
run Rails.application
I've added the following to apache2.conf;
LoadModule passenger_module /home/vps/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.35/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/vps/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.35
PassengerDefaultRuby /home/vps/.rvm/gems/ruby-2.0.0-p353/wrappers/ruby
</IfModule>
the apache error.log gives;
All Phusion Passenger agents started!
[ 2014-01-19 09:05:23.8076 12140/7f1e3695c740 agents/Watchdog/Main.cpp:526 ]:
Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/vps/.rvm/gems/ruby-2.0.0-p353/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/vps/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.35', 'passenger_version' => '4.0.35', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.35', 'web_server_pid' => '12137', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
duh...
I had PassengerAppRoot set to the public folder, not rails root.
This issue may be because of the way you installed the Passenger module
Wrong way : sudo passenger-install-apache2-module
Right way : rvmsudo passenger-install-apache2-module
I am just guessing you used the first one which is leading to this issue, please correct me if i'm wrong.

phusion passenger on apache : Could not spawn process for group

I want to install gitlabhq on Debian linux
I installed gitlabhq [ that it is a rails application ]
i installed phusio passenger on apache for serving application.
but gitlabhq doesn`t start
i have this error message in /var/log/apache2/error
[Mon Nov 04 07:11:24 2013] [notice] caught SIGTERM, shutting down
[ 2013-11-04 07:11:25.8690 8321/b6f52000 agents/Watchdog/Main.cpp:574 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/local/rvm/wrappers/ruby-1.9.3-p448/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_instances_per_app' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.23', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_pid' => '8320', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2013-11-04 07:11:25.9032 8324/b6f35000 agents/HelperAgent/Main.cpp:619 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.8320/generation-0/request
[ 2013-11-04 07:11:25.9528 8330/b6886220 agents/LoggingAgent/Main.cpp:318 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.8320/generation-0/logging
[ 2013-11-04 07:11:25.9545 8321/b6f52000 agents/Watchdog/Main.cpp:761 ]: All Phusion Passenger agents started!
[ 2013-11-04 07:11:31.3236 8377/b6ff0000 agents/Watchdog/Main.cpp:574 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/local/rvm/wrappers/ruby-1.9.3-p448/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_instances_per_app' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.23', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_pid' => '8341', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2013-11-04 07:11:31.3589 8380/b6f1d000 agents/HelperAgent/Main.cpp:619 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.8341/generation-0/request
[ 2013-11-04 07:11:31.4075 8386/b67e0220 agents/LoggingAgent/Main.cpp:318 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.8341/generation-0/logging
[ 2013-11-04 07:11:31.4092 8377/b6ff0000 agents/Watchdog/Main.cpp:761 ]: All Phusion Passenger agents started!
[Mon Nov 04 07:11:31 2013] [notice] Apache/2.2.22 (Debian) Phusion_Passenger/4.0.23 configured -- resuming normal operations
[ 2013-11-04 07:11:31.4780 8380/b52bf450 Pool2/Spawner.h:796 ]: [App 8453 stdout]
[ 2013-11-04 07:13:01.6074 8380/b52bf450 Pool2/Implementation.cpp:849 ]: Could not spawn process for group /home/git/gitlabhq#default: An error occurred while starting the web application: it did not write a startup response in time.
in 'void Passenger::ApplicationPool2::Spawner::throwAppSpawnException(const string&, Passenger::SpawnException::ErrorKind, Passenger::ApplicationPool2::Spawner::NegotiationDetails&)' (Spawner.h:689)
in 'Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::Spawner::negotiateSpawn(Passenger::ApplicationPool2::Spawner::NegotiationDetails&)' (Spawner.h:1194)
in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::DirectSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (DirectSpawner.h:213)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:782)
[ 2013-11-04 07:13:01.6092 8380/b5aff450 agents/HelperAgent/RequestHandler.h:1995 ]: [Client 20] Cannot checkout session.
Error page:
An error occurred while starting the web application: it did not write a startup response in time. Please read this article for more information about this problem.<br>
<h2>Raw process output:</h2>
(empty)
[Mon Nov 04 07:42:46 2013] [notice] caught SIGTERM, shutting down
[ 2013-11-04 07:42:47.8189 8665/b6f64000 agents/Watchdog/Main.cpp:574 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/local/rvm/wrappers/ruby-1.9.3-p448/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_instances_per_app' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.23', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_pid' => '8664', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2013-11-04 07:42:47.8683 8668/b6faa000 agents/HelperAgent/Main.cpp:619 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.8664/generation-0/request
[ 2013-11-04 07:42:47.9175 8673/b6832220 agents/LoggingAgent/Main.cpp:318 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.8664/generation-0/logging
[ 2013-11-04 07:42:47.9191 8665/b6f64000 agents/Watchdog/Main.cpp:761 ]: All Phusion Passenger agents started!
[ 2013-11-04 07:42:48.3361 8705/b6f0b000 agents/Watchdog/Main.cpp:574 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/local/rvm/wrappers/ruby-1.9.3-p448/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_instances_per_app' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.23', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_pid' => '8685', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2013-11-04 07:42:48.3722 8708/b6efa000 agents/HelperAgent/Main.cpp:619 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.8685/generation-0/request
[ 2013-11-04 07:42:48.4219 8713/b6810220 agents/LoggingAgent/Main.cpp:318 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.8685/generation-0/logging
[ 2013-11-04 07:42:48.4235 8705/b6f0b000 agents/Watchdog/Main.cpp:761 ]: All Phusion Passenger agents started!
[Mon Nov 04 07:42:48 2013] [notice] Apache/2.2.22 (Debian) Phusion_Passenger/4.0.23 configured -- resuming normal operations
[ 2013-11-04 07:42:53.8737 8708/b529f450 Pool2/Spawner.h:796 ]: [App 8797 stdout]
[ 2013-11-04 07:44:24.0079 8708/b529f450 Pool2/Implementation.cpp:849 ]: Could not spawn process for group /home/git/gitlabhq#default: An error occurred while starting the web application: it did not write a startup response in time.
in 'void Passenger::ApplicationPool2::Spawner::throwAppSpawnException(const string&, Passenger::SpawnException::ErrorKind, Passenger::ApplicationPool2::Spawner::NegotiationDetails&)' (Spawner.h:689)
in 'Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::Spawner::negotiateSpawn(Passenger::ApplicationPool2::Spawner::NegotiationDetails&)' (Spawner.h:1194)
in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::DirectSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (DirectSpawner.h:213)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:782)
[ 2013-11-04 07:44:24.0090 8708/b5adf450 agents/HelperAgent/RequestHandler.h:1995 ]: [Client 20] Cannot checkout session.
Error page:
An error occurred while starting the web application: it did not write a startup response in time. Please read this article for more information about this problem.<br>
<h2>Raw process output:</h2>
(empty)
You can install GitLab very fast via Bitnami : http://bitnami.com/stack/gitlab
Follow instructions provided In this blog by folks at Phusion to run Gitlab on Phusion Passenger
The error message tells you to read https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems for more information about the problem. That page lists a number of possibilities why you get that error. Have you already gone through them?
The most likely cause for your problem is the last item on that page, "Server too busy". You should follow the instructions there.

Passenger not start on 80 port

I start passenger — rvmsudo passenger start -p 80 --user=support on Ubunto 12.10, and get this error:
Stopping web server... done
/usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/daemon_controller-1.1.5/lib/daemon_controller.rb:407:in
start_without_locking': [ 2013-08-22 13:19:09.5563 16334/7f245089a740
agents/Watchdog/Main.cpp:459 ]: Options: { 'analytics_log_user' =>
'nobody', 'default_group' => 'support', 'default_python' => 'python',
'default_ruby' =>
'/usr/local/rvm/wrappers/ruby-1.9.3-p429#rails32/ruby', 'default_user'
=> 'support', 'log_level' => '0', 'max_instances_per_app' => '0', 'max_pool_size' => '6', 'passenger_root' =>
'/tmp/passenger-standalone.1cjq616/locations.ini', 'pool_idle_time' =>
'300', 'prestart_urls' => 'aHR0cDovLzAuMC4wLjA6ODAA', 'temp_dir' =>
'/tmp', 'union_station_gateway_address' =>
'gateway.unionstationapp.com', 'union_station_gateway_port' => '443',
'user_switching' => 'false', 'web_server_pid' => '16333',
'web_server_type' => 'nginx', 'web_server_worker_gid' => '1000',
'web_server_worker_uid' => '1000' } (DaemonController::StartTimeout)
[ 2013-08-22 13:19:09.5610 16337/7f7a32f48740 agents/HelperAgent/Main.cpp:602 ]: PassengerHelperAgent online,
listening at unix:/tmp/passenger.1.0.16333/generation-0/request
[ 2013-08-22 13:19:09.5637 16342/7f7a14f71740 agents/LoggingAgent/Main.cpp:334 ]: PassengerLoggingAgent online,
listening at unix:/tmp/passenger.1.0.16333/generation-0/logging
[ 2013-08-22 13:19:09.5642 16334/7f245089a740 agents/Watchdog/Main.cpp:642 ]: All Phusion Passenger agents started!
/usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/helper-scripts/prespawn:105:in
initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/helper-scripts/prespawn:105:in
new'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/helper-scripts/prespawn:105:in
connect'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/helper-scripts/prespawn:86:in socket'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/helper-scripts/prespawn:90:inhead_request'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/helper-scripts/prespawn:145:in
<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/daemon_controller-1.1.5/lib/daemon_controller.rb:218:in
block in start'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:68:in
block in exclusive_lock'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:63:in
open'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:63:in
exclusive_lock'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/daemon_controller-1.1.5/lib/daemon_controller.rb:217:in
start'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/lib/phusion_passenger/standalone/start_command.rb:414:in
start_nginx'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/lib/phusion_passenger/standalone/start_command.rb:71:in
run'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/lib/phusion_passenger/standalone/main.rb:92:in
run_command'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/lib/phusion_passenger/standalone/main.rb:62:in
run!'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/lib/phusion_passenger/standalone/main.rb:39:in
run!'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/gems/passenger-4.0.14/bin/passenger:34:in
'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/bin/passenger:19:in load'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/bin/passenger:19:in
'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/bin/ruby_noexec_wrapper:14:in
eval'
from /usr/local/rvm/gems/ruby-1.9.3-p429#rails32/bin/ruby_noexec_wrapper:14:in
'
What I do wrong, maby this is permission?
Ports below 1024 can be opened only, although you can use iptables to redirect the traffic:
# iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000
Since loopback devices (like localhost) do not use the prerouting rules, if you need to use localhost, etc., add this rule as well:
# iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3000
Or you can use passagener under apache http server or nginx, and use their configs to set the applications.
Actually, that is a bug in Phusion Passenger. The command rvmsudo passenger start -p 80 --user=support should just work, without the iptables changes that Paulo suggested. I've fixed this bug and the bug fix will be part of Phusion Passenger 4.0.15.
Hongli Lai
Phusion CTO
Phusion Passenger developer

Resources