部署 Nginx Passenger 部署问题 - Cannot execute /root/.rbenv/shims/ruby: Permission denied (13)

yldcb · March 18, 2015 · Last by huopo125 replied at March 19, 2015 · 4142 hits

出错日志:

[ 2015-03-18 08:20:34.2685 30377/7f38a31bd700 App/Implementation.cpp:287 ]: Could not spawn process for application /home/xyt/web/web/root/myread: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger.
  Error ID: c1229380
  Error details saved to: /tmp/passenger-error-gDSnCw.html
  Message from application: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
<h2>Raw process output:</h2>
<pre>
*** ERROR ***: Cannot execute /root/.rbenv/shims/ruby: Permission denied (13)
</pre>

[ 2015-03-18 08:20:34.2749 30377/7f389c8ef700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is c1229380. Please see earlier logs for details about the error.
^Croot@linshuizhaoying:/home/xyt# sudo tail -f /tmp/passenger-error-gDSnCw.html
                        <div class="container">
                                Powered by <a href="https://www.phusionpassenger.com/">Phusion Passenger</a>,
                                <tt>mod_rails</tt> / <tt>mod_rack</tt> for Apache and Nginx.


We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

google 了半天没有解决办法,希望以前遇到过这类问题的大牛能给个方案。

会不会是因为 linxu 角色权限的问题?你的 Ruby 是用 root 装的?然后 deploy 用的是另外的用户?

nginx.conf set user ????

#1 楼 @king1990_cool 我安装用是 root deploy 用的也是 root 之前也觉得是角色问题,后来用 root 用户 restart ngnix 还是这样

把 nginx.conf 的用户权限设定为 root,应该可以解决。

很不推荐这么做。建议新建 deploy 用户,重新装 rbenv。

你可以直接将部署时 capitstrano 执行的最后出错命令,到你主机上直接执行进行调试。这类问题挺折腾的,所以以后还是将所有环境装在你部署时使用的用户环境中的好。

You need to Sign in before reply, if you don't have an account, please Sign up first.