Rails-Elastick Beanstalk的nginx/error.log [英] Rails - Elastick Beanstalk nginx/error.log

查看:66
本文介绍了Rails-Elastick Beanstalk的nginx/error.log的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试将我的rails应用程序上传到弹性beantalk.我已经成功部署了我的应用程序并创建了postgres数据库.我的应用程序可在开发服务器上的sqlite3上运行.

Trying to upload my rails app to elastic beanstalk. I have successfully deployed my app and created postgres database. My app works on sqlite3 on development server.

我的eb状态已准备就绪,健康状况为绿色.

my eb status is ready and health is green.

我的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很陌生,所以我想知道是否由于以下原因而出现问题;

I am fairly new to eb so I wonder if the problem occurs because of the followings;

  1. 我尚未安装节点,因此无法连接
  2. 或者我的安全组有问题.如图所示,我总共有4个.
  1. I have not installed node that is why it can not connect
  2. Or I have problems with the security groups. I have 4 total as seen in the picture.

我的网络接口; 当我尝试分离RDS安全组时,即使我以root用户身份登录,它也未给出错误授权.
我已经尝试解决这个问题了几个小时了,非常感谢您的帮助!

my network interfaces; when I try to detach RDS security group, it gives an error no authorization, even though I signed in as root.
I have been trying to solve the problem for hours now and really appreciate any help!

编辑 我认为我遇到的问题与

EDIT I think I m having same issue as here. But could not understand how to solve it

推荐答案

从Nginx日志中您的问题很清楚:

Your problem is very clear from the Nginx log:

在连接到上游时,将unix:///var/run/puma/my_app.sock的connect()失败(2:没有此类文件或目录)

connect() to unix:///var/run/puma/my_app.sock failed (2: No such file or directory) while connecting to upstream

它显示为:

没有此类文件或目录

这意味着您的套接字在此路径中不存在:

This means that your socket doesn't not exist at this path:

/var/run/puma/my_app.sock

  1. 您需要将路径设置为与Rails/Puma中的路径相同 上游(即配置)

  1. You need to setup the path to be the same as in your Rails/Puma upstream(i.e. configuration)

当您执行此操作时,不要忘记,以确保该Nginx用户 可以访问该套接字,它需要 RW 访问权限.

When you will do that don't forget to make sure that Nginx user can access that socket it will need RW access.

这篇关于Rails-Elastick Beanstalk的nginx/error.log的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆