2013-08-22 154 views
1

我開始乘客 - rvmsudo passenger start -p 80 --user=support上Ubunto 12.10,並得到這個錯誤:乘客無法啓動80端口上

Stopping web server... done 
/usr/local/rvm/gems/[email protected]/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/[email protected]/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/[email protected]/gems/passenger-4.0.14/helper-scripts/prespawn:105:in initialize': Connection refused - connect(2) (Errno::ECONNREFUSED) from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/helper-scripts/prespawn:105:in new' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/helper-scripts/prespawn:105:in connect' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/helper-scripts/prespawn:86:in socket' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/helper-scripts/prespawn:90:in head_request' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/helper-scripts/prespawn:145:in <main>' from /usr/local/rvm/gems/[email protected]/gems/daemon_controller-1.1.5/lib/daemon_controller.rb:218:in block in start' from /usr/local/rvm/gems/[email protected]/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:68:in block in exclusive_lock' from /usr/local/rvm/gems/[email protected]/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:63:in open' from /usr/local/rvm/gems/[email protected]/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:63:in exclusive_lock' from /usr/local/rvm/gems/[email protected]/gems/daemon_controller-1.1.5/lib/daemon_controller.rb:217:in start' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/lib/phusion_passenger/standalone/start_command.rb:414:in start_nginx' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/lib/phusion_passenger/standalone/start_command.rb:71:in run' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/lib/phusion_passenger/standalone/main.rb:92:in run_command' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/lib/phusion_passenger/standalone/main.rb:62:in run!' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/lib/phusion_passenger/standalone/main.rb:39:in run!' from /usr/local/rvm/gems/[email protected]/gems/passenger-4.0.14/bin/passenger:34:in ' from /usr/local/rvm/gems/[email protected]/bin/passenger:19:in load' from /usr/local/rvm/gems/[email protected]/bin/passenger:19:in ' from /usr/local/rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in eval' from /usr/local/rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in '

我做錯事,莫比,這是權限?低於1024

+0

這可能是有益的:https://www.openshift.com/forums/openshift/rails-passenger-connection-refused-issue-solved –

回答

0

其實,這是Phusion Passenger中的一個錯誤。命令rvmsudo passenger start -p 80 --user=support應該工作,沒有Paulo建議的iptables更改。我修復了這個錯誤,錯誤修復將成爲Phusion Passenger 4.0.15的一部分。

宏利賴
的Phusion CTO
的Phusion客運開發商

2

端口只能被打開,雖然你可以使用iptables來重定向流量:

# iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000 

由於迴環設備(如本地主機)不使用PREROUTING規則,如果你需要使用localhost,等,添加此規則還有:

# iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3000 

或者你可以在Apache HTTP服務器或使用nginx passagener,用自己的CONFIGS設置的應用程序。

+0

謝謝,這是真正的工作! –