我在Ubunto 12.10上开始乘客 - rvmsudo passenger start -p 80 --user=support
,并收到此错误:
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
初始化':连接被拒绝 - 连接(2)(Errno :: ECONNREFUSED) 来自/usr/local/rvm/gems/ruby-1.9.3-p429@rails32/gems/passenger-4.0.14/helper-scripts/prespawn:105:innew' from /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:86:insocket' from /usr/local/rvm/gems/ruby-1.9.3-p429@rails32/gems/passenger-4.0.14/helper-scripts/prespawn:90:in
head_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
阻止开始' 来自/usr/local/rvm/gems/ruby-1.9.3-p429@rails32/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:68:inblock 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
开放” 来自/usr/local/rvm/gems/ruby-1.9.3-p429@rails32/gems/daemon_controller-1.1.5/lib/daemon_controller/lock_file.rb:63:inexclusive_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:instart_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
运行” 来自/usr/local/rvm/gems/ruby-1.9.3-p429@rails32/gems/passenger-4.0.14/lib/phusion_passenger/standalone/main.rb:92:inrun_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:inrun!' 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:inload' 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:ineval' from /usr/local/rvm/gems/ruby-1.9.3-p429@rails32/bin/ruby_noexec_wrapper:14:in
“
我做错了,maby这是许可吗?
答案 0 :(得分: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下使用passner,并使用他们的配置来设置应用程序。
答案 1 :(得分:0)
实际上,这是Phusion Passenger中的一个错误。如果没有Paulo建议的iptables更改,命令rvmsudo passenger start -p 80 --user=support
应该可以正常工作。我已修复此错误,错误修复将成为Phusion Passenger 4.0.15的一部分。