简体   繁体   English

AWS EC2:(连接被拒绝)同时连接到上游

[英]AWS EC2: (Connection refused) while connecting to upstream

Error:错误:

2022/02/25 05:25:23 [error] 16292#16292: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.9.17, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.21.11.88" 2022/02/25 05:25:23 [错误] 16292#16292:*1 connect() 在连接到上游时失败(111:连接被拒绝),客户端:172.31.9.17,服务器:,请求:“GET / HTTP/ 1.1",上游:"http://127.0.0.1:5000/",主机:"172.21.11.88"

It's my first time uploading a fullstack JAR file in AWS EC2.这是我第一次在 AWS EC2 中上传全栈 JAR 文件。 Jar file contains Thymleaf web pages and the main java codes. Jar 文件包含 Thymleaf web 页和主要 java 代码。

I've also done setting my RDS in AWS as well.I changed the security group to 'allow access' anywhere so I can connect to it on my local MySQL Workbench.我也在 AWS 中设置了我的 RDS。我将安全组更改为“允许访问”任何地方,这样我就可以在我的本地 MySQL Workbench 上连接到它。 By this, Im done setting up my SQL tables.至此,我完成了 SQL 表的设置。

So I uploaded the JAR file.所以我上传了 JAR 文件。 The status went from Healthy to Severe.状态从健康变为严重。 When I access the URL of my app I get this:当我访问我的应用程序的 URL 时,我得到了这个:

在此处输入图像描述

application.properties应用程序.properties

server.port=5000

AWS Security Group AWS 安全组在此处输入图像描述

Inbound Rules入境规则在此处输入图像描述

Health Monitoring健康监测在此处输入图像描述

UPDATE:更新:

Here's where Im at这就是我所在的地方

在此处输入图像描述

Is this what's causing my errors?这是导致我的错误的原因吗?

By default EB expects your app to listen on port 5000. From docs :默认情况下,EB 希望您的应用程序在端口 5000 上侦听。来自文档

By default, Elastic Beanstalk configures the nginx proxy to forward requests to your application on port 5000. You can override the default port by setting the PORT environment property to the port on which your main application listens.默认情况下,Elastic Beanstalk 配置 nginx 代理以将请求转发到端口 5000 上的应用程序。您可以通过将PORT 环境属性设置为主应用程序侦听的端口来覆盖默认端口。

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

相关问题 111:连接到上游时连接被拒绝 - 111: Connection refused while connecting to upstream AWS EC2 实例连接在浏览器中被拒绝 - AWS EC2 Instance Connection Refused in browser Django; 44 connect() 在连接到 AWS Elastic Bean 上的上游时失败(111:连接被拒绝) - Django; 44 connect() failed (111: Connection refused) while connecting to upstream on AWS Elastic Bean 连接到上游时连接()失败(111:连接被拒绝)。(节点/ nestjs)亚马逊弹性 - connect() failed (111: Connection refused) while connecting to upstream.(node / nestjs) amazon Elastic 在 AWS EC2 上的 Cassandra 集群上运行 nodetool 时出现“连接被拒绝” - Getting "Connection refused" when running nodetool on Cassandra cluster on AWS EC2 AWS EC2 实例连接问题 - AWS EC2 instance connection issue EC2 实例上托管的 Laravel 项目的站点部署连接被拒绝 - Site deployment connection refused for Laravel Project hosted on EC2 instance Nginx docker 反应 ec2 https 连接被拒绝 - Nginx docker react ec2 https connection refused 连接到上游 nginx for aws 时 connect() 失败(113:主机无法访问) - connect() failed (113: Host is unreachable) while connecting to upstream nginx for aws 将 EC2 与默认 VPC 连接与 AWS 中的自定义 VPC Terraform - Connecting EC2 with Default VPC vs Customized VPC in AWS Terraform
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM