gpt4 book ai didi

java - 连接()失败(111 : Connection refused) while connecting to upstream. Java(SparkJava)亚马逊弹性

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:20:18 24 4
gpt4 key购买 nike

尝试部署我的第一个应用程序(后端)。但是我遇到了 502 Bad Gateway 类型的错误。

2016/05/03 14:46:14 [error] 2247#0: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.43.183, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "myHost.eu-west-1.elasticbeanstalk.com"
2016/05/03 14:50:23 [error] 2566#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.36, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "myHost.eu-west-1.elasticbeanstalk.com"
2016/05/03 14:55:04 [error] 2566#0: *61 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.43.183, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "myHost.eu-west-1.elasticbeanstalk.com"

我将 SparkJava 用于我的后端框架,它在端口 4567 上启动。因此,我扩展了 Nginx (nginx/1.8.1) 的配置。但问题始终存在。

server {
listen 4567 default_server;
listen [::]:4567 default_server ipv6only=on;
}

供引用:我的后端与数据库(RDS aws amazon)通信

最佳答案

从您的日志:upstream: "http://127.0.0.1:5000/" 我看到,nginx 正在尝试连接到同一台机器上的 5000 端口,但它拒绝连接。什么在5000端口上运行?您可能需要调查一下。

关于java - 连接()失败(111 : Connection refused) while connecting to upstream. Java(SparkJava)亚马逊弹性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37012552/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com