频繁提示"ERROR……dns: exchange failed for……context deadline exceeded"及可能的原因
操作系统
Windows
系统版本
Windows 11 以及 Linux Mint 22
安装类型
sing-box 原始命令行程序
如果您使用图形客户端程序,请提供该程序版本。
No response
版本
Sing-box version 1.10.0-beta.11
Sing-box version 1.9.6
Sing-box version 1.9.5
Sing-box version 1.9.4
Sing-box version 1.9.3
描述
Linux Mint 22 与 Windows 11下,sing-box run 运行一段时间之后,就会出现大量的 ERROR……dns: exchange failed for……context deadline exceeded ,也就是无法解析DNS,导致无法正常上网。
我觉得与 config.json 里面的 DNS 种类没有关系,因为阿里DNS/腾讯DNS的DOH、DOT、IP形式的明文DNS、以及运营商的IP明文形式的明文DNS我都试过了,问题依旧;
我觉得与操作系统的关系也不大,因为我几台Windows 11 和 Linux Mint 22都出现该问题;并且,网上也能搜到大量的同类问题,国外的兄弟们也反馈过。
有些网友给出来的原因是 sing-box会对域名发起HTTPS记录解析请求,部分国内网站有HTTPS记录,值可能是简单的0 .,singbox疑似对返回值0.的处理有问题 ;每个字我都认识,只是我没看懂是什么意思。 Ref: https://www.bandwh.com/net/1621.html
重现方式
client config:
{
"log": {
"disabled": false,
"level": "warn",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "tx-dns",
"address": "119.29.29.29",
"detour": "direct-out"
},
{
"tag": "tx-doh",
"address": "https://doh.pub/dns-query",
"address_resolver": "tx-dns",
"address_strategy": "ipv4_only",
"detour": "direct-out"
},
{
"tag": "cf-doh",
"address": "https://cloudflare-dns.com/dns-query",
"address_resolver": "tx-dns",
"address_strategy": "ipv4_only",
"detour": "node-selected",
"client_subnet": "1.0.1.0"
},
{
"tag": "block-dns",
"address": "rcode://refused"
}
],
"rules": [
{
"outbound": "any",
"server": "tx-doh"
},
{
"clash_mode": "direct",
"server": "tx-doh"
},
{
"clash_mode": "global",
"server": "cf-doh"
},
{
"rule_set": [
"geosite-geolocation-cn"
],
"server": "tx-doh"
},
{
"type": "logical",
"mode": "and",
"rules": [
{
"rule_set": "geosite-geolocation-!cn",
"invert": true
},
{
"rule_set": "geoip-cn"
}
],
"server": "cf-doh",
"client_subnet": "114.114.114.114/24"
}
],
"final": "cf-doh",
"strategy": "prefer_ipv4",
"disable_cache": false,
"disable_expire": false,
"independent_cache": false
},
"inbounds": [
{
"type": "tun",
"tag": "tun-in",
"interface_name": "tun_singbox",
"inet4_address": "172.19.0.1/30",
"inet6_address": "fdfe:dcba:9876::1/126",
"mtu": 9000,
"auto_route": true,
"strict_route": false,
"stack": "mixed",
"platform": {
"http_proxy": {
"enabled": true,
"server": "127.0.0.1",
"server_port": 2080
}
},
"sniff": true,
"sniff_override_destination": true
},
{
"type": "mixed",
"tag": "mixed-in",
"listen": "::",
"listen_port": 2080,
"sniff": true,
"sniff_override_destination": true,
"tcp_fast_open": false,
"tcp_multi_path": false,
"udp_fragment": false
}
],
"outbounds": [
{
"type": "direct",
"tag": "direct-out"
},
{
"type": "dns",
"tag": "dns-out"
},
{
"type": "block",
"tag": "block-out"
},
{
"type": "urltest",
"tag": "node-auto",
"outbounds": [
"cf-ws",
"hk-xtls"
],
"url": "https://www.gstatic.com/generate_204",
"interval": "240m",
"idle_timeout": "360m",
"interrupt_exist_connections": true,
"tolerance": 50
},
{
"type": "selector",
"tag": "node-selected",
"outbounds": [
"direct-out",
"node-auto",
"cf-ws",
"hk-xtls"
],
"default": "hk-xtls",
"interrupt_exist_connections": true
},
{
"type": "vless",
"tag": "cf-ws",
//省略
},
{
"type": "vless",
"tag": "hk-xtls",
//省略
}
],
"route": {
"rules": [
{
"type": "logical",
"mode": "or",
"rules": [
{
"protocol": "dns"
},
{
"port": 53
}
],
"outbound": "dns-out"
},
{
"rule_set": [
"geosite-category-ads-all"
],
"outbound": "block-out"
},
{
"ip_is_private": true,
"outbound": "direct-out"
},
{
"domain": [
"www.msftconnecttest.com"
],
"outbound": "direct-out"
},
{
"clash_mode": "block",
"outbound": "block-out"
},
{
"clash_mode": "direct",
"outbound": "direct-out"
},
{
"clash_mode": "global",
"outbound": "node-selected"
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"port": 853
},
{
"network": "udp",
"port": 443
},
{
"protocol": "stun"
}
],
"outbound": "block-out"
},
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn"
],
"outbound": "direct-out"
},
{
"rule_set": [
"geoip-private",
"geosite-private"
],
"outbound": "direct-out"
}
],
"rule_set": [
{
"type": "remote",
"tag": "geoip-private",
"format": "source",
"url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geoip/private.json",
"download_detour": "node-selected",
"update_interval": "2d"
},
{
"type": "remote",
"tag": "geosite-private",
"format": "source",
"url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/private.json",
"download_detour": "node-selected",
"update_interval": "2d"
},
{
"type": "remote",
"tag": "geoip-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "node-selected",
"update_interval": "2d"
},
{
"type": "remote",
"tag": "geosite-geolocation-!cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
"download_detour": "node-selected",
"update_interval": "2d"
},
{
"type": "remote",
"tag": "geosite-geolocation-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
"download_detour": "node-selected",
"update_interval": "2d"
},
{
"type": "remote",
"tag": "geosite-category-ads-all",
"format": "source",
"url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/category-ads-all.json",
"download_detour": "node-selected",
"update_interval": "2d"
}
],
"auto_detect_interface": true,
"final": "node-selected"
},
"experimental": {
"cache_file": {
"enabled": true,
"path": "cache.db",
"store_fakeip": false
},
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "ui",
"external_ui_download_url": "https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip",
"external_ui_download_detour": "node-selected",
"default_mode": "rule"
}
}
}
日志
10月 05 14:47:19 Mint-7840H systemd[1]: Started sing-box.service - sing-box service.
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [673305455 10.0s] dns: exchange failed for cloudflare-dns.com. IN HTTPS: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [3088382154 10.0s] dns: exchange failed for ipv4only.arpa. IN A: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [2076477310 10.0s] dns: exchange failed for example.org. IN A: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [2421618147 10.0s] dns: exchange failed for detectportal.firefox.com. IN A: context canceled
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [1178690243 10.0s] dns: exchange failed for ipv4only.arpa. IN AAAA: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [4146645467 10.0s] dns: exchange failed for detectportal.firefox.com. IN AAAA: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [1852774477 10.0s] dns: exchange failed for example.org. IN AAAA: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [812698675 10.0s] dns: exchange failed for bolt.dropbox.com. IN A: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [480353104 10.0s] dns: exchange failed for bolt.dropbox.com. IN AAAA: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [1099245144 10.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN A: context deadline exceeded
10月 05 14:47:30 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:30 ERROR [3915410692 10.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN AAAA: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [2811811312 10.0s] dns: exchange failed for example.org. IN A: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [3332389397 10.0s] dns: exchange failed for example.org. IN AAAA: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [1816888792 10.0s] dns: exchange failed for ipv4only.arpa. IN AAAA: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [3146627064 10.0s] dns: exchange failed for cloudflare-dns.com. IN HTTPS: context canceled
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [232708585 10.0s] dns: exchange failed for ipv4only.arpa. IN A: context canceled
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [1959622668 10.0s] dns: exchange failed for detectportal.firefox.com. IN A: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [3574962569 10.0s] dns: exchange failed for detectportal.firefox.com. IN AAAA: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [1382343801 10.0s] dns: exchange failed for bolt.dropbox.com. IN AAAA: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [1452661207 10.0s] dns: exchange failed for bolt.dropbox.com. IN A: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [349575085 10.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN A: context deadline exceeded
10月 05 14:47:35 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:35 ERROR [2348384381 10.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN AAAA: context deadline exceeded
10月 05 14:47:39 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:39 ERROR [1169586459 10.0s] dns: exchange failed for 206.34.16.172.in-addr.arpa. IN PTR: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [2085758459 10.0s] dns: exchange failed for example.org. IN A: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [844281962 10.0s] dns: exchange failed for detectportal.firefox.com. IN A: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [2587717944 10.0s] dns: exchange failed for example.org. IN AAAA: context canceled
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [2962360573 10.0s] dns: exchange failed for cloudflare-dns.com. IN HTTPS: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [2422189029 10.0s] dns: exchange failed for detectportal.firefox.com. IN AAAA: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [3644568458 10.0s] dns: exchange failed for ipv4only.arpa. IN AAAA: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [1002700292 10.0s] dns: exchange failed for ipv4only.arpa. IN A: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [2434325524 10.0s] dns: exchange failed for bolt.dropbox.com. IN AAAA: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [3862527528 10.0s] dns: exchange failed for bolt.dropbox.com. IN A: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [4067053684 10.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN AAAA: context deadline exceeded
10月 05 14:47:40 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:40 ERROR [4259902852 10.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN A: context deadline exceeded
10月 05 14:47:41 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:41 ERROR [2229342252 10.0s] dns: exchange failed for profile.accounts.firefox.com. IN AAAA: context deadline exceeded
10月 05 14:47:41 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:41 ERROR [902729599 10.0s] dns: exchange failed for sync-1-us-west1-g.sync.services.mozilla.com. IN A: context deadline exceeded
10月 05 14:47:41 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:41 ERROR [4109814675 10.0s] dns: exchange failed for profile.accounts.firefox.com. IN A: context deadline exceeded
10月 05 14:47:44 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:44 ERROR [1573494852 10.0s] dns: exchange failed for 206.34.16.172.in-addr.arpa. IN PTR: i/o timeout
10月 05 14:47:44 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:44 ERROR [1698129936 10.0s] dns: exchange failed for twitter.com. IN HTTPS: context deadline exceeded
10月 05 14:47:44 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:44 ERROR [1514172252 10.0s] dns: exchange failed for twitter.com. IN AAAA: context deadline exceeded
10月 05 14:47:44 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:44 ERROR [403855192 10.0s] dns: exchange failed for twitter.com. IN A: context deadline exceeded
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [128546976 10.0s] dns: exchange failed for cloudflare-dns.com. IN HTTPS: context canceled
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [335442301 10.0s] dns: exchange failed for ipv4only.arpa. IN A: context canceled
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [436291747 10.0s] dns: exchange failed for example.org. IN A: context canceled
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [2463774190 10.0s] dns: exchange failed for detectportal.firefox.com. IN A: context canceled
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [2189686132 10.0s] dns: exchange failed for detectportal.firefox.com. IN AAAA: context canceled
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [12072880 10.0s] dns: exchange failed for ipv4only.arpa. IN AAAA: context canceled
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [1130943084 10.0s] dns: exchange failed for example.org. IN AAAA: context canceled
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [3119878413 10.0s] dns: exchange failed for bolt.dropbox.com. IN A: context deadline exceeded
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [4037452018 10.0s] dns: exchange failed for bolt.dropbox.com. IN AAAA: context deadline exceeded
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [1481989052 10.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN AAAA: context deadline exceeded
10月 05 14:47:45 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:45 ERROR [3479958703 10.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN A: context deadline exceeded
10月 05 14:47:46 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:46 ERROR [4223115785 10.0s] dns: exchange failed for profile.accounts.firefox.com. IN A: context canceled
10月 05 14:47:46 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:46 ERROR [3027414813 10.0s] dns: exchange failed for profile.accounts.firefox.com. IN AAAA: context deadline exceeded
10月 05 14:47:46 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:46 ERROR [3737859661 10.0s] dns: exchange failed for sync-1-us-west1-g.sync.services.mozilla.com. IN A: context deadline exceeded
10月 05 14:47:49 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:49 ERROR [2521261479 10.0s] dns: exchange failed for 1.0.19.172.in-addr.arpa. IN PTR: i/o timeout
10月 05 14:47:49 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:49 ERROR [3264092672 10.0s] dns: exchange failed for 206.34.16.172.in-addr.arpa. IN PTR: i/o timeout
10月 05 14:47:49 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:49 ERROR [1665836316 10.0s] dns: exchange failed for twitter.com. IN HTTPS: context deadline exceeded
10月 05 14:47:49 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:49 ERROR [1844740284 10.0s] dns: exchange failed for twitter.com. IN A: context deadline exceeded
10月 05 14:47:49 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:49 ERROR [2084586048 10.0s] dns: exchange failed for twitter.com. IN AAAA: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for example.org. IN AAAA: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for detectportal.firefox.com. IN A: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for ipv4only.arpa. IN AAAA: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for bolt.dropbox.com. IN AAAA: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for example.org. IN A: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for ipv4only.arpa. IN A: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for cloudflare-dns.com. IN HTTPS: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for bolt.dropbox.com. IN A: context deadline exceeded
10月 05 14:47:50 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:50 ERROR [3814707184 10.1s] dns: exchange failed for detectportal.firefox.com. IN AAAA: context deadline exceeded
10月 05 14:47:51 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:51 ERROR [3814707184 10.75s] dns: exchange failed for connectivity-check.ubuntu.com. IN A: context deadline exceeded
10月 05 14:47:51 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:51 ERROR [3814707184 10.75s] dns: exchange failed for connectivity-check.ubuntu.com. IN AAAA: context deadline exceeded
10月 05 14:47:51 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:51 ERROR [3814707184 10.99s] dns: exchange failed for sync-1-us-west1-g.sync.services.mozilla.com. IN A: context deadline exceeded
10月 05 14:47:51 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:51 ERROR [3814707184 10.99s] dns: exchange failed for profile.accounts.firefox.com. IN A: context deadline exceeded
10月 05 14:47:51 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:51 ERROR [3814707184 10.99s] dns: exchange failed for profile.accounts.firefox.com. IN AAAA: context deadline exceeded
10月 05 14:47:54 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:54 ERROR [3814707184 13.85s] dns: exchange failed for 206.34.16.172.in-addr.arpa. IN PTR: context deadline exceeded
10月 05 14:47:54 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:54 ERROR [3814707184 13.85s] dns: exchange failed for 1.0.19.172.in-addr.arpa. IN PTR: context deadline exceeded
10月 05 14:47:54 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:54 ERROR [3814707184 14.15s] dns: exchange failed for twitter.com. IN A: context deadline exceeded
10月 05 14:47:54 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:54 ERROR [3814707184 14.15s] dns: exchange failed for twitter.com. IN HTTPS: context deadline exceeded
10月 05 14:47:54 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:54 ERROR [3814707184 14.15s] dns: exchange failed for twitter.com. IN AAAA: context deadline exceeded
10月 05 14:47:55 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:55 ERROR [3814707184 15.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN A: context deadline exceeded
10月 05 14:47:55 Mint-7840H sing-box[13092]: +0800 2024-10-05 14:47:55 ERROR [3814707184 15.0s] dns: exchange failed for connectivity-check.ubuntu.com. IN AAAA: context deadline exceeded
### 支持我们
- [ ] 我已经 [赞助](https://github.com/sponsors/nekohasekai/)
### 完整性要求
- [X] 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
- [X] 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
- [X] 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
- [X] 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。
最近发现,在 Linux Mint 22更容易遇到该问题,通常是开机不久就出现了;Windows 11 需要开机一段时间才发现。
最近发现,在 Linux Mint 22更容易遇到该问题,通常是开机不久就出现了;Windows 11 需要开机一段时间才发现。
updated on 2024-11-03:
最近发现, 远程DNS server 的 strategy 从 prefer_ipv4 改为 ipv4_only 能降低该错误的几率(或者说,能延后发生该错误,例如以前使用两三个小时就有该错误的,现在可能七八个小时后才有);另外, Linux Mint 22 下依然比 Windows 11容易发生该错误。
附上目前使用的 dns
{
"log": {
"disabled": false,
"level": "warn",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "ali-dns",
"address": "223.5.5.5",
"detour": "direct-out"
},
{
"tag": "ali-doh",
"address": "https://dns.alidns.com/dns-query",
"address_resolver": "ali-dns",
"address_strategy": "ipv4_only",
"strategy": "prefer_ipv4",
"detour": "direct-out"
},
{
"tag": "cf-doh",
"address": "https://cloudflare-dns.com/dns-query",
"address_resolver": "ali-dns",
"address_strategy": "ipv4_only",
"strategy": "ipv4_only",
"detour": "node-selected",
"client_subnet": "1.0.1.0"
},
{
"tag": "block-dns",
"address": "rcode://refused"
}
],
"rules": [
{
"outbound": "any",
"server": "ali-doh"
},
{
"clash_mode": "direct",
"server": "ali-doh"
},
{
"clash_mode": "global",
"server": "cf-doh"
},
{
"process_name": [
"kubectl",
"HDCX",
"NemoDesktop",
"softwareupdated",
"TencentMeeting",
"Tailscale",
"ToDesk",
"ToDesk_Service",
"Tunnelblick",
"WeChat",
"WeChatAppEx",
"wireguard-go",
"WXWork",
"WXWorkWeb",
"WxDrive",
"xray",
"Xshell"
],
"server": "ali-doh"
},
{
"domain": [
"www.msftconnecttest.com"
],
"server": "ali-doh"
},
{
"domain_suffix": [
".lan",
"gov.cn",
"msftconnecttest.com",
"msftncsi.com"
],
"server": "ali-doh"
},
{
"rule_set": [
"geosite-cn",
"geosite-geolocation-cn"
],
"server": "ali-doh"
},
{
"type": "logical",
"mode": "and",
"rules": [
{
"rule_set": "geosite-geolocation-!cn",
"invert": true
},
{
"rule_set": "geoip-cn"
}
],
"server": "cf-doh",
"client_subnet": "114.114.114.114/24"
}
],
"final": "cf-doh",
"strategy": "ipv4_only",
"disable_cache": false,
"disable_expire": false,
"independent_cache": false
},
//省略
}
我也遇到类似的问题,+0000 2024-11-19 05:44:17 ERROR [2990184607 10.0s] dns: exchange failed for edge.microsoft.com. IN A: context deadline exceeded
为啥直接关闭这个issue了?
我也遇到类似的问题,+0000 2024-11-19 05:44:17 ERROR [2990184607 10.0s] dns: exchange failed for edge.microsoft.com. IN A: context deadline exceeded
为啥直接关闭这个issue了?
我发现 远程DNS server 的 'strategy' 设为 ipv4_only 、以及只使用常规的IP 不启用DOH/DOT,发生该问题的频率或次数会减少。你试一下看看。期待你的反馈。