我知道有很多重复的,但没有一个有帮助,我已经将乘客从 3.0.19 更新到 4.0.6,突然间我收到了一个禁止错误,我查看了日志和错误日志说
[ 2013-07-05 12:01:51.3604 2639/7fec9151f720 agents/HelperAgent/Main.cpp:596 ]: PassengerHelperAgent online, listening at unix:/xxxx/tmp/passenger.1.0.2634/generation-0/request
[ 2013-07-05 12:01:51.3654 2644/7f29f6ebf7e0 agents/LoggingAgent/Main.cpp:303 ]: *** ERROR: Cannot bind Unix socket '/xxxx/tmp/passenger.1.0.2634/generation-0/logging_admin': Permission denied (errno=13)
in 'void Passenger::MessageServer::startListening()' (MessageServer.h:333)
[Fri Jul 05 12:01:51 2013] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Phusion Passenger logging agent: it seems to have crashed during startup for an unknown reason, with exit code 1
[Fri Jul 05 12:01:51 2013] [notice] Apache/2.2.15 (Unix) DAV/2 Phusion_Passenger/4.0.6 configured -- resuming normal operations
我知道这是因为乘客无法创建 /xxxx/tmp/passenger.1.0.2634/generation-0/request,但不知道为什么
我努力了,
1.在conf文件中设置用户为apache。
2.将tmp文件夹设置为我的rails文件中的tmp,而不是/tmp
3.检查rails文件夹中的所有文件和文件夹都归apache所有:apache
4.SeLinux 已开启,已永久禁用
这是我当前的 apache conf 设置。
LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.6/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.6
PassengerDefaultRuby /usr/local/bin/ruby
PassengerTempDir /xxxx/tmp
PassengerUserSwitching off
PassengerDefaultUser apache
<VirtualHost *:80>
ServerName xxxxxxx.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /xxxx/public
<Directory /xxxx/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
</VirtualHost>
编辑
现在我已经恢复到早期版本,问题似乎消退了。