[英]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
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.