2
votes

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?

2

2 Answers

0
votes

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

2
votes

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.