[GH-ISSUE #1493] Doh timeout while disable stop dnsmasq #685

Closed
opened 2026-03-15 23:48:14 +03:00 by kerem · 1 comment
Owner

Originally created by @mokeyish on GitHub (May 21, 2021).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1493

Describe the bug
Doh timeout while disable stop dnsmasq. when the dnsmasq is running, the named works well.

To Reproduce
Steps to reproduce the behavior:

  1. /etc/resolv.conf
    nameserver 127.0.0.1
    
  2. stop dnsmasq
  3. run named
listen_addrs_ipv4 = ["0.0.0.0"]
listen_port = 8053

[[zones]]
## zone: this is the ORIGIN of the zone, aka the base name, '.' is implied on the end
##  specifying something other than '.' here, will restrict this forwarder to only queries
##  where the search name is a subzone of the name, e.g. if zone is "example.com.", then
##  queries for "www.example.com" or "example.com" would be forwarded.
zone = "."

## zone_type: Primary, Secondary, Hint, Forward
zone_type = "Forward"

## remember the port, defaults: 53 for Udp & Tcp, 853 for Tls and 443 for Https.
##   Tls and/or Https require features dns-over-tls and/or dns-over-https

[zones.stores]
type = 'forward'

[[zones.stores.name_servers]]
protocol = 'https'
socket_addr = '119.29.29.29:443'
tls_dns_name = 'dot.pub'
trust_nx_responses = false

  1. query dns dig @127.0.0.1 -p 8053 baidu.com
    logs
1621673746.582913:DEBUG:trust_dns_resolver::name_server::name_server:110:reconnecting: NameServerConfig { socket_addr: 162.14.21.56:443, protocol: Tls, tls_dns_name: Some("doh.pub"), trust_nx_responses: false, tls_config: None }
1621673746.590864:DEBUG:trust_dns_proto::xfer:168:enqueueing message: [Query { name: Name { is_fqdn: true, label_data: [113, 113, 99, 111, 109], label_ends: [2, 5] }, query_type: A, query_class: IN, mdns_unicast_response: false }]
1621673746.590942:DEBUG:trust_dns_proto::xfer::dns_multiplexer:310:sending message id: 6297
1621673746.590974:DEBUG:trust_dns_proto::tcp::tcp_stream:310:sending message len: 24 to: 162.14.21.56:443
1621673746.594498:DEBUG:trust_dns_proto::tcp::tcp_stream:357:in ReadTcpState::LenBytes: 0
1621673746.594531:DEBUG:trust_dns_proto::tcp::tcp_stream:366:got length: 0
1621673746.594541:DEBUG:trust_dns_proto::tcp::tcp_stream:370:move ReadTcpState::Bytes: 0
1621673746.594548:DEBUG:trust_dns_proto::tcp::tcp_stream:381:zero bytes read for message, stream closed?
1621673746.594557:WARN:trust_dns_proto::xfer::dns_multiplexer:199:stream TCP(162.14.21.56:443) error: io error: closed while reading message
1621673746.594577:DEBUG:trust_dns_proto::xfer::dns_exchange:176:io_stream is done, shutting down
1621673746.594646:DEBUG:trust_dns_resolver::name_server::name_server:161:name_server connection failure: proto error: io error: broken pipe
1621673746.594677:DEBUG:trust_dns_resolver::name_server::name_server_pool:235:sending request: [Query { name: Name { is_fqdn: true, label_data: [113, 113, 99, 111, 109], label_ends: [2, 5] }, query_type: A, query_class: IN, mdns_unicast_response: false }]
1621673746.594714:DEBUG:trust_dns_resolver::name_server::name_server:110:reconnecting: NameServerConfig { socket_addr: 162.14.21.56:443, protocol: Tls, tls_dns_name: Some("doh.pub"), trust_nx_responses: false, tls_config: None }
1621673746.608892:DEBUG:trust_dns_proto::xfer:168:enqueueing message: [Query { name: Name { is_fqdn: true, label_data: [113, 113, 99, 111, 109], label_ends: [2, 5] }, query_type: A, query_class: IN, mdns_unicast_response: false }]
1621673746.609048:DEBUG:trust_dns_proto::xfer::dns_multiplexer:310:sending message id: 45398
1621673746.609110:DEBUG:trust_dns_proto::tcp::tcp_stream:310:sending message len: 24 to: 162.14.21.56:443
1621673746.615797:DEBUG:trust_dns_proto::tcp::tcp_stream:357:in ReadTcpState::LenBytes: 0
1621673746.615866:DEBUG:trust_dns_proto::tcp::tcp_stream:366:got length: 0
1621673746.615897:DEBUG:trust_dns_proto::tcp::tcp_stream:370:move ReadTcpState::Bytes: 0
1621673746.615915:DEBUG:trust_dns_proto::tcp::tcp_stream:381:zero bytes read for message, stream closed?
1621673746.615947:WARN:trust_dns_proto::xfer::dns_multiplexer:199:stream TCP(162.14.21.56:443) error: io error: closed while reading message
1621673746.616002:DEBUG:trust_dns_proto::xfer::dns_exchange:176:io_stream is done, shutting down
1621673746.616179:DEBUG:trust_dns_resolver::name_server::name_server:161:name_server connection failure: proto error: io error: broken pipe
1621673746.616266:ERROR:trust_dns_server::authority::catalog:599:error resolving: Resolution error: proto error: io error: broken pipe
1621673746.616399:INFO:trust_dns_server::server::response_handler:49:response: 59153 response_code: 0

Expected behavior
A clear and concise description of what you expected to happen.

System:

  • OS: macOS,openwrt,deepin
  • Architecture: [e.g. x86_64]
  • Version latest
  • rustc version: 1.52.1

Version:
Crate: [e.g. client, server, resolver]
Version: [e.g. 0.9.1]

Originally created by @mokeyish on GitHub (May 21, 2021). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1493 **Describe the bug** Doh timeout while disable stop dnsmasq. when the dnsmasq is running, the named works well. **To Reproduce** Steps to reproduce the behavior: 1. /etc/resolv.conf ```conf nameserver 127.0.0.1 ``` 2. stop dnsmasq 3. run named ```toml listen_addrs_ipv4 = ["0.0.0.0"] listen_port = 8053 [[zones]] ## zone: this is the ORIGIN of the zone, aka the base name, '.' is implied on the end ## specifying something other than '.' here, will restrict this forwarder to only queries ## where the search name is a subzone of the name, e.g. if zone is "example.com.", then ## queries for "www.example.com" or "example.com" would be forwarded. zone = "." ## zone_type: Primary, Secondary, Hint, Forward zone_type = "Forward" ## remember the port, defaults: 53 for Udp & Tcp, 853 for Tls and 443 for Https. ## Tls and/or Https require features dns-over-tls and/or dns-over-https [zones.stores] type = 'forward' [[zones.stores.name_servers]] protocol = 'https' socket_addr = '119.29.29.29:443' tls_dns_name = 'dot.pub' trust_nx_responses = false ``` 4. query dns `dig @127.0.0.1 -p 8053 baidu.com` logs ```log 1621673746.582913:DEBUG:trust_dns_resolver::name_server::name_server:110:reconnecting: NameServerConfig { socket_addr: 162.14.21.56:443, protocol: Tls, tls_dns_name: Some("doh.pub"), trust_nx_responses: false, tls_config: None } 1621673746.590864:DEBUG:trust_dns_proto::xfer:168:enqueueing message: [Query { name: Name { is_fqdn: true, label_data: [113, 113, 99, 111, 109], label_ends: [2, 5] }, query_type: A, query_class: IN, mdns_unicast_response: false }] 1621673746.590942:DEBUG:trust_dns_proto::xfer::dns_multiplexer:310:sending message id: 6297 1621673746.590974:DEBUG:trust_dns_proto::tcp::tcp_stream:310:sending message len: 24 to: 162.14.21.56:443 1621673746.594498:DEBUG:trust_dns_proto::tcp::tcp_stream:357:in ReadTcpState::LenBytes: 0 1621673746.594531:DEBUG:trust_dns_proto::tcp::tcp_stream:366:got length: 0 1621673746.594541:DEBUG:trust_dns_proto::tcp::tcp_stream:370:move ReadTcpState::Bytes: 0 1621673746.594548:DEBUG:trust_dns_proto::tcp::tcp_stream:381:zero bytes read for message, stream closed? 1621673746.594557:WARN:trust_dns_proto::xfer::dns_multiplexer:199:stream TCP(162.14.21.56:443) error: io error: closed while reading message 1621673746.594577:DEBUG:trust_dns_proto::xfer::dns_exchange:176:io_stream is done, shutting down 1621673746.594646:DEBUG:trust_dns_resolver::name_server::name_server:161:name_server connection failure: proto error: io error: broken pipe 1621673746.594677:DEBUG:trust_dns_resolver::name_server::name_server_pool:235:sending request: [Query { name: Name { is_fqdn: true, label_data: [113, 113, 99, 111, 109], label_ends: [2, 5] }, query_type: A, query_class: IN, mdns_unicast_response: false }] 1621673746.594714:DEBUG:trust_dns_resolver::name_server::name_server:110:reconnecting: NameServerConfig { socket_addr: 162.14.21.56:443, protocol: Tls, tls_dns_name: Some("doh.pub"), trust_nx_responses: false, tls_config: None } 1621673746.608892:DEBUG:trust_dns_proto::xfer:168:enqueueing message: [Query { name: Name { is_fqdn: true, label_data: [113, 113, 99, 111, 109], label_ends: [2, 5] }, query_type: A, query_class: IN, mdns_unicast_response: false }] 1621673746.609048:DEBUG:trust_dns_proto::xfer::dns_multiplexer:310:sending message id: 45398 1621673746.609110:DEBUG:trust_dns_proto::tcp::tcp_stream:310:sending message len: 24 to: 162.14.21.56:443 1621673746.615797:DEBUG:trust_dns_proto::tcp::tcp_stream:357:in ReadTcpState::LenBytes: 0 1621673746.615866:DEBUG:trust_dns_proto::tcp::tcp_stream:366:got length: 0 1621673746.615897:DEBUG:trust_dns_proto::tcp::tcp_stream:370:move ReadTcpState::Bytes: 0 1621673746.615915:DEBUG:trust_dns_proto::tcp::tcp_stream:381:zero bytes read for message, stream closed? 1621673746.615947:WARN:trust_dns_proto::xfer::dns_multiplexer:199:stream TCP(162.14.21.56:443) error: io error: closed while reading message 1621673746.616002:DEBUG:trust_dns_proto::xfer::dns_exchange:176:io_stream is done, shutting down 1621673746.616179:DEBUG:trust_dns_resolver::name_server::name_server:161:name_server connection failure: proto error: io error: broken pipe 1621673746.616266:ERROR:trust_dns_server::authority::catalog:599:error resolving: Resolution error: proto error: io error: broken pipe 1621673746.616399:INFO:trust_dns_server::server::response_handler:49:response: 59153 response_code: 0 ``` **Expected behavior** A clear and concise description of what you expected to happen. **System:** - OS: macOS,openwrt,deepin - Architecture: [e.g. x86_64] - Version latest - rustc version: 1.52.1 **Version:** Crate: [e.g. client, server, resolver] Version: [e.g. 0.9.1]
kerem closed this issue 2026-03-15 23:48:19 +03:00
Author
Owner

@bluejekyll commented on GitHub (Jun 5, 2021):

Could you please describe your setup in more detail please? I don't quite follow the steps that led to the issue, nor exactly what the issue is. It would be helpful if you could describe how dnsmasq is running in your configuration.

<!-- gh-comment-id:855273843 --> @bluejekyll commented on GitHub (Jun 5, 2021): Could you please describe your setup in more detail please? I don't quite follow the steps that led to the issue, nor exactly what the issue is. It would be helpful if you could describe how dnsmasq is running in your configuration.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#685
No description provided.