2

rvmsudo passenger start -p 80 --user=support在 Ubunto 12.10 上启动乘客,并收到此错误:

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 初始化':连接被拒绝 - 来自 /usr/local/rvm/gems/ruby-1.9.3-p429@rails32/gems/passenger-4.0.14/helper-scripts/prespawn 的连接(2)(Errno::ECONNREFUSED): 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' 来自 /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' 来自 /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' 来自 /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 从 /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' 从 /usr/local开始/rvm/gems/ruby-1.9.3-p429@rails32/gems/passenger-4.0.14/lib/phusion_passenger/standalone/main.rb:92: 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 运行中!来自 /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 '来自 /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 '来自 /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 '

我做错了什么,也许这是许可?

4

2 回答 2

2

低于 1024 的端口只能打开,但您可以使用 iptables 重定向流量:

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

由于环回设备(如 localhost)不使用预路由规则,如果需要使用 localhost 等,也添加此规则:

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

或者您可以在 apache http server 或 nginx 下使用 Passener,并使用它们的配置来设置应用程序。

于 2013-08-22T09:31:44.173 回答
0

实际上,这是 Phusion Passenger 中的一个错误。该命令rvmsudo passenger start -p 80 --user=support应该可以正常工作,而无需 Paulo 建议的 iptables 更改。我已经修复了这个错误,这个错误修复将成为 Phusion Passenger 4.0.15 的一部分。

赖宏利
Phusion CTO
Phusion Passenger 开发商

于 2013-08-25T10:33:16.637 回答