尝试将我的Rails应用程序上传到弹性beantalk.我已经成功部署了我的应用程序并创建了postgres数据库.我的应用程序可在开发服务器上的sqlite3上运行.我的eb状态已准备就绪,健康状况良好.我的eb日志文件;/var/log/ng...
尝试将我的Rails应用程序上传到弹性beantalk.我已经成功部署了我的应用程序并创建了postgres数据库.我的应用程序可在开发服务器上的sqlite3上运行.
我的eb状态已准备就绪,健康状况良好.
我的eb日志文件;
/var/log/nginx/error.log
-------------------------------------
2016/05/27 11:15:44 [warn] 2797#0: conflicting server name "localhost" on 0.0.0.0:80, ignored
2016/05/27 11:27:26 [crit] 2805#0: *140 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.26.77, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com"
2016/05/27 11:27:26 [crit] 2805#0: *140 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.26.77, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/favicon.ico", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com", referrer: "http://viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com/"
2016/05/27 11:34:45 [crit] 2805#0: *262 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.46.145, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com"
2016/05/27 11:34:45 [crit] 2805#0: *262 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.46.145, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/favicon.ico", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com", referrer: "http://viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com/"
2016/05/27 11:40:48 [crit] 2805#0: *353 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.46.145, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com"
2016/05/27 11:40:49 [crit] 2805#0: *353 connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.46.145, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:///var/run/puma/my_app.sock:/favicon.ico", host: "viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com", referrer: "http://viravira-env.bu2eqpbwny.us-west-2.elasticbeanstalk.com/"
-------------------------------------
/var/log/puma/puma.log
-------------------------------------
=== puma startup: 2016-05-27 11:52:07 +0000 ===
=== puma startup: 2016-05-27 11:52:07 +0000 ===
[23871] - Worker 0 (pid: 23875) booted, phase: 0
[23871] - Gracefully shutting down workers...
[23871] === puma shutdown: 2016-05-27 12:36:32 +0000 ===
[23871] - Goodbye!
=== puma startup: 2016-05-27 12:36:35 +0000 ===
=== puma startup: 2016-05-27 12:36:35 +0000 ===
[24886] - Worker 0 (pid: 24890) booted, phase: 0
我对eb很陌生,所以我想知道是否由于以下原因而发生了问题;
>我尚未安装节点,因此无法连接
>或者我在安全组方面遇到问题.如图所示,我总共有4个.
我的网络接口;
当我尝试分离RDS安全组时,即使我以root用户身份登录,它也给出未授权错误.
我已经尝试解决这个问题了几个小时,非常感谢您的帮助!
编辑
我认为我遇到了与here相同的问题.但无法理解如何解决
解决方法:
从Nginx日志中,您的问题非常清楚:
connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream
内容为:
没有相应的文件和目录
这意味着您的套接字在此路径中不存在:
/var/run/puma/my_app.sock
>您需要将路径设置为与Rails / Puma中的路径相同
上游(即配置)
>当您这样做时,请不要忘记确保该Nginx用户
可以访问该套接字,它将需要RW访问.
本文标题为:ruby-on-rails-Rails-Elastick Beanstalk nginx / error.log
- Go Web开发进阶实战(gin框架) 2023-09-06
- Ruby的字符串与数组求最大值的相关问题讨论 2023-07-22
- 汇编语言程序设计之根据输入改变屏幕颜色的代码 2023-07-06
- Golang http.Client设置超时 2023-09-05
- Swift超详细讲解指针 2023-07-08
- Ruby on Rails在Ping ++ 平台实现支付 2023-07-22
- Ruby 迭代器知识汇总 2023-07-23
- R语言关于二项分布知识点总结 2022-11-30
- R语言绘图数据可视化pie chart饼图 2022-12-10
- R语言-如何切换科学计数法和更换小数点位数 2022-11-23