【发布时间】:2016-11-23 20:33:18
【问题描述】:
我正在关注this tutorial 设置Rails 服务器,但是当我尝试启动独角兽应用服务器时遇到此错误:
$ sudo service unicorn_appname start
Job for unicorn_appname.service failed because the control process exited with error code. See "systemctl status unicorn_appname.service" and "journalctl -xe" for details.
更多细节:
$ systemctl status unicorn_appname.service
● unicorn_appname.service - LSB: starts the unicorn app server
Loaded: loaded (/etc/init.d/unicorn_appname; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2016-11-23 20:22:36 UTC; 1min 33s ago
Docs: man:systemd-sysv-generator(8)
Process: 39284 ExecStart=/etc/init.d/unicorn_appname start (code=exited, status=1/FAILURE)
Nov 23 20:22:36 azure systemd[1]: Starting LSB: starts the unicorn app server...
Nov 23 20:22:36 azure unicorn_appname[39284]: /etc/init.d/unicorn_appname: 30: cd: can't cd to /home/deploy/appname
Nov 23 20:22:36 azure systemd[1]: unicorn_appname.service: Control process exited, code=exited status=1
Nov 23 20:22:36 azure systemd[1]: Failed to start LSB: starts the unicorn app server.
Nov 23 20:22:36 azure systemd[1]: unicorn_appname.service: Unit entered failed state.
Nov 23 20:22:36 azure systemd[1]: unicorn_appname.service: Failed with result 'exit-code'.
我尝试在谷歌上输入这些错误消息,但没有任何有用的结果,我现在有点卡住了,因为我是 Rails 的初学者,并且通常设置 Web 服务器。有什么建议吗?
【问题讨论】:
-
Nov 23 20:22:36 azure unicorn_appname[39284]: /etc/init.d/unicorn_appname: 30: cd: can't cd to /home/deploy/appname检查路径是否存在,应用程序文件是否可访问,权限等 -
打印这些配置行# app settings USER="deploy" APP_NAME="appname" APP_ROOT="/home/$USER/$APP_NAME" ENV="production" ????跨度>
-
@num8er 为我指明了正确的方向(我忘记在配置文件中用我的用户替换作者的用户),但我现在有其他问题,所以稍后我会更新问题或发布答案
标签: ruby-on-rails ruby nginx unicorn systemd