cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

After needed update to 2020.4.0 got : time="2020-04-17T14:20:13Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/.well-known/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/.well-known/dns-query\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

Open julien-vu opened this issue 5 years ago • 15 comments

Hi,

To fix the issue #91 I needed the update 2020.4.0

After the update I got the following issue : time="2020-04-17T14:20:13Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/.well-known/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/.well-known/dns-query\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

Maybe a regression bug ?

julien-vu avatar Apr 17 '20 15:04 julien-vu

How did you configure your upstream?

https://1.1.1.1/.well-known/dns-query is the old draft uri. You should set your upstream as https://1.1.1.1/dns-query

kitsook avatar Apr 18 '20 07:04 kitsook

How did you configure your upstream?

https://1.1.1.1/.well-known/dns-query is the old draft uri. You should set your upstream as https://1.1.1.1/dns-query

I did not know the URI changed, after an update I still get this issue : time="2020-04-18T09:06:36Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/dns-query\": context deadline exceeded"

julien-vu avatar Apr 18 '20 09:04 julien-vu

Same here

● cloudflared.service - cloudflared DNS over HTTPS proxy
   Loaded: loaded (/lib/systemd/system/cloudflared.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-04-23 14:23:24 UTC; 7min ago
 Main PID: 22692 (cloudflared)
   CGroup: /system.slice/cloudflared.service
           └─22692 /usr/local/bin/cloudflared proxy-dns --port 5053 --upstream https://1.1.1.1/dns-query --upstream https://1.0.0.1/dns-query

Apr 23 14:26:11 pi-hole cloudflared[22692]: time="2020-04-23T14:26:11Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/dns-query\": dial tcp 1.1.1.1:443: connect: no route to host"
Apr 23 14:26:11 pi-hole cloudflared[22692]: time="2020-04-23T14:26:11Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/dns-query\": dial tcp 1.1.1.1:443: connect: no route to host"
Apr 23 14:26:12 pi-hole cloudflared[22692]: time="2020-04-23T14:26:12Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.0.0.1/dns-query\": context deadline exceeded"
Apr 23 14:26:15 pi-hole cloudflared[22692]: time="2020-04-23T14:26:15Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/dns-query\": dial tcp 1.1.1.1:443: connect: no route to host"
Apr 23 14:26:16 pi-hole cloudflared[22692]: time="2020-04-23T14:26:16Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/dns-query\": context deadline exceeded"
Apr 23 14:26:16 pi-hole cloudflared[22692]: time="2020-04-23T14:26:16Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.0.0.1/dns-query\": context deadline exceeded"
Apr 23 14:26:16 pi-hole cloudflared[22692]: time="2020-04-23T14:26:16Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.0.0.1/dns-query\": context deadline exceeded"
Apr 23 14:26:20 pi-hole cloudflared[22692]: time="2020-04-23T14:26:20Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.0.0.1/dns-query\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Apr 23 14:26:20 pi-hole cloudflared[22692]: time="2020-04-23T14:26:20Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.0.0.1/dns-query\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Apr 23 14:26:21 pi-hole cloudflared[22692]: time="2020-04-23T14:26:21Z" level=error msg="failed to connect to an HTTPS backend \"https://1.0.0.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.0.0.1/dns-query\": context deadline exceeded"
pi@pi-hole:~ $ cloudflared --version
cloudflared version 2020.4.0 (built Thu Apr 23 14:21:00 UTC 2020)

skjnldsv avatar Apr 23 '20 14:04 skjnldsv

Same here

Apr 23 14:26:11 pi-hole cloudflared[22692]: time="2020-04-23T14:26:11Z" level=error msg="failed to connect to an HTTPS backend \"https://1.1.1.1/dns-query\"" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/dns-query\": dial tcp 1.1.1.1:443: connect: no route to host"

It says "no route to host". Can your network access 1.1.1.1? Try using your browser and go to https://1.1.1.1/help. See if you can reach the 1.1.1.1 resolver.

kitsook avatar Apr 24 '20 17:04 kitsook

I couldn't reach 1.1.1.1, Why would it suddenly disappear? Forcing to 1.0.0.1 without cloudflared worked

skjnldsv avatar Apr 25 '20 06:04 skjnldsv

@skjnldsv See "Troubleshooting Unreachability or Routing Issues" from this community post for the relevant commands you should use to troubleshoot reachability and post back with the outputs.

judge2020 avatar Apr 30 '20 16:04 judge2020

Hello,

I am getting same issus with Client.Timeout exceeded while awaiting headers:

Apr 30 18:58:57 pi cloudflared[3795]: time="2020-04-30T18:58:57+01:00" level=error msg="failed to connect to an HTTPS backend \"https://security.cloudflare-dns.com/dns-query\"" error="failed to perform an HTTPS request: Post https://security.cloudflare-dns.com/dns-query: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
Apr 30 18:58:57 pi cloudflared[3795]: time="2020-04-30T18:58:57+01:00" level=error msg="failed to connect to an HTTPS backend \"https://security.cloudflare-dns.com/dns-query\"" error="failed to perform an HTTPS request: Post https://security.cloudflare-dns.com/dns-query: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"

cloudflared version 2020.4.0 (built 2020-04-14-1858 UTC)

I tried to use 1.1.1.1 and 1.0.0.1, the same problem.

Is it any update about this issue?

Or do I miss something?

ionutz89 avatar Apr 30 '20 18:04 ionutz89

Howdy. That error just means the standard Go HTTP client used in cloudflared timed out when making the DoH query. Obviously network timeouts, switching WiFi connections, etc could cause these errors. Outside of the error it prints is this causing any issues?

acmacalister avatar May 01 '20 21:05 acmacalister

For a short awhile, DNS does not resolve correctly.

I need to mention that my device is connected wired to the router.

Is it any way to increase the timeout in the command line?

Now I am trying to use Cloudflare teams:

May  2 12:30:09 pi cloudflared[21887]: time="2020-05-02T12:30:09+01:00" level=error msg="failed to connect to an HTTPS backend \"https://xzhouj8wiv.cloudflare-gateway.com/dns-query\"" error="failed to perform an HTTPS request: Post https://xzhouj8wiv.cloudflare-gateway.com/dns-query: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
May  2 12:30:09 pi cloudflared[21887]: time="2020-05-02T12:30:09+01:00" level=error msg="failed to connect to an HTTPS backend \"https://xzhouj8wiv.cloudflare-gateway.com/dns-query\"" error="failed to perform an HTTPS request: Post https://xzhouj8wiv.cloudflare-gateway.com/dns-query: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"```

ionutz89 avatar May 02 '20 12:05 ionutz89

Maybe the worst that can happen is someone can mess up your logs, but you should probably redact the code in your DoH lookup URL.

On Sat, May 2, 2020 at 08:17 Ionut Iorgu [email protected] wrote:

For a short awhile, DNS does not resolve correctly.

I need to mention that my device is connected wired to the router.

Now I am trying to use Cloudflare teams:

May 2 12:30:09 pi cloudflared[21887]: time="2020-05-02T12:30:09+01:00" level=error msg="failed to connect to an HTTPS backend "https://xzhouj8wiv.cloudflare-gateway.com/dns-query"" error="failed to perform an HTTPS request: Post https://xzhouj8wiv.cloudflare-gateway.com/dns-query: net/http: request canceled (Client.Timeout exceeded while awaiting headers)" May 2 12:30:09 pi cloudflared[21887]: time="2020-05-02T12:30:09+01:00" level=error msg="failed to connect to an HTTPS backend "https://xzhouj8wiv.cloudflare-gateway.com/dns-query"" error="failed to perform an HTTPS request: Post https://xzhouj8wiv.cloudflare-gateway.com/dns-query: net/http: request canceled (Client.Timeout exceeded while awaiting headers)"```

Is it anyway to increase timeout in command line ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cloudflare/cloudflared/issues/191#issuecomment-622944867, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJPKKEW5QT7DYDVEAYQATRPQFPFANCNFSM4MK3E5WQ .

JustinFreid avatar May 02 '20 16:05 JustinFreid

Happening to many, i think it might be broken right now.

TennisBowling avatar May 14 '20 19:05 TennisBowling

Hi Guys,

I setup DOH on Pi4 but i got below issue

un 15 20:45:22 DietPi systemd[1]: Started cloudflared DNS over HTTPS proxy.
Jun 15 20:45:23 DietPi cloudflared[361]: 2021-06-15T19:45:23Z INF Adding DNS upstream url=https://1.1.1.1/dns-query
Jun 15 20:45:23 DietPi cloudflared[361]: 2021-06-15T19:45:23Z INF Starting metrics server on 127.0.0.1:36711/metrics
Jun 15 20:45:23 DietPi cloudflared[361]: 2021-06-15T19:45:23Z INF Adding DNS upstream url=https://1.0.0.1/dns-query
Jun 15 20:45:23 DietPi cloudflared[361]: 2021-06-15T19:45:23Z INF Starting DNS over HTTPS proxy server address=dns://localhost:5053
Jun 15 20:45:31 DietPi cloudflared[361]: 2021-06-15T19:45:31Z ERR failed to connect to an HTTPS backend "https://1.1.1.1/dns-query" error="failed to perfor
m an HTTPS request: Post \"https://1.1.1.1/dns-query\": dial tcp 1.1.1.1:443: connect: no route to host"
Jun 15 20:45:31 DietPi cloudflared[361]: 2021-06-15T19:45:31Z ERR failed to connect to an HTTPS backend "https://1.1.1.1/dns-query" error="failed to perfor
m an HTTPS request: Post \"https://1.1.1.1/dns-query\": dial tcp 1.1.1.1:443: connect: no route to host"
Jun 15 20:45:31 DietPi cloudflared[361]: 2021-06-15T19:45:31Z ERR failed to connect to an HTTPS backend "https://1.1.1.1/dns-query" error="failed to perfor
m an HTTPS request: Post \"https://1.1.1.1/dns-query\": dial tcp 1.1.1.1:443: connect: no route to host"
Jun 15 20:45:31 DietPi cloudflared[361]: 2021-06-15T19:45:31Z ERR failed to connect to an HTTPS backend "https://1.1.1.1/dns-query" error="failed to perfor
m an HTTPS request: Post \"https://1.1.1.1/dns-query\": dial tcp 1.1.1.1:443: connect: no route to host"

Could you help me to resolve it?

anxion avatar Jun 15 '21 22:06 anxion

So I ran into this issue after updating my cloudflared image. What resolved it for me on Debian was simply updating the kernel headers sudo apt-get install linux-headers-$(uname -r). Not sure if coincidental but worth a shot.

jbencina avatar Jun 20 '21 16:06 jbencina

I faced same issue, just restart my gear and it worked like a charm.

mustofa-id avatar Jul 08 '21 11:07 mustofa-id

This has been an issue for as long as I've been using cloudflared. It suggests the connection to Cloudflare's DNS servers is flaky.

Thankfully, there are multiple IPs so at least one of them works at all times. I've rarely noticed a complete DNS failure (but they have occurred!)

2025-08-31T13:58:53.395474+01:00 localhost cloudflared[1761195]: 2025-08-31T12:58:53Z ERR failed to connect to an HTTPS backend "https://[2606:4700:4700::1111]/dns-query" error="failed to perform an HTTPS request: Post \"https://[2606:4700:4700::1111]/dns-query\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
2025-08-31T13:58:54.417090+01:00 localhost cloudflared[1761195]: 2025-08-31T12:58:54Z ERR failed to connect to an HTTPS backend "https://1.0.0.1/dns-query" error="failed to perform an HTTPS request: Post \"https://1.0.0.1/dns-query\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
2025-08-31T13:58:55.452032+01:00 localhost cloudflared[1761195]: 2025-08-31T12:58:55Z ERR failed to connect to an HTTPS backend "https://1.1.1.1/dns-query" error="failed to perform an HTTPS request: Post \"https://1.1.1.1/dns-query\": context deadline exceeded"
2025-08-31T13:58:58.396646+01:00 localhost cloudflared[1761195]: 2025-08-31T12:58:58Z ERR failed to connect to an HTTPS backend "https://[2606:4700:4700::1001]/dns-query" error="failed to perform an HTTPS request: Post \"https://[2606:4700:4700::1001]/dns-query\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
2025-08-31T13:58:59.419200+01:00 localhost cloudflared[1761195]: 2025-08-31T12:58:59Z ERR failed to connect to an HTTPS backend "https://[2606:4700:4700::1111]/dns-query" error="failed to perform an HTTPS request: Post \"https://[2606:4700:4700::1111]/dns-query\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
2025-08-31T13:59:00.452502+01:00 localhost cloudflared[1761195]: 2025-08-31T12:59:00Z ERR failed to connect to an HTTPS backend "https://1.0.0.1/dns-query" error="failed to perform an HTTPS request: Post \"https://1.0.0.1/dns-query\": context deadline exceeded"
2025-08-31T13:59:04.420621+01:00 localhost cloudflared[1761195]: 2025-08-31T12:59:04Z ERR failed to connect to an HTTPS backend "https://[2606:4700:4700::1001]/dns-query" error="failed to perform an HTTPS request: Post \"https://[2606:4700:4700::1001]/dns-query\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"

KenSharp avatar Sep 10 '25 11:09 KenSharp