No route to host

We having a sporadic issue since the outage.
2020/07/22 17:20:04 [error] 47#47: *17071 connect() failed (113: No route to host) while connecting to upstream, client:, server:
I don’t want to share my server names here. The statistic is saying it’s 1.76% of 502 errors.
Thanks for support

Then it is difficult to say anything.

“No route to host” and a 502 are very different errors however. You most likely have some routing issue on the network in question. You need to talk to the person responsible for that network.

Can you at least share the Cloudflare IP address you are resolving from your hostname?

The problem is that it’s not a permanent issue and very conditional some customers went through , some not.
15:35:58 [error] 2019#2019: *768468 connect() failed (113: No route to host) while connecting to upstream, client:, server:, request: "GET /

we have ~ 1.5% of traffic affected by this

The host resolves just fine. Considering there is an IPv4 address I assume we are talking about an IPv4 connection.

This is rather unlikely a Cloudflare issue but rather something about your network. You should clarify this with your network administrator or the ISP.

What’s the output of Also make sure you actually do resolve the right IP address.

uag=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36

the reason why I assume this might be related to cloudflare, we have internal requests done via the internal dns and everything works fine. The issue occurs once we request it via the external dns

Looks okay. In your case you are going via the datacentre in Virginia. Can you actually reproduce the issue or is it just your visitors? Do they go via the same datacentre?

You probably best run traceroute whenever you experience the issue to check where the connection breaks.

Again, are you sure you resolve the correct IP address in these cases? If you don’t you might have a DNS issue.

we had a lot of errors via and still having them. We have internal monitoring that we performing this errors. But in nginx logs I can see no route to host also. I can also see some other error via
I can see the proper response from
The IP is correct in this case since the server is responding, still I have no route quite often.

We should not mix hosts at this point.

Run the checks I mentioned earlier first and make sure you get the right address.

The address is right, I can still see in nginx logs - - [23/Jul/2020:15:57:27 +0000] "GET / 200 response, so some customers are going trough perfectly, some failing.

That’s the access log. That contains client addresses not the server address.

Again, what is the traceroute when the error occurs?

Is that an entry from the error log?

15:35:58 [error] 2019#2019: *768468 connect() failed (113: No route to host) while connecting to upstream, client:, server:, request: "GET /

That would suggest the machine where you proxy Cloudflare to, then proxies onwards to another machine and that connection fails. Is that right?

In that case it shouldn’t be an issue with your clients either, but your own proxy seems to have some networking issue.

For starters, I’d advise not to specify a Cloudflare proxied address for your own proxy. Either provide it with an unproxied hostname or configure the actual IP address.

Second, check the network connectivity of your machine. It could be something DNS related but more likely you simply have a network issue there. So far there is no indication that is Cloudflare related.