简体   繁体   English

使用Capistrano进行初始部署后,Rails应用程序无法正常工作(puma.sock失败)

[英]Rails app not working after initial deploy using capistrano (puma.sock failed)

I am getting the following errors in nginx.error.log file: 我在nginx.error.log文件中收到以下错误:

2017/01/19 23:51:57 [crit] 809#809: *1 connect() to unix:///home/deploy/Production01/appname/shared/tmp/sockets/Production01-puma.sock failed (2: No such file or home/deploy/Production01/appname/shared/tmp/sockets/Production01-puma.sock:/axis-cgi/jpg/image.cgi", host: "185.123.188.98", referrer: "1" 2017/01/19 23:51:57 [info] 809#809: *1 client 217.118.84.185 closed keepalive connection 2017/01/19 23:51:57 [crit] 809#809:* 1 connect()到Unix:///home/deploy/Production01/appname/shared/tmp/sockets/Production01-puma.sock失败(2 :没有此类文件或home / deploy / Production01 / appname / shared / tmp / sockets / Production01-puma.sock:/axis-cgi/jpg/image.cgi”,主机:“ 185.123.188.98”,引荐来源网址:“ 1” 2017/01/19 23:51:57 [info] 809#809:* 1客户端217.118.84.185关闭keepalive连接

and in the puma.log I have: 在puma.log中,我有:

=== puma startup: 2017-01-19 23:53:00 +0200 === * Listening on unix:///home/deploy/apps/Production01/shared/tmp/sockets/Production01-puma.sock === PUMA启动时间:2017-01-19 23:53:00 +0200 === *在Unix上监听//://home/deploy/apps/Production01/shared/tmp/sockets/Production01-puma.sock

  1. deploy.rb deploy.rb
  2. puma.rb 彪马
  3. nginx.conf nginx.conf

I am using capistrano and everything is deployed correctly. 我正在使用capistrano,一切都已正确部署。 On my local machine the demo project is working fine. 在我的本地计算机上,演示项目运行正常。

This is my first deploy and I guess I have not do something correctly in the config files. 这是我的第一次部署,我想我没有在配置文件中正确执行某些操作。

Could you advice? 你能建议吗?

You need to symlink your nginx files. 您需要符号链接您的nginx文件。

Try this on your server 在您的服务器上尝试

cd ~

sudo ln -nfs home/deploy/Production01/appname/current/config/nginx.conf /etc/nginx/sites-available/appname

sudo ln -nfs /etc/nginx/sites-available/appname /etc/nginx/sites-enabled/

sudo service nginx restart

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM