upstream server temporarily disabled while connecting to upstream(记录bug)

简介: upstream server temporarily disabled while connecting to upstream(记录bug)

场景


connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: localhost, request: "GET /api/?token=success HTTP/1.1", subrequest: "/auth", upstream: "http://127.0.0.1:8080/verify?token=success", host: "localhost"

在nginx访问接口的时候,去做一些权限的校验。只有校验通过才能访问接口,否则就直接返回失败。


但是在调用上游接口的时候,一直提示上游服务暂时禁用。但是上游服务可以保证一定运行着,并且可以访问通。所以通过查阅前人总结发现。原来每个容器内的本地主机(如Nginx容器)与容器外部的本地主机不同。


解决办法


proxy_pass localhost:8080”中的本地主机更改为“×.×.×.×”(这是我计算机中的IPv4)即可解决这个问题。

目录
打赏
0
0
0
0
8
分享
相关文章
WARNING:The remote SSH server rejected X11 forwarding request.
WARNING:The remote SSH server rejected X11 forwarding request.
229 0
WARNING:The remote SSH server rejected X11 forwarding request.
Nginx——*5 connect() failed (111: Connection refused) while connecting to upstream
Nginx——*5 connect() failed (111: Connection refused) while connecting to upstream
825 0
Nginx——*5 connect() failed (111: Connection refused) while connecting to upstream
|
10月前
|
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
299 0
connect() failed (113: No route to host) while connecting to upstream
connect() failed (113: No route to host) while connecting to upstream
255 0
Server asks us to fall back to SIMPLE auth, but this client is configured to only allow secure connections.
我是在flume向hdfs 写(sink)数据时遇到的这个错误. Server (是指hdfs) asks us to fall back to SIMPLE auth, but this client (是指flume) is configured to only allow secure (是指kerberos) connections.
3980 0

热门文章

最新文章