nginx-dns icon indicating copy to clipboard operation
nginx-dns copied to clipboard

upstream disconnected?

Open jol64 opened this issue 10 months ago • 1 comments

I am trying to configure my DNS server to support DoH using the approach described in this repo. However when I try curl -vH "accept: application/dns-json" "https://redacted/dns-query?name=redacted&type=A" I - after a timeout - get a 502.

nginx error.log shows the following: 2025/01/21 18:34:35 [info] 56618#56618: *15 client 127.0.0.1:48790 connected to 127.0.0.1:8053 2025/01/21 18:34:35 [info] 56618#56618: *15 proxy 192.168.177.18:35244 connected to 192.168.177.19:53 2025/01/21 18:34:35 [warn] 56618#56618: *15 js: process_doh_request: DNS Req: GET /dns-query?name=redacted&type=A HTTP/1.1 2025/01/21 18:35:05 [info] 56618#56618: *15 upstream disconnected, bytes from/to client:133/0, bytes from/to upstream:0/0 2025/01/21 18:35:05 [error] 56618#56618: *13 upstream prematurely closed connection while reading response header from upstream, client: 192.168.177.18, server: , request: "GET /dns-query?name=redacted&type=A HTTP/2.0", up

I have been using tcpdump to look at the communication 192.168.177.18:35244 to 192.168.177.19:53, but it looks like there is no DNS request included (no ascii visible, no DNS decode by tcpdump).

nginx is version 1.26.2.

Any idea what I am doing wrong?

jol64 avatar Jan 21 '25 18:01 jol64