AWS Elastic Beanstalk/nginx:connect()失败(111:连接被拒绝 [英] AWS elastic Beanstalk / nginx : connect() failed (111: Connection refused

查看:114
本文介绍了AWS Elastic Beanstalk/nginx:connect()失败(111:连接被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此消息

connect() failed (111: Connection refused

这是我的日志:

-------------------------------------
/var/log/nginx/error.log
-------------------------------------
2018/10/21 06:16:33 [error] 4282#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.4.119, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "hackingdeal-env.qnyexn72ga.ap-northeast-2.elasticbeanstalk.com"
2018/10/21 06:16:33 [error] 4282#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.4.119, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8081/favicon.ico", host: "hackingdeal-env.qnyexn72ga.ap-northeast-2.elasticbeanstalk.com", referrer: "http://hackingdeal-env.qnyexn72ga.ap-northeast-2.elasticbeanstalk.com/"

我正在使用nodejs/express Elastic Beanstalk env.

I am using nodejs/express Elastic Beanstalk env.

我有一个与Nginx相关的文件

I have one nginx related file in

.ebextensions/nginx/conf.d/proxy.conf

上部文件包含:

client_max_body_size 50M;

每当我尝试访问我的网页时,都会遇到502错误的网关.

Whenever I try to get my webpage I got 502 bad gateway.

我的应用程序怎么了?

推荐答案

111连接被拒绝可能意味着您的应用未在服务器/端口组合上运行.还要检查您的应用实例(或负载平衡器)的安全组是否设置了入站规则,以允许来自nginx实例的流量

111 connection refused likely means your app isn't running on the server/port combination. Also check that the security group for your app instance (or load balancer) has an inbound rule set to allow traffic from the nginx instance

这篇关于AWS Elastic Beanstalk/nginx:connect()失败(111:连接被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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