我在启动乘客独立时遇到错误(passenger start
):
*** ERROR ***: Cannot execute 2.3.1: No such file or directory (2)
我想知道这个错误来自哪里,所以我可以解决它。我能看到任何类型的回溯,所以我可以调试它吗?
在研究中,我看到其他人(here和here)有同样的错误,但执行usr/bin/ruby
。当需要指向ruby时,我必须有一些指向错误目录的配置,但我无法看到可能发生的位置。
运行passenger start --log-level=7
[ D 2018-03-02 14:27:56.4550 25489/Te LveLoggingDecorator.h:67 ]: LVE not in [pid 25489, uid 501, min_uid 500]
[ D 2018-03-02 14:27:56.4556 25489/Te age/Cor/Spa/SmartSpawner.h:280 ]: Preloader process forked for appRoot=/home/judo/apps/foo/current: PID 25522
App 25522 stdout:
App 25522 stderr: *** ERROR ***: Cannot execute 2.3.1: No such file or directory (2)
[ E 2018-03-02 14:27:56.5158 25489/Te age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/judo/apps/foo/current: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger.
Error ID: 058be22e
Error details saved to: /tmp/passenger-error-O5Bmb7.html
并保存的错误详细信息只是相同的细节。我也一直在关注我的应用程序日志(~/apps/foo/current/log/passenger.3000.log
),但它也是一样的。
在我的配置中,我应该指定可执行文件的路径,而不是2.3.1
?
$ echo $PATH
/home/judo/.rvm/gems/ruby-2.3.1/bin:/home/judo/.rvm/gems/ruby-2.3.1@global/bin:/home/judo/.rvm/rubies/ruby-2.3.1/bin:/home/judo/.rvm/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/jdk/bin:/home/judo/perl5/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/cpanel/composer/bin:/usr/local/easy/bin:/usr/local/bin:/usr/X11R6/bin:/home/judo/bin
Passenger 5.1.12,RVM 1.29.3,Ruby 2.3.1,CentOS 6.9,Apache 2.4.29
我在日志中注意到的一件事,参考2.3.1是:
Parsing 550 bytes of HTTP header: "HEAD / HTTP/1.1\r[...]\n!~PASSENGER_RUBY: 2.3.1\
因此,似乎乘客ruby变量设置为2.3.1
,而不是/home/judo/.rvm/wrappers/ruby-2.3.1/ruby
。但是,在我的apache pre_main_global.conf文件中,我有:
PassengerDefaultRuby /home/stevensp/.rvm/wrappers/ruby-2.3.1/ruby
我的httpd.conf文件中的域条目下的和,我有:
<Directory ~/foo/public/>
Options FollowSymLinks
AllowOverride all
PassengerEnabled on
Order allow,deny
Allow from all
</Directory>
LoadModule passenger_module /home/judo/.rvm/gems/ruby-2.3.1/gems/passenger-5.2.1/buildout/apache2/mod_passenger.so
PassengerRoot /home/judo/.rvm/gems/ruby-2.3.1/gems/passenger-5.2.1
PassengerRuby /home/judo/.rvm/gems/ruby-2.3.1/wrappers/ruby
PassengerResolveSymlinksInDocumentRoot on
# DocumentRoot /home/judo/foo/public
DocumentRoot /home/judo/public_html/foo
Options -MultiViews
如何设定其他地方?