簡體   English   中英

AWS Elastic Beanstalk(Dash plotly 應用程序)- 502 錯誤網關

[英]AWS Elastic Beanstalk (Dash plotly app) - 502 Bad Gateway

我是編程新手,我的老板希望我在 AWS 彈性 beantalk 上部署一個 dash plotly 應用程序。 代碼已成功部署,但顯示502 bad gateway 錯誤。

502錯誤的網關
nginx/1.18.0

我試圖查看 /var/log/nginx/error.log 並將端口更改為8000但它仍然無法正常工作。

這個錯誤的解決方法是什么? 我應該添加 Procfile 以及應該在該文件中添加什么? 非常感謝!

/var/log/nginx/error.log

2020/11/25 05:24:52 [error] 16068#0: *38 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.38.82, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:25:01 [error] 16068#0: *40 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.2.244, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:25:07 [error] 16068#0: *42 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.38.82, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:25:16 [error] 16545#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.2.244, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:25:22 [error] 16545#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.38.82, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "dashmonitoring1-env.eba-umwfi3nn.us-east-2.elasticbeanstalk.com"
2020/11/25 05:25:22 [error] 16545#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.38.82, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:25:22 [error] 16545#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.38.82, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8000/favicon.ico", host: "dashmonitoring1-env.eba-umwfi3nn.us-east-2.elasticbeanstalk.com", referrer: "http://dashmonitoring1-env.eba-umwfi3nn.us-east-2.elasticbeanstalk.com/"
2020/11/25 05:25:31 [error] 16545#0: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.2.244, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:25:37 [error] 16545#0: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.38.82, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:25:46 [error] 16545#0: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.2.244, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:25:52 [error] 16545#0: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.38.82, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:26:01 [error] 16545#0: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.2.244, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"
2020/11/25 05:26:07 [error] 16545#0: *18 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.38.82, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.7.83"

對我來說,這解決了這個問題https://stackoverflow.com/a/67300325/15524555 基本上我的.ebextensions/application.config文件沒有正確指向 dash 應用程序實例。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM