upgrade required on nginx proxies

hey Fly friends,

Am going to start by saying I’m almost 100% certain this is my fault and isn’t something fly did. If you have ideas here though, I’d appreciate it.

Requests to the proxies I’ve set up are now failing with 426/upgrade required. I haven’t made changes to most of them. See curl -v /status.

I’m basically proxying to a third party service here. Fly/nginx isn’t giving me headers from what I assume was the failure-point upstream.

Any ideas? Thanks

FWIW I’m now trying to increase my logging levels to see if there’s more detail on the server.

This might actually be us, give us a few minutes to dig through logs and see where that error is coming from.

1 Like

Ok, it’s not us!

I’m guessing this is coming from the third party service. More nginx logs should help.

You can run fly ssh console -a <app-name> then test against nginx locally with curl http://localhost:8080, by the way.

thanks Kurt. So I think it’s actually more likely than I did before it might be fly. “no route to host”

This from one of my proxies:

connect() failed (113: No route to host) while connecting to upstream, client: 51.81.106.154, server: , request: “GET /api/1/products HTTP/1.1”, upstream: “https://(SolarWinds Cloud):443/api/1/products”, host: “”

I will try the SSH approach now

This is nginx connecting to another nginx on Fly using a public IP?

this my nginx hosted on fly connecting to a server controlled by someone other than us, with three layers of DNS.

I’ll note that when I try contacting that host from an SSH session the fly instance, it seems to connect / resolve fine and gets valid data back. No 426. This does not make sense to me give the “no route to host” error from before. It’s possible it’s an IPV6 thing maybe? We’re seeing some extra IPV6 errors in other logs.

It looks like upstream API requires HTTP 1.1 now. You can get the response locally with this:

curl https://upstream-api/api/1/products -v --http1.0

If you change that arg to --http1.1 you get a normal 401 response from them.

Try setting the proxy_http_version option in your config: Module ngx_http_proxy_module

thank you. Will take a look! Any theories on why I had “no route to host?”

Can confirm that appears to no longer give me errors! Thanks so much. Can you tell me @kurt how you figured out the http version issue? / what your thought process was?

I just searched nginx 426 upgrade required upstream and found a stack overflow result that looked similar. Proxies are a pain because figuring out where the actual error came from us the hardest part.

That route to host error was probably a one off!

1 Like

Thank you, makes sense.