Welcome! Log In Create A New Profile

Advanced

forward proxy config is causing "upstream server temporarily disabled while connecting to upstream" error

Señor J Onion
March 01, 2021 04:38AM
I want to set up nginx as a forward proxy - much like Squid might work.

This is my server block:

server {
listen 3128;
server_name localhost;

location / {
resolver 8.8.8.8;
proxy_pass http://$http_host$uri$is_args$args;
}
}

This is the curl command I use to test, and it works the first time, maybe even the second time.

curl -s -D - -o /dev/null -x "http://localhost:3128" http://storage.googleapis.com/my.appspot.com/test.jpeg

The corresponding nginx access log is

172.23.0.1 - - [26/Feb/2021:12:38:59 +0000] "GET http://storage.googleapis.com/my.appspot.com/test.jpeg HTTP/1.1" 200 2296040 "-" "curl/7.64.1" "-"

However - on repeated requests, I start getting these errors in my nginx logs (after say the 2nd or 3rd attempt)

2021/02/26 12:39:49 [crit] 31#31: *4 connect() to [2c0f:fb50:4002:804::2010]:80 failed (99: Address not available) while connecting to upstream, client: 172.23.0.1, server: localhost, request: "GET http://storage.googleapis.com/omgimg.appspot.com/test.jpeg HTTP/1.1", upstream: "http://[2c0f:fb50:4002:804::2010]:80/my.appspot.com/test.jpeg", host: "storage.googleapis.com"
2021/02/26 12:39:49 [warn] 31#31: *4 upstream server temporarily disabled while connecting to upstream, client: 172.23.0.1, server: localhost, request: "GET http://storage.googleapis.com/my.appspot.com/test.jpeg HTTP/1.1", upstream: "http://[2c0f:fb50:4002:804::2010]:80/my.appspot.com/test.jpeg", host: "storage.googleapis.com"


What might be causing these issues after just a handful of requests? (curl still fetches the URL fine)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

forward proxy config is causing "upstream server temporarily disabled while connecting to upstream" error

Señor J Onion March 01, 2021 04:38AM

Re: forward proxy config is causing "upstream server temporarily disabled while connecting to upstream" error

Maxim Dounin March 01, 2021 09:18AM

Re: forward proxy config is causing "upstream server temporarily disabled while connecting to upstream" error

Señor J Onion March 01, 2021 10:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 244
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready