Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FAQ] forward 报错 context deadline exceeded #98

Open
IrineSistiana opened this issue Mar 17, 2021 · 40 comments
Open

[FAQ] forward 报错 context deadline exceeded #98

IrineSistiana opened this issue Mar 17, 2021 · 40 comments
Labels

Comments

@IrineSistiana
Copy link
Owner

IrineSistiana commented Mar 17, 2021

forward 报 context deadline exceeded 是因为 某个请求发出去了,但过了很长时间(大约5秒)也没收到上游的任何应答。

收不到应答的主要原因:

网络波动 (丢包/长连接被切断等)。

出现零星的警告是正常现象,网络波动不可避免,但日常使用不会有任何感觉,因为客户端/系统都有重试/容错机制。如果希望眼不见心不烦可以将 log level 设为 error。大量警告/日常使用有感觉,说明网络太差,建议使用更可靠的上游。

次要原因:

如果报错都是相同请求类型,可能是上游问题,不能正确处理这类请求。

如果报错都是相同域名,可能是这个域名的托管服务器有问题。

如果确信是 mosdns 的 bug 请开新 issue。

@PussAzuki
Copy link

如果单纯是阿里的DNS时常这样何解?我这里(包括其他DNS相关软件)测试有且仅有阿里的DNS会这样。

@IrineSistiana IrineSistiana pinned this issue Jan 21, 2022
@IrineSistiana IrineSistiana changed the title [FAQ] warning: context deadline exceeded [FAQ] 报错 context deadline exceeded Feb 21, 2022
@mahakalaya
Copy link

我的日志info级别是经常出现
2022-02-22T13:15:25.457+0800 warn forward_local upstream/upstream.go:280 truncated udp msg received, retrying tcp
是不是要改成tcp协议

@IrineSistiana
Copy link
Owner Author

我的日志info级别是经常出现 2022-02-22T13:15:25.457+0800 warn forward_local upstream/upstream.go:280 truncated udp msg received, retrying tcp 是不是要改成tcp协议

如果很多,是要换 tcp。

@sjtuross
Copy link

sjtuross commented Mar 19, 2022

用的fast_forward,大量warn都是PTR查询

2022-03-19T17:39:11.665+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "38.149.229.120.in-addr.arpa. IN PTR 29624 96 127.0.0.1", "from": "https://223.6.6.6/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:39:11.670+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "38.149.229.120.in-addr.arpa. IN PTR 29624 96 127.0.0.1", "from": "https://223.5.5.5/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:39:13.659+0800	warn	main_server	dns_handler/server_handler.go:124	entry returned an err	{"query": "38.149.229.120.in-addr.arpa. IN PTR 29624 96 127.0.0.1", "error": "lazy_cache: main_sequence: ecs_china: _pad_query: forward_china: context deadline exceeded"}
2022-03-19T17:40:34.167+0800	warn	main_server	dns_handler/server_handler.go:124	entry returned an err	{"query": "33.146.79.214.in-addr.arpa. IN PTR 15911 542 127.0.0.1", "error": "lazy_cache: main_sequence: ecs_china: _pad_query: forward_china: context deadline exceeded"}
2022-03-19T17:40:39.612+0800	warn	main_server	dns_handler/server_handler.go:124	entry returned an err	{"query": "132.215.139.117.in-addr.arpa. IN PTR 34068 600 127.0.0.1", "error": "lazy_cache: main_sequence: ecs_china: _pad_query: forward_china: context deadline exceeded"}
2022-03-19T17:41:10.566+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "162.131.194.221.in-addr.arpa. IN PTR 30680 772 127.0.0.1", "from": "https://223.5.5.5/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:41:11.923+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "162.131.194.221.in-addr.arpa. IN PTR 30680 772 127.0.0.1", "from": "https://doh.pub/dns-query", "error": "bad http status codes 503 with body [\u0000\u0000\ufffd\ufffd\u0000\u0001\u0000\u0000\u0000\u0000\u0000\u0001\u0003162\u0003131\u0003194\u0003221\u0007in-addr\u0004arpa\u0000\u0000\u000c\u0000\u0001\u0000\u0000)\u0010\u0000\u0000\u0000\u0000\u0000\u0000\u0000]"}
2022-03-19T17:41:28.331+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "82.21.235.120.in-addr.arpa. IN PTR 41041 852 127.0.0.1", "from": "https://223.6.6.6/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:41:28.333+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "82.21.235.120.in-addr.arpa. IN PTR 41041 852 127.0.0.1", "from": "https://223.5.5.5/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:41:30.326+0800	warn	main_server	dns_handler/server_handler.go:124	entry returned an err	{"query": "82.21.235.120.in-addr.arpa. IN PTR 41041 852 127.0.0.1", "error": "lazy_cache: main_sequence: ecs_china: _pad_query: forward_china: context deadline exceeded"}
2022-03-19T17:41:42.304+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "99.63.245.182.in-addr.arpa. IN PTR 27651 907 127.0.0.1", "from": "https://223.6.6.6/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:41:42.306+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "99.63.245.182.in-addr.arpa. IN PTR 27651 907 127.0.0.1", "from": "https://223.5.5.5/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:41:44.299+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "99.63.245.182.in-addr.arpa. IN PTR 27651 907 127.0.0.1", "from": "https://doh.pub/dns-query", "error": "http request failed: Get \"https://doh.pub/dns-query?dns=AAABAAABAAAAAAABAjk5AjYzAzI0NQMxODIHaW4tYWRkcgRhcnBhAAAMAAEAACkCAAAAAAAASQAMAEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\": context deadline exceeded"}
2022-03-19T17:41:44.299+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "99.63.245.182.in-addr.arpa. IN PTR 27651 907 127.0.0.1", "from": "tls://dot.pub", "error": "context deadline exceeded"}
2022-03-19T17:41:44.299+0800	warn	main_server	dns_handler/server_handler.go:124	entry returned an err	{"query": "99.63.245.182.in-addr.arpa. IN PTR 27651 907 127.0.0.1", "error": "lazy_cache: main_sequence: ecs_china: _pad_query: forward_china: no response"}
2022-03-19T17:41:45.357+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "229.129.63.218.in-addr.arpa. IN PTR 49768 937 127.0.0.1", "from": "https://223.6.6.6/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:41:45.357+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "229.129.63.218.in-addr.arpa. IN PTR 49768 937 127.0.0.1", "from": "https://223.5.5.5/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:41:47.351+0800	warn	main_server	dns_handler/server_handler.go:124	entry returned an err	{"query": "229.129.63.218.in-addr.arpa. IN PTR 49768 937 127.0.0.1", "error": "lazy_cache: main_sequence: ecs_china: _pad_query: forward_china: context deadline exceeded"}
2022-03-19T17:41:48.047+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "201.24.79.223.in-addr.arpa. IN PTR 6799 963 127.0.0.1", "from": "https://223.6.6.6/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T17:41:48.048+0800	warn	forward_china	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "201.24.79.223.in-addr.arpa. IN PTR 6799 963 127.0.0.1", "from": "https://223.5.5.5/dns-query", "error": "bad http status codes 500 with body [No response\n]"}
2022-03-19T20:05:35.636+0800	warn	forward_oversea	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "151.5.217.27.in-addr.arpa. IN PTR 28280 103 127.0.0.1", "from": "https://cloudflare-dns.com/dns-query", "error": "http request failed: Get \"https://cloudflare-dns.com/dns-query?dns=AAABAAABAAAAAAABAzE1MQE1AzIxNwIyNwdpbi1hZGRyBGFycGEAAAwAAQAAKQIAAAAAAABKAAwARgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\": read tcp 116.232.69.15:33190->104.16.249.249:443: read: connection reset by peer"}
2022-03-19T20:05:35.833+0800	warn	forward_oversea	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "gateway.fe.apple-dns.net. IN AAAA 63480 105 127.0.0.1", "from": "https://cloudflare-dns.com/dns-query", "error": "http request failed: Get \"https://cloudflare-dns.com/dns-query?dns=AAABIAABAAAAAAABB2dhdGV3YXkCZmUJYXBwbGUtZG5zA25ldAAAHAABAAApAgAAAAAAAEsACAAHAAEYADS4FwAMADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\": read tcp 116.232.69.15:33202->104.16.249.249:443: read: connection reset by peer"}
2022-03-19T20:05:35.975+0800	warn	forward_oversea	bundled_upstream/bundled_upstream.go:91	upstream failed	{"query": "gateway.fe.apple-dns.net. IN A 63480 105 127.0.0.1", "from": "https://cloudflare-dns.com/dns-query", "error": "http request failed: Get \"https://cloudflare-dns.com/dns-query?dns=AAABIAABAAAAAAABB2dhdGV3YXkCZmUJYXBwbGUtZG5zA25ldAAAAQABAAApAgAAAAAAAEsACAAHAAEYADS4FwAMADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\": read tcp 116.232.69.15:33208->104.16.249.249:443: read: connection reset by peer"}
2022-03-19T20:05:39.989+0800	warn	main_server	dns_handler/server_handler.go:124	entry returned an err	{"query": "151.5.217.27.in-addr.arpa. IN PTR 28280 103 127.0.0.1", "error": "lazy_cache: main_sequence: ecs_china: _pad_query: forward_china: context deadline exceeded"}
2022-03-19T20:05:43.266+0800	warn	main_server	dns_handler/server_handler.go:124	entry returned an err	{"query": "158.92.245.120.in-addr.arpa. IN PTR 64361 122 127.0.0.1", "error": "lazy_cache: main_sequence: ecs_china: _pad_query: forward_china: context deadline exceeded"}

@jinwyp
Copy link

jinwyp commented May 24, 2022

这个大量的 context deadline exceeded 正常吗?
"error": "main_sequence: mem_cache: forward_local: context deadline exceeded" 是什么意思? 是 forward_local fast_forward请求国内的DNS 超时了吗?

`
2022-05-24T20:39:46.670+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "avatar.tses.net. IN HTTPS 32151 16821 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:46.672+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "avatar.tses.net. IN HTTPS 32151 16822 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:46.675+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "avatar.tses.net. IN HTTPS 32151 16823 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:46.783+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "avatar.tses.net. IN HTTPS 9633 16824 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:48.759+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "upoll.umengcloud.com. IN A 31198 16861 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:48.896+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "m.jingxi.com. IN A 15278 16863 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:49.968+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "me.xdrig.com. IN A 60462 16864 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:49.970+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "me.xdrig.com. IN A 60462 16865 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:49.973+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "me.xdrig.com. IN A 60462 16866 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:49.976+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "me.xdrig.com. IN A 60462 16867 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:50.378+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "szlong.weixin.qq.com. IN A 23976 16917 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:53.429+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "gsp85-cn-ssl.ls.apple.com. IN A 27538 16923 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:53.772+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "upoll.umengcloud.com. IN A 37506 16925 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-05-24T20:39:54.010+0800 warn main_server dns_handler/server_handler.go:117 entry returned an err {"query": "m.jingxi.com. IN A 24498 16926 192.168.1.5", "error": "main_sequence: mem_cache: forward_local: context deadline exceeded"}

`

@xwcoco
Copy link

xwcoco commented May 30, 2022

还发现一个问题,经常出现context deadline exceeded之后,所有域名都解析成10.0.0.1,造成上不了网,以前的版本没有这个问题,查看日志也没有什么有用的信息,重启服务后正常。

@liang-hiwin
Copy link

我也是有一堆

2022-07-03T00:22:52.721+0800	warn	bundled_upstream/bundled_upstream.go:93	upstream failed	{"query": "qtstm32fan.ru. IN AAAA 38375 37503 127.0.0.1", "from": "tcp://127.0.0.1:5353", "error": "read tcp 127.0.0.1:42138->127.0.0.1:5353: i/o timeout"}
2022-07-03T00:22:52.721+0800	warn	bundled_upstream/bundled_upstream.go:93	upstream failed	{"query": "qtstm32fan.ru. IN AAAA 38375 37503 127.0.0.1", "from": "tcp://127.0.0.1:5353", "error": "read tcp 127.0.0.1:54788->127.0.0.1:5353: i/o timeout"}
2022-07-03T00:22:52.721+0800	warn	bundled_upstream/bundled_upstream.go:93	upstream failed	{"query": "qtstm32fan.ru. IN AAAA 38375 37503 127.0.0.1", "from": "tcp://127.0.0.1:5353", "error": "context deadline exceeded"}

@blog2i2j
Copy link

我也是, 而且都是这个域名出现问题

bundled_upstream/bundled_upstream.go:93
upstream failed {"query": "_autodiscover._tcp.sme.sh.cn. IN SRV 24054 119979 127.0.0.1", "from": "119.29.29.29", "error": "context deadline exceeded"}
2022-07-11T13:50:37.206+0800 warn dns_handler/server_handler.go:86
entry returned an err {"query": "autodiscover.sme.sh.cn. IN A 31354 127279 127.0.0.1", "error": "context deadline exceeded"}

2022-07-11T13:50:36.999+0800 debug transport/transport.go:213 retrying pipeline connection {"previous_err": "read udp 172.31.74.103:50958->119.29.29.29:53: i/o timeout", "attempt": 1}

@blog2i2j
Copy link

2022-07-11T14:04:18.338+0800 debug executable_seq/if_node.go:164 matcher result {"query": "autodiscover.sme.sh.cn. IN A 60335 2 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:18.338+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "autodiscover.sme.sh.cn. IN A 60335 2 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:18.340+0800 debug cache/cache.go:156 skipped {"query": "autodiscover.sme.sh.cn. IN A 60335 2 127.0.0.1"}
2022-07-11T14:04:18.340+0800 debug executable_seq/if_node.go:164 matcher result {"query": "autodiscover.sme.sh.cn. IN A 60335 2 127.0.0.1", "tag": "query_is_local_domain", "result": true}
2022-07-11T14:04:18.340+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "autodiscover.sme.sh.cn. IN A 60335 2 127.0.0.1", "expr": "query_is_local_domain", "result": true}
2022-07-11T14:04:20.066+0800 debug bundled_upstream/bundled_upstream.go:98
response accepted {"query": "autodiscover.sme.sh.cn. IN A 60335 2 127.0.0.1", "from": "119.29.29.29"}
2022-07-11T14:04:20.066+0800 debug dns_handler/server_handler.go:88
entry returned {"query": "autodiscover.sme.sh.cn. IN A 60335 2 127.0.0.1", "status": "responded"}
2022-07-11T14:04:25.782+0800 debug executable_seq/if_node.go:164 matcher result {"query": "autodiscover.sme.sh.cn. IN A 24960 3 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:25.783+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "autodiscover.sme.sh.cn. IN A 24960 3 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:25.783+0800 debug cache/cache.go:236 cache miss
{"query": "autodiscover.sme.sh.cn. IN A 24960 3 127.0.0.1"}
2022-07-11T14:04:25.784+0800 debug executable_seq/if_node.go:164 matcher result {"query": "autodiscover.sme.sh.cn. IN A 24960 3 127.0.0.1", "tag": "query_is_local_domain", "result": true}
2022-07-11T14:04:25.784+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "autodiscover.sme.sh.cn. IN A 24960 3 127.0.0.1", "expr": "query_is_local_domain", "result": true}
2022-07-11T14:04:26.529+0800 debug bundled_upstream/bundled_upstream.go:98
response accepted {"query": "autodiscover.sme.sh.cn. IN A 24960 3 127.0.0.1", "from": "119.29.29.29"}
2022-07-11T14:04:26.529+0800 debug dns_handler/server_handler.go:88
entry returned {"query": "autodiscover.sme.sh.cn. IN A 24960 3 127.0.0.1", "status": "responded"}
2022-07-11T14:04:26.544+0800 debug executable_seq/if_node.go:164 matcher result {"query": "sme.sh.cn. IN A 57647 4 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:26.544+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "sme.sh.cn. IN A 57647 4 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:26.544+0800 debug cache/cache.go:236 cache miss
{"query": "sme.sh.cn. IN A 57647 4 127.0.0.1"}
2022-07-11T14:04:26.544+0800 debug executable_seq/if_node.go:164 matcher result {"query": "sme.sh.cn. IN A 57647 4 127.0.0.1", "tag": "query_is_local_domain", "result": true}
2022-07-11T14:04:26.545+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "sme.sh.cn. IN A 57647 4 127.0.0.1", "expr": "query_is_local_domain", "result": true}
2022-07-11T14:04:27.544+0800 debug executable_seq/if_node.go:164 matcher result {"query": "sme.sh.cn. IN A 57647 5 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:27.544+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "sme.sh.cn. IN A 57647 5 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:27.545+0800 debug cache/cache.go:236 cache miss
{"query": "sme.sh.cn. IN A 57647 5 127.0.0.1"}
2022-07-11T14:04:27.545+0800 debug executable_seq/if_node.go:164 matcher result {"query": "sme.sh.cn. IN A 57647 5 127.0.0.1", "tag": "query_is_local_domain", "result": true}
2022-07-11T14:04:27.545+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "sme.sh.cn. IN A 57647 5 127.0.0.1", "expr": "query_is_local_domain", "result": true}
2022-07-11T14:04:28.544+0800 debug executable_seq/if_node.go:164 matcher result {"query": "sme.sh.cn. IN A 57647 6 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:28.544+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "sme.sh.cn. IN A 57647 6 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:28.546+0800 debug cache/cache.go:236 cache miss
{"query": "sme.sh.cn. IN A 57647 6 127.0.0.1"}
2022-07-11T14:04:28.546+0800 debug executable_seq/if_node.go:164 matcher result {"query": "sme.sh.cn. IN A 57647 6 127.0.0.1", "tag": "query_is_local_domain", "result": true}
2022-07-11T14:04:28.546+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "sme.sh.cn. IN A 57647 6 127.0.0.1", "expr": "query_is_local_domain", "result": true}
2022-07-11T14:04:28.833+0800 debug bundled_upstream/bundled_upstream.go:98
response accepted {"query": "sme.sh.cn. IN A 57647 6 127.0.0.1", "from": "https://1.12.12.12/dns-query"}
2022-07-11T14:04:28.833+0800 debug bundled_upstream/bundled_upstream.go:98
response accepted {"query": "sme.sh.cn. IN A 57647 5 127.0.0.1", "from": "https://1.12.12.12/dns-query"}
2022-07-11T14:04:28.833+0800 debug bundled_upstream/bundled_upstream.go:98
response accepted {"query": "sme.sh.cn. IN A 57647 4 127.0.0.1", "from": "https://1.12.12.12/dns-query"}
2022-07-11T14:04:28.833+0800 debug dns_handler/server_handler.go:88
entry returned {"query": "sme.sh.cn. IN A 57647 6 127.0.0.1", "status": "responded"}
2022-07-11T14:04:28.833+0800 debug dns_handler/server_handler.go:88
entry returned {"query": "sme.sh.cn. IN A 57647 5 127.0.0.1", "status": "responded"}
2022-07-11T14:04:28.834+0800 debug dns_handler/server_handler.go:88
entry returned {"query": "sme.sh.cn. IN A 57647 4 127.0.0.1", "status": "responded"}
2022-07-11T14:04:28.834+0800 debug transport/transport.go:213 retrying pipeline connection {"previous_err": "context canceled", "attempt": 1}
2022-07-11T14:04:28.835+0800 debug transport/transport.go:213 retrying pipeline connection {"previous_err": "context canceled", "attempt": 1}
2022-07-11T14:04:28.904+0800 debug executable_seq/if_node.go:164 matcher result {"query": "autodiscover.sme.sh.cn. IN A 12472 7 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:28.904+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "autodiscover.sme.sh.cn. IN A 12472 7 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:28.905+0800 debug cache/cache.go:236 cache miss
{"query": "autodiscover.sme.sh.cn. IN A 12472 7 127.0.0.1"}
2022-07-11T14:04:28.905+0800 debug executable_seq/if_node.go:164 matcher result {"query": "autodiscover.sme.sh.cn. IN A 12472 7 127.0.0.1", "tag": "query_is_local_domain", "result": true}
2022-07-11T14:04:28.905+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "autodiscover.sme.sh.cn. IN A 12472 7 127.0.0.1", "expr": "query_is_local_domain", "result": true}
2022-07-11T14:04:28.930+0800 debug bundled_upstream/bundled_upstream.go:98
response accepted {"query": "autodiscover.sme.sh.cn. IN A 12472 7 127.0.0.1", "from": "119.29.29.29"}
2022-07-11T14:04:28.931+0800 debug dns_handler/server_handler.go:88
entry returned {"query": "autodiscover.sme.sh.cn. IN A 12472 7 127.0.0.1", "status": "responded"}
2022-07-11T14:04:28.946+0800 debug executable_seq/if_node.go:164 matcher result {"query": "autodiscover.sme.sh.cn. IN A 57928 8 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:28.946+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "autodiscover.sme.sh.cn. IN A 57928 8 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:28.946+0800 debug cache/cache.go:236 cache miss
{"query": "autodiscover.sme.sh.cn. IN A 57928 8 127.0.0.1"}
2022-07-11T14:04:28.946+0800 debug executable_seq/if_node.go:164 matcher result {"query": "autodiscover.sme.sh.cn. IN A 57928 8 127.0.0.1", "tag": "query_is_local_domain", "result": true}
2022-07-11T14:04:28.946+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "autodiscover.sme.sh.cn. IN A 57928 8 127.0.0.1", "expr": "query_is_local_domain", "result": true}
2022-07-11T14:04:28.996+0800 debug bundled_upstream/bundled_upstream.go:98
response accepted {"query": "autodiscover.sme.sh.cn. IN A 57928 8 127.0.0.1", "from": "119.29.29.29"}
2022-07-11T14:04:28.997+0800 debug dns_handler/server_handler.go:88
entry returned {"query": "autodiscover.sme.sh.cn. IN A 57928 8 127.0.0.1", "status": "responded"}
2022-07-11T14:04:29.001+0800 debug executable_seq/if_node.go:164 matcher result {"query": "_autodiscover._tcp.sme.sh.cn. IN SRV 51700 9 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:29.001+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "_autodiscover._tcp.sme.sh.cn. IN SRV 51700 9 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:29.001+0800 debug cache/cache.go:236 cache miss
{"query": "_autodiscover._tcp.sme.sh.cn. IN SRV 51700 9 127.0.0.1"}
2022-07-11T14:04:29.001+0800 debug executable_seq/if_node.go:164 matcher result {"query": "_autodiscover._tcp.sme.sh.cn. IN SRV 51700 9 127.0.0.1", "tag": "query_is_local_domain", "result": true}
2022-07-11T14:04:29.001+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "_autodiscover._tcp.sme.sh.cn. IN SRV 51700 9 127.0.0.1", "expr": "query_is_local_domain", "result": true}
2022-07-11T14:04:29.058+0800 debug bundled_upstream/bundled_upstream.go:98
response accepted {"query": "_autodiscover._tcp.sme.sh.cn. IN SRV 51700 9 127.0.0.1", "from": "119.29.29.29"}
2022-07-11T14:04:29.058+0800 debug dns_handler/server_handler.go:88
entry returned {"query": "_autodiscover._tcp.sme.sh.cn. IN SRV 51700 9 127.0.0.1", "status": "responded"}
2022-07-11T14:04:31.488+0800 debug executable_seq/if_node.go:164 matcher result {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:31.488+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:31.489+0800 debug cache/cache.go:236 cache miss {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1"}
2022-07-11T14:04:31.489+0800 debug executable_seq/if_node.go:164 matcher result {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1", "tag": "query_is_local_domain", "result": false}
2022-07-11T14:04:31.489+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1", "expr": "query_is_local_domain", "result": false}
2022-07-11T14:04:31.489+0800 debug executable_seq/if_node.go:164 matcher result {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1", "tag": "query_is_non_local_domain", "result": true}
2022-07-11T14:04:31.489+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1", "expr": "query_is_non_local_domain", "result": true}
2022-07-11T14:04:31.908+0800 debug bundled_upstream/bundled_upstream.go:98 response accepted {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1", "from": "208.67.220.220:5353"}
2022-07-11T14:04:31.908+0800 debug dns_handler/server_handler.go:88 entry returned {"query": "d27xxe7juh1us6.cloudfront.net. IN A 29410 10 127.0.0.1", "status": "responded"}
2022-07-11T14:04:35.517+0800 debug executable_seq/if_node.go:164 matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:35.518+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:35.521+0800 debug cache/cache.go:236 cache miss {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1"}
2022-07-11T14:04:35.523+0800 debug executable_seq/if_node.go:164 matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "tag": "query_is_local_domain", "result": false}
2022-07-11T14:04:35.524+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "expr": "query_is_local_domain", "result": false}
2022-07-11T14:04:35.525+0800 debug executable_seq/if_node.go:164 matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "tag": "query_is_non_local_domain", "result": false}
2022-07-11T14:04:35.525+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "expr": "query_is_non_local_domain", "result": false}
2022-07-11T14:04:35.594+0800 debug bundled_upstream/bundled_upstream.go:98 response accepted {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "from": "119.29.29.29"}
2022-07-11T14:04:35.594+0800 debug executable_seq/if_node.go:164 matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "tag": "response_has_local_ip", "result": false}
2022-07-11T14:04:35.596+0800 debug executable_seq/if_node.go:164 matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "tag": "_response_valid_answer", "result": true}
2022-07-11T14:04:35.598+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "expr": "(! response_has_local_ip) && [_response_valid_answer]", "result": true}
2022-07-11T14:04:35.599+0800 debug executable_seq/utils.go:47 sequence returned with an empty response {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "sequence": 1}
2022-07-11T14:04:35.866+0800 debug bundled_upstream/bundled_upstream.go:98 response accepted {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "from": "https://9.9.9.9/dns-query"}
2022-07-11T14:04:35.866+0800 debug transport/transport.go:213 retrying pipeline connection {"previous_err": "context canceled", "attempt": 1}
2022-07-11T14:04:35.866+0800 debug executable_seq/utils.go:42 sequence returned a response {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "sequence": 2}
2022-07-11T14:04:35.870+0800 debug dns_handler/server_handler.go:88 entry returned {"query": "femetrics.grammarly.io. IN A 3405 11 127.0.0.1", "status": "responded"}
2022-07-11T14:04:47.933+0800 debug executable_seq/if_node.go:164 matcher result {"query": "dns.google. IN A 62271 12 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:47.933+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "dns.google. IN A 62271 12 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:47.939+0800 debug cache/cache.go:236 cache miss {"query": "dns.google. IN A 62271 12 127.0.0.1"}
2022-07-11T14:04:47.939+0800 debug executable_seq/if_node.go:164 matcher result {"query": "dns.google. IN A 62271 12 127.0.0.1", "tag": "query_is_local_domain", "result": false}
2022-07-11T14:04:47.940+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "dns.google. IN A 62271 12 127.0.0.1", "expr": "query_is_local_domain", "result": false}
2022-07-11T14:04:47.941+0800 debug executable_seq/if_node.go:164 matcher result {"query": "dns.google. IN A 62271 12 127.0.0.1", "tag": "query_is_non_local_domain", "result": true}
2022-07-11T14:04:47.942+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "dns.google. IN A 62271 12 127.0.0.1", "expr": "query_is_non_local_domain", "result": true}
2022-07-11T14:04:48.933+0800 debug executable_seq/if_node.go:164 matcher result {"query": "dns.google. IN A 62271 13 127.0.0.1", "tag": "query_is_ad_domain", "result": false}
2022-07-11T14:04:48.933+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "dns.google. IN A 62271 13 127.0.0.1", "expr": "query_is_ad_domain", "result": false}
2022-07-11T14:04:48.934+0800 debug cache/cache.go:236 cache miss {"query": "dns.google. IN A 62271 13 127.0.0.1"}
2022-07-11T14:04:48.937+0800 debug executable_seq/if_node.go:164 matcher result {"query": "dns.google. IN A 62271 13 127.0.0.1", "tag": "query_is_local_domain", "result": false}
2022-07-11T14:04:48.938+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "dns.google. IN A 62271 13 127.0.0.1", "expr": "query_is_local_domain", "result": false}
2022-07-11T14:04:48.938+0800 debug executable_seq/if_node.go:164 matcher result {"query": "dns.google. IN A 62271 13 127.0.0.1", "tag": "query_is_non_local_domain", "result": true}
2022-07-11T14:04:48.939+0800 debug executable_seq/if_node.go:173 condition matcher result {"query": "dns.google. IN A 62271 13 127.0.0.1", "expr": "query_is_non_local_domain", "result": true}
2022-07-11T14:04:49.350+0800 debug bundled_upstream/bundled_upstream.go:98 response accepted {"query": "dns.google. IN A 62271 12 127.0.0.1", "from": "208.67.220.220:5353"}
2022-07-11T14:04:49.351+0800 debug dns_handler/server_handler.go:88 entry returned {"query": "dns.google. IN A 62271 12 127.0.0.1", "status": "responded"}
2022-07-11T14:04:49.493+0800 debug bundled_upstream/bundled_upstream.go:98 response accepted {"query": "dns.google. IN A 62271 13 127.0.0.1", "from": "https://9.9.9.9/dns-query"}
2022-07-11T14:04:49.493+0800 debug dns_handler/server_handler.go:88 entry returned {"query": "dns.google. IN A 62271 13 127.0.0.1", "status": "responded"}
2022-07-11T14:04:49.494+0800 debug transport/transport.go:213 retrying pipeline connection {"previous_err": "context canceled", "attempt": 1}

@moonheart
Copy link

moonheart commented Nov 22, 2022

解决了,clash 的 dns-hijack 我配置的是 any:53,改为指定为系统 dns 服务器就好了。

我这边也遇到这个情况。
我将 mosdns 设置为 clash 的上游,配置如下

dns:
  enable: true
  use-hosts: true
  listen: 127.0.0.1:6868
  ipv6: false
  default-nameserver:
    - 127.0.0.1:1053
  nameserver:
    - 127.0.0.1:1053
  enhanced-mode: redir-host

一个特别的现象是,当 clash 开启的时候,这时候会有大量的 context deadline exceeded,这时我手动 nslookup 指定通过 mosdns 解析时也会出现无法解析的情况;而关闭 clash 之后,就可以立即解析出结果。因此我猜测可能是并发的问题。

但是加了enable_pipeline=truemax_conns=10 也没有变化,配置如下

  - tag: cache
    type: cache
    args:
      size: 10240
      #redis: "redis://127.0.0.1:6379/0"
      lazy_cache_ttl: 86400
      cache_everything: true

  - tag: forward_cloudflare
    type: fast_forward
    args:
      upstream:
        - addr: "1.1.1.1"
          enable_pipeline: true
          max_conns: 10

  - tag: main_sequence
    type: sequence
    args:
      exec:
        # 域名映射IP
        - hosts

        # 获取ECS
        - ecs_auto

        # 缓存
        - cache

        # 屏蔽TYPE65类型请求
        - if: qtype65
          exec:
          - black_hole
          - _return

        - forward_cloudflare

        - if: "(response_is_cloudflare_ip)"
          exec:
            - hijack_cf_ip

@bob-zebedy
Copy link

为什么我出现的 context deadline exceeded 都是

2022-12-27T03:09:12.029Z	warn	entry returned an err	{"query": "gsas.idms-apple.com.akadns.net. IN HTTPS 36697 7744 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:24:40.575Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 50094 7773 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:24:41.616Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 50094 7778 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:25:15.885Z	warn	entry returned an err	{"query": "appledownload.qtlcdn.com. IN HTTPS 3433 7783 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:25:27.169Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 46046 7788 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:42:00.257Z	warn	entry returned an err	{"query": "init-china.itunes-apple.com.akadns.net. IN HTTPS 52650 7801 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:44:01.803Z	warn	entry returned an err	{"query": "bag.itunes.apple.com. IN HTTPS 4845 7809 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:44:06.714Z	warn	entry returned an err	{"query": "xp.apple.com. IN HTTPS 4208 7814 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:07:31.509Z	warn	entry returned an err	{"query": "gsp64-ssl.ls.apple.com. IN HTTPS 17980 7857 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:11:04.945Z	warn	entry returned an err	{"query": "gateway.fe.apple-dns.cn. IN HTTPS 6819 7867 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:12:01.249Z	warn	entry returned an err	{"query": "init.itunes.apple.com. IN HTTPS 57578 7870 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:24:41.206Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 36987 7896 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:24:42.255Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 36987 7899 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:57:11.381Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 19667 7935 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:57:12.421Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 19667 7940 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:57:14.429Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 19667 7941 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:10:00.157Z	warn	entry returned an err	{"query": "gsp-ssl.ls.apple.com. IN HTTPS 53257 7947 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:10:01.215Z	warn	entry returned an err	{"query": "get-bx.g.aaplimg.com. IN HTTPS 56084 7950 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:19:44.228Z	warn	entry returned an err	{"query": "gspe1-ssl.ls.apple.com. IN HTTPS 5224 7974 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:19:45.273Z	warn	entry returned an err	{"query": "e6987.a.akamaiedge.net. IN HTTPS 4001 7977 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:19:46.311Z	warn	entry returned an err	{"query": "e6987.a.akamaiedge.net. IN HTTPS 4001 7979 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:19:48.409Z	warn	entry returned an err	{"query": "e6987.a.akamaiedge.net. IN HTTPS 4001 7980 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:09:21.146Z	warn	entry returned an err	{"query": "configuration.ls.apple.com. IN HTTPS 28301 8041 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:09:22.160Z	warn	entry returned an err	{"query": "configuration.ls.apple.com. IN HTTPS 28301 8046 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:25:16.609Z	warn	entry returned an err	{"query": "apps.mzstatic.com. IN HTTPS 45444 8084 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:25:16.665Z	warn	entry returned an err	{"query": "gsa.apple.com. IN HTTPS 35200 8086 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:25:17.626Z	warn	entry returned an err	{"query": "apps.mzstatic.com. IN HTTPS 45444 8090 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:25:18.982Z	warn	entry returned an err	{"query": "apps.mzstatic.com. IN HTTPS 45444 8094 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:27:42.401Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 33293 8096 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:30:36.469Z	warn	entry returned an err	{"query": "appledownload.qtlcdn.com. IN HTTPS 17372 8109 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:30:37.488Z	warn	entry returned an err	{"query": "appledownload.qtlcdn.com. IN HTTPS 17372 8114 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:42:08.233Z	warn	entry returned an err	{"query": "init-china.itunes-apple.com.akadns.net. IN HTTPS 498 8123 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:53:23.790Z	warn	entry returned an err	{"query": "gateway.fe.apple-dns.cn. IN HTTPS 61830 8147 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:53:24.840Z	warn	entry returned an err	{"query": "gateway.fe.apple-dns.cn. IN HTTPS 61830 8149 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T07:19:43.373Z	warn	entry returned an err	{"query": "gspe1-ssl.ls.apple.com. IN HTTPS 2459 8178 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T07:24:43.605Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 48217 8192 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T07:24:44.518Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 48217 8196 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T07:24:46.617Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 48217 8197 ::ffff:127.0.0.1", "error": "context deadline exceeded"}

貌似都是苹果相关的域名

@urlesistiana urlesistiana changed the title [FAQ] 报错 context deadline exceeded [FAQ] forward 报错 context deadline exceeded Dec 28, 2022
@GeekXtop
Copy link

解决了,clash 的 dns-hijack 我配置的是 any:53,改为指定为系统 dns 服务器就好了。

我这边也遇到这个情况。 我将 mosdns 设置为 clash 的上游,配置如下

dns:
  enable: true
  use-hosts: true
  listen: 127.0.0.1:6868
  ipv6: false
  default-nameserver:
    - 127.0.0.1:1053
  nameserver:
    - 127.0.0.1:1053
  enhanced-mode: redir-host

一个特别的现象是,当 clash 开启的时候,这时候会有大量的 context deadline exceeded,这时我手动 nslookup 指定通过 mosdns 解析时也会出现无法解析的情况;而关闭 clash 之后,就可以立即解析出结果。因此我猜测可能是并发的问题。

但是加了enable_pipeline=truemax_conns=10 也没有变化,配置如下

  - tag: cache
    type: cache
    args:
      size: 10240
      #redis: "redis://127.0.0.1:6379/0"
      lazy_cache_ttl: 86400
      cache_everything: true

  - tag: forward_cloudflare
    type: fast_forward
    args:
      upstream:
        - addr: "1.1.1.1"
          enable_pipeline: true
          max_conns: 10

  - tag: main_sequence
    type: sequence
    args:
      exec:
        # 域名映射IP
        - hosts

        # 获取ECS
        - ecs_auto

        # 缓存
        - cache

        # 屏蔽TYPE65类型请求
        - if: qtype65
          exec:
          - black_hole
          - _return

        - forward_cloudflare

        - if: "(response_is_cloudflare_ip)"
          exec:
            - hijack_cf_ip

大佬怎么改的。没看懂

@ctaoist
Copy link

ctaoist commented Sep 9, 2023

大量出现这种错误,但针对出现这种错误的每个域名,自己用 nslookup 试又能正常返回 dns 记录,就很奇怪,比如:

2023-09-09T12:58:14.041+0800    WARN    seq.r2  upstream error  {"uqid": 679, "qname": "c2.777655.xyz.", "qtype": 1, "qclass": 1, "upstream": "119.6.6.6", "error": "context deadline exceeded"}

但我自己用 nslookup 执行都是ok的:

nslookup c2.777655.xyz 本地 mosdns ip server
# 还是
nslookup c2.777655.xyz upstrem_server

都是ok的

@IrineSistiana 是哪里出了问题吗,不应该啊

出现这种错误好像都是 clash 那边发起的 dns 请求,不清楚是哪一边的问题

@yuukh
Copy link

yuukh commented Nov 24, 2023

为什么我出现的 context deadline exceeded 都是

2022-12-27T03:09:12.029Z	warn	entry returned an err	{"query": "gsas.idms-apple.com.akadns.net. IN HTTPS 36697 7744 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:24:40.575Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 50094 7773 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:24:41.616Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 50094 7778 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:25:15.885Z	warn	entry returned an err	{"query": "appledownload.qtlcdn.com. IN HTTPS 3433 7783 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:25:27.169Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 46046 7788 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:42:00.257Z	warn	entry returned an err	{"query": "init-china.itunes-apple.com.akadns.net. IN HTTPS 52650 7801 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:44:01.803Z	warn	entry returned an err	{"query": "bag.itunes.apple.com. IN HTTPS 4845 7809 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T03:44:06.714Z	warn	entry returned an err	{"query": "xp.apple.com. IN HTTPS 4208 7814 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:07:31.509Z	warn	entry returned an err	{"query": "gsp64-ssl.ls.apple.com. IN HTTPS 17980 7857 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:11:04.945Z	warn	entry returned an err	{"query": "gateway.fe.apple-dns.cn. IN HTTPS 6819 7867 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:12:01.249Z	warn	entry returned an err	{"query": "init.itunes.apple.com. IN HTTPS 57578 7870 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:24:41.206Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 36987 7896 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:24:42.255Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 36987 7899 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:57:11.381Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 19667 7935 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:57:12.421Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 19667 7940 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T04:57:14.429Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 19667 7941 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:10:00.157Z	warn	entry returned an err	{"query": "gsp-ssl.ls.apple.com. IN HTTPS 53257 7947 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:10:01.215Z	warn	entry returned an err	{"query": "get-bx.g.aaplimg.com. IN HTTPS 56084 7950 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:19:44.228Z	warn	entry returned an err	{"query": "gspe1-ssl.ls.apple.com. IN HTTPS 5224 7974 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:19:45.273Z	warn	entry returned an err	{"query": "e6987.a.akamaiedge.net. IN HTTPS 4001 7977 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:19:46.311Z	warn	entry returned an err	{"query": "e6987.a.akamaiedge.net. IN HTTPS 4001 7979 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T05:19:48.409Z	warn	entry returned an err	{"query": "e6987.a.akamaiedge.net. IN HTTPS 4001 7980 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:09:21.146Z	warn	entry returned an err	{"query": "configuration.ls.apple.com. IN HTTPS 28301 8041 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:09:22.160Z	warn	entry returned an err	{"query": "configuration.ls.apple.com. IN HTTPS 28301 8046 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:25:16.609Z	warn	entry returned an err	{"query": "apps.mzstatic.com. IN HTTPS 45444 8084 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:25:16.665Z	warn	entry returned an err	{"query": "gsa.apple.com. IN HTTPS 35200 8086 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:25:17.626Z	warn	entry returned an err	{"query": "apps.mzstatic.com. IN HTTPS 45444 8090 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:25:18.982Z	warn	entry returned an err	{"query": "apps.mzstatic.com. IN HTTPS 45444 8094 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:27:42.401Z	warn	entry returned an err	{"query": "gateway.icloud.com.cn. IN HTTPS 33293 8096 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:30:36.469Z	warn	entry returned an err	{"query": "appledownload.qtlcdn.com. IN HTTPS 17372 8109 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:30:37.488Z	warn	entry returned an err	{"query": "appledownload.qtlcdn.com. IN HTTPS 17372 8114 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:42:08.233Z	warn	entry returned an err	{"query": "init-china.itunes-apple.com.akadns.net. IN HTTPS 498 8123 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:53:23.790Z	warn	entry returned an err	{"query": "gateway.fe.apple-dns.cn. IN HTTPS 61830 8147 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T06:53:24.840Z	warn	entry returned an err	{"query": "gateway.fe.apple-dns.cn. IN HTTPS 61830 8149 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T07:19:43.373Z	warn	entry returned an err	{"query": "gspe1-ssl.ls.apple.com. IN HTTPS 2459 8178 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T07:24:43.605Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 48217 8192 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T07:24:44.518Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 48217 8196 ::ffff:127.0.0.1", "error": "context deadline exceeded"}
2022-12-27T07:24:46.617Z	warn	entry returned an err	{"query": "bookkeeper.itunes.apple.com. IN HTTPS 48217 8197 ::ffff:127.0.0.1", "error": "context deadline exceeded"}

貌似都是苹果相关的域名

上游不支持qtype 65查询,把qtype65 match出来,发给能处理的上游

@smdx
Copy link

smdx commented Nov 26, 2023

第一次用mosdns,看日志也是出现了很多这个错误提示。
设置:
Screenshot-2023-11-26_110232

一部分错误日志

2023-11-26 00:38:22	WARN	forward_remote	upstream error	{"uqid": 19919, "qname": "img-s-msn-com.akamaized.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:22	WARN	forward_remote	upstream error	{"uqid": 19921, "qname": "res.cdn.office.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19929, "qname": "ts3.cn.mm.bing.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19939, "qname": "trk.publictracker.xyz.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19939, "qname": "trk.publictracker.xyz.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19942, "qname": "ts1.cn.mm.bing.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	upstream error	{"uqid": 19947, "qname": "rt.tace.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	upstream error	{"uqid": 19947, "qname": "rt.tace.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	failed to dial dns conn	{"error": "dial tcp 1.1.1.1:853: i/o timeout"}
2023-11-26 00:38:51	WARN	forward_remote	upstream error	{"uqid": 20074, "qname": "tracker.darmowy-torrent.pl.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	udp_server	entry err	{"query": {"uqid": 20074, "client": "::ffff:127.0.0.1", "qname": "tracker.darmowy-torrent.pl.", "qtype": 1, "qclass": 1, "elapsed": "5.000730855s"}, "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	forward_remote	failed to dial dns conn	{"error": "dial tcp 1.1.1.1:853: i/o timeout"}
2023-11-26 00:38:51	WARN	forward_remote	upstream error	{"uqid": 20082, "qname": "tracker.darmowy-torrent.pl.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	udp_server	entry err	{"query": {"uqid": 20082, "client": "::ffff:127.0.0.1", "qname": "tracker.darmowy-torrent.pl.", "qtype": 1, "qclass": 1, "elapsed": "5.001177337s"}, "error": "context deadline exceeded"}
2023-11-26 00:42:37	WARN	forward_local	upstream error	{"uqid": 20661, "qname": "shop190348925.taobao.com.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 00:49:53	WARN	forward_local	upstream error	{"uqid": 21018, "qname": "push-rtmp-hs-vr-f5-spe.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 00:49:53	WARN	forward_local	upstream error	{"uqid": 21018, "qname": "push-rtmp-hs-vr-f5-spe.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 01:17:02	WARN	forward_remote	upstream error	{"uqid": 22552, "qname": "private.anonseed.com.", "qclass": 1, "qtype": 1, "upstream": "tls://9.9.9.9", "error": "read err, EOF"}
2023-11-26 02:17:45	WARN	forward_local	upstream error	{"uqid": 25586, "qname": "push-rtmp-l29.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 02:17:45	WARN	forward_local	upstream error	{"uqid": 25586, "qname": "push-rtmp-l29.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 02:17:53	WARN	forward_local	upstream error	{"uqid": 25697, "qname": "asia.pool.ntp.org.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 02:17:53	WARN	forward_local	upstream error	{"uqid": 25697, "qname": "asia.pool.ntp.org.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 02:47:30	WARN	forward_local	upstream error	{"uqid": 27371, "qname": "teredo.ipv6.microsoft.com.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}

@AndyLin2020
Copy link

第一次用mosdns,看日志也是出现了很多这个错误提示。 设置: Screenshot-2023-11-26_110232

一部分错误日志

2023-11-26 00:38:22	WARN	forward_remote	upstream error	{"uqid": 19919, "qname": "img-s-msn-com.akamaized.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:22	WARN	forward_remote	upstream error	{"uqid": 19921, "qname": "res.cdn.office.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19929, "qname": "ts3.cn.mm.bing.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19939, "qname": "trk.publictracker.xyz.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19939, "qname": "trk.publictracker.xyz.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19942, "qname": "ts1.cn.mm.bing.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	upstream error	{"uqid": 19947, "qname": "rt.tace.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	upstream error	{"uqid": 19947, "qname": "rt.tace.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	failed to dial dns conn	{"error": "dial tcp 1.1.1.1:853: i/o timeout"}
2023-11-26 00:38:51	WARN	forward_remote	upstream error	{"uqid": 20074, "qname": "tracker.darmowy-torrent.pl.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	udp_server	entry err	{"query": {"uqid": 20074, "client": "::ffff:127.0.0.1", "qname": "tracker.darmowy-torrent.pl.", "qtype": 1, "qclass": 1, "elapsed": "5.000730855s"}, "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	forward_remote	failed to dial dns conn	{"error": "dial tcp 1.1.1.1:853: i/o timeout"}
2023-11-26 00:38:51	WARN	forward_remote	upstream error	{"uqid": 20082, "qname": "tracker.darmowy-torrent.pl.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	udp_server	entry err	{"query": {"uqid": 20082, "client": "::ffff:127.0.0.1", "qname": "tracker.darmowy-torrent.pl.", "qtype": 1, "qclass": 1, "elapsed": "5.001177337s"}, "error": "context deadline exceeded"}
2023-11-26 00:42:37	WARN	forward_local	upstream error	{"uqid": 20661, "qname": "shop190348925.taobao.com.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 00:49:53	WARN	forward_local	upstream error	{"uqid": 21018, "qname": "push-rtmp-hs-vr-f5-spe.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 00:49:53	WARN	forward_local	upstream error	{"uqid": 21018, "qname": "push-rtmp-hs-vr-f5-spe.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 01:17:02	WARN	forward_remote	upstream error	{"uqid": 22552, "qname": "private.anonseed.com.", "qclass": 1, "qtype": 1, "upstream": "tls://9.9.9.9", "error": "read err, EOF"}
2023-11-26 02:17:45	WARN	forward_local	upstream error	{"uqid": 25586, "qname": "push-rtmp-l29.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 02:17:45	WARN	forward_local	upstream error	{"uqid": 25586, "qname": "push-rtmp-l29.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 02:17:53	WARN	forward_local	upstream error	{"uqid": 25697, "qname": "asia.pool.ntp.org.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 02:17:53	WARN	forward_local	upstream error	{"uqid": 25697, "qname": "asia.pool.ntp.org.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 02:47:30	WARN	forward_local	upstream error	{"uqid": 27371, "qname": "teredo.ipv6.microsoft.com.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}

一样出现这些日志

@tzy123-me
Copy link

第一次用mosdns,看日志也是出现了很多这个错误提示。 设置: Screenshot-2023-11-26_110232
一部分错误日志

2023-11-26 00:38:22	WARN	forward_remote	upstream error	{"uqid": 19919, "qname": "img-s-msn-com.akamaized.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:22	WARN	forward_remote	upstream error	{"uqid": 19921, "qname": "res.cdn.office.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19929, "qname": "ts3.cn.mm.bing.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19937, "qname": "tracker.ipv6tracker.ru.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19939, "qname": "trk.publictracker.xyz.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19939, "qname": "trk.publictracker.xyz.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:23	WARN	forward_remote	upstream error	{"uqid": 19942, "qname": "ts1.cn.mm.bing.net.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	upstream error	{"uqid": 19947, "qname": "rt.tace.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	upstream error	{"uqid": 19947, "qname": "rt.tace.ru.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:24	WARN	forward_remote	failed to dial dns conn	{"error": "dial tcp 1.1.1.1:853: i/o timeout"}
2023-11-26 00:38:51	WARN	forward_remote	upstream error	{"uqid": 20074, "qname": "tracker.darmowy-torrent.pl.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	udp_server	entry err	{"query": {"uqid": 20074, "client": "::ffff:127.0.0.1", "qname": "tracker.darmowy-torrent.pl.", "qtype": 1, "qclass": 1, "elapsed": "5.000730855s"}, "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	forward_remote	failed to dial dns conn	{"error": "dial tcp 1.1.1.1:853: i/o timeout"}
2023-11-26 00:38:51	WARN	forward_remote	upstream error	{"uqid": 20082, "qname": "tracker.darmowy-torrent.pl.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2023-11-26 00:38:51	WARN	udp_server	entry err	{"query": {"uqid": 20082, "client": "::ffff:127.0.0.1", "qname": "tracker.darmowy-torrent.pl.", "qtype": 1, "qclass": 1, "elapsed": "5.001177337s"}, "error": "context deadline exceeded"}
2023-11-26 00:42:37	WARN	forward_local	upstream error	{"uqid": 20661, "qname": "shop190348925.taobao.com.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 00:49:53	WARN	forward_local	upstream error	{"uqid": 21018, "qname": "push-rtmp-hs-vr-f5-spe.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 00:49:53	WARN	forward_local	upstream error	{"uqid": 21018, "qname": "push-rtmp-hs-vr-f5-spe.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 01:17:02	WARN	forward_remote	upstream error	{"uqid": 22552, "qname": "private.anonseed.com.", "qclass": 1, "qtype": 1, "upstream": "tls://9.9.9.9", "error": "read err, EOF"}
2023-11-26 02:17:45	WARN	forward_local	upstream error	{"uqid": 25586, "qname": "push-rtmp-l29.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 02:17:45	WARN	forward_local	upstream error	{"uqid": 25586, "qname": "push-rtmp-l29.douyincdn.com.", "qclass": 1, "qtype": 1, "upstream": "119.29.29.29", "error": "context deadline exceeded"}
2023-11-26 02:17:53	WARN	forward_local	upstream error	{"uqid": 25697, "qname": "asia.pool.ntp.org.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 02:17:53	WARN	forward_local	upstream error	{"uqid": 25697, "qname": "asia.pool.ntp.org.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}
2023-11-26 02:47:30	WARN	forward_local	upstream error	{"uqid": 27371, "qname": "teredo.ipv6.microsoft.com.", "qclass": 1, "qtype": 1, "upstream": "114.114.114.114", "error": "context deadline exceeded"}

一样出现这些日志

如果用OpenClash的话,Default-NameServer添加DNS服务器可以解决
image

@cutbuzz
Copy link

cutbuzz commented Dec 17, 2023

hijack

defult-nameserver可以添加127.0.0.1:5335吗?作用是啥?

@shaw21003
Copy link

我用passwall + mosdns 也是出现大量这个错误,过一段时间可能几个小时就会科学网络不通,重启服务就又好了,查了好几天,目前把mosdns关了在用。

@sword0922
Copy link

我用passwall + mosdns 也是出现大量这个错误,过一段时间可能几个小时就会科学网络不通,重启服务就又好了,查了好几天,目前把mosdns关了在用。

兄弟,我也是一样。请问解决了吗?

@HomeQi
Copy link

HomeQi commented Feb 4, 2024

我也是出现了这种错误,也是passwall2配合mosdns这样,等一个大佬救命。

@KanLai
Copy link

KanLai commented Feb 7, 2024

我也是出现了这种错误,也是passwall2配合mosdns这样,等一个大佬救命。

我都放弃了 还是smartdns吧 稳定 没有这些问题,还找不到解决方法。

@tzy123-me
Copy link

我也是出现了这种错误,也是passwall2配合mosdns这样,等一个大佬救命。

把机场节点的地址加入MosDNS的白名单试试,我的就这样解决了。

@HomeQi
Copy link

HomeQi commented Feb 11, 2024

我也是出现了这种错误,也是passwall2配合mosdns这样,等一个大佬救命。

把机场节点的地址加入MosDNS的白名单试试,我的就这样解决了。

哎,暂时放弃这个方案了,smartdns可能会慢一点,但是好在设置简单并且可以之前也设置好了去广告了,就不折腾了,谢谢兄弟给的方案,留给其他朋友做个参考哈哈!

@shaw21003
Copy link

我也是出现了这种错误,也是passwall2配合mosdns这样,等一个大佬救命。

把机场节点的地址加入MosDNS的白名单试试,我的就这样解决了。

哎,暂时放弃这个方案了,smartdns可能会慢一点,但是好在设置简单并且可以之前也设置好了去广告了,就不折腾了,谢谢兄弟给的方案,留给其他朋友做个参考哈哈!

我也用smartdns了,感觉速度并不慢,和mosdns差不多吧。一般人用mosdns更简单,自定义又可以很强,但一般人玩不转。我照着官网设置了去广告,都感觉不到效果,电视盒子有广告,浏览器因为有插件没广告,比DNS过滤强大很多,所以不知道smartdns去广告起效了没有。

@mumuou
Copy link

mumuou commented Feb 12, 2024

最近开始用SSRP+也是大量出现这样的错误,过一段时间可能几个小时就会科学网络不通(科学插件显示一切正常),然后导致所有网站都不能访问,就连ping网站和本地运营商的DNS的IP地址都不通,但是SSH连上路由器,路由器本身内外网都能访问,也能ping通,重启服务就又好了,看来不是我的设置问题。

@lisuyuan13
Copy link

同样的问题,解决不了

@Moebyte
Copy link

Moebyte commented Apr 25, 2024

这个问题还没解决啊,困扰了好几年了

@ATFieldBeast
Copy link

我也是出现大量的warning后就科学不了了,日志全是远程的dns,mosdns+openclash
Snipaste_2024-05-16_02-19-43

@yyysuo
Copy link

yyysuo commented May 17, 2024

这个问题还没解决啊,困扰了好几年了

mosdns的上游都改成非udp的,比如tls://223.5.5.5,基本上就不会有了,作者其实在上面提过了,包括如果使用clash或者sing-box之类的fakedns作上游,也写成tcp://192.168.1.100:7874这种,再不行log level 改error吧。

@stonegr
Copy link

stonegr commented May 19, 2024

我使用doh也出现了这个问题,但是代码中添加这一行,重新编译后已解决
image

@xyl94k
Copy link

xyl94k commented May 25, 2024

同样是这个问题啊

@yyysuo
Copy link

yyysuo commented May 25, 2024

我使用doh也出现了这个问题,但是代码中添加这一行,重新编译后已解决 image

求个linux amd64的编译好的二进制,感谢。

@stonegr
Copy link

stonegr commented May 31, 2024

我使用doh也出现了这个问题,但是代码中添加这一行,重新编译后已解决 image

求个linux amd64的编译好的二进制,感谢。

这样就不会连接复用了,慎用!

@yyysuo
Copy link

yyysuo commented Jul 4, 2024

我使用doh也出现了这个问题,但是代码中添加这一行,重新编译后已解决 image

求个linux amd64的编译好的二进制,感谢。

这样就不会连接复用了,慎用!

好像是pipeline的问题,不用pipeline基本上没有了。

@Jukkasimba
Copy link

.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://8.8.8.8", "error": "dial tcp 8.8.8.8:853: i/o timeout"}
2024-07-04 16:58:19 WARN fallback primary error {"query": {"uqid": 31, "client": "::ffff:127.0.0.1", "qname": "us7.jiedian.stream.", "qtype": 1, "qclass": 1, "elapsed": "5.000663527s"}, "error": "context deadline exceeded"}
2024-07-04 16:58:19 WARN fallback secondary error {"query": {"uqid": 31, "client": "::ffff:127.0.0.1", "qname": "us7.jiedian.stream.", "qtype": 1, "qclass": 1, "elapsed": "5.000676094s"}, "error": "context deadline exceeded"}
2024-07-04 16:58:19 WARN forward_remote upstream error {"uqid": 31, "qname": "us7.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-07-04 16:58:19 WARN udp_server entry err {"query": {"uqid": 31, "client": "::ffff:127.0.0.1", "qname": "us7.jiedian.stream.", "qtype": 1, "qclass": 1, "elapsed": "5.00068863s"}, "error": "no valid response from both primary and secondary"}
2024-07-04 16:58:19 WARN forward_remote upstream error {"uqid": 31, "qname": "us7.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-07-04 16:58:19 WARN forward_remote upstream error {"uqid": 31, "qname": "us7.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://8.8.8.8", "error": "context deadline exceeded"}
2024-07-04 16:58:20 WARN fallback primary error {"query": {"uqid": 32, "client": "::ffff:127.0.0.1", "qname": "us8.jiedian.stream.", "qtype": 1, "qclass": 1, "elapsed": "5.001036332s"}, "error": "context deadline exceeded"}
2024-07-04 16:58:20 WARN forward_remote upstream error {"uqid": 32, "qname": "us8.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-07-04 16:58:20 WARN forward_remote upstream error {"uqid": 32, "qname": "us8.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-07-04 16:58:20 WARN forward_remote upstream error {"uqid": 33, "qname": "de1.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://8.8.8.8", "error": "context deadline exceeded"}
2024-07-04 16:58:20 WARN forward_remote upstream error {"uqid": 33, "qname": "de1.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://8.8.8.8", "error": "dial tcp 8.8.8.8:853: i/o timeout"}
2024-07-04 16:58:20 WARN fallback primary error {"query": {"uqid": 33, "client": "::ffff:127.0.0.1", "qname": "de1.jiedian.stream.", "qtype": 1, "qclass": 1, "elapsed": "5.000914582s"}, "error": "context deadline exceeded"}
2024-07-04 16:58:20 WARN forward_remote upstream error {"uqid": 33, "qname": "de1.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://8.8.8.8", "error": "context deadline exceeded"}
2024-07-04 16:58:20 WARN forward_remote upstream error {"uqid": 34, "qname": "de2.jiedian.stream.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
请问,我的日志好像报错的都是节点唉,出不去这是啥问题导致的啊,不开MOSDNS直接单独使用节点是没问题的啊

@wangsmile
Copy link

2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 1, "qname": "private-user-images.githubusercontent.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"}
2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 1, "qname": "private-user-images.githubusercontent.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"}
2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 2, "qname": "www.google-analytics.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 3, "qname": "www.google-analytics.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"}
2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 3, "qname": "www.google-analytics.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"}
2024-10-11 13:49:02 WARN forward_remote upstream error {"uqid": 4, "qname": "client.wns.windows.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:02 WARN forward_remote upstream error {"uqid": 5, "qname": "client.wns.windows.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:02 WARN forward_remote upstream error {"uqid": 5, "qname": "client.wns.windows.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 6, "qname": "alive.github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 7, "qname": "alive.github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 8, "qname": "alive.github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"}
2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 8, "qname": "alive.github.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"}
2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 9, "qname": "alive.github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 9, "qname": "alive.github.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 10, "qname": "github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 11, "qname": "github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 12, "qname": "github.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 12, "qname": "github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 13, "qname": "github.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 13, "qname": "github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"}
大量警告,停不下来,怎么解决?

@liang-hiwin
Copy link

2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 1, "qname": "private-user-images.githubusercontent.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"} 2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 1, "qname": "private-user-images.githubusercontent.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"} 2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 2, "qname": "www.google-analytics.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 3, "qname": "www.google-analytics.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"} 2024-10-11 13:48:41 WARN forward_remote upstream error {"uqid": 3, "qname": "www.google-analytics.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"} 2024-10-11 13:49:02 WARN forward_remote upstream error {"uqid": 4, "qname": "client.wns.windows.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:02 WARN forward_remote upstream error {"uqid": 5, "qname": "client.wns.windows.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:02 WARN forward_remote upstream error {"uqid": 5, "qname": "client.wns.windows.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 6, "qname": "alive.github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 7, "qname": "alive.github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 8, "qname": "alive.github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"} 2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 8, "qname": "alive.github.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "dial tcp 1.1.1.1:853: i/o timeout"} 2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 9, "qname": "alive.github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:11 WARN forward_remote upstream error {"uqid": 9, "qname": "alive.github.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 10, "qname": "github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 11, "qname": "github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 12, "qname": "github.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 12, "qname": "github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 13, "qname": "github.com.", "qclass": 1, "qtype": 28, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 2024-10-11 13:49:33 WARN forward_remote upstream error {"uqid": 13, "qname": "github.com.", "qclass": 1, "qtype": 1, "upstream": "tls://1.1.1.1", "error": "context deadline exceeded"} 大量警告,停不下来,怎么解决?

不用管,开error就行了,没事谁天天看日志。

@fichenx
Copy link

fichenx commented Oct 30, 2024

这个问题还没解决啊,困扰了好几年了

mosdns的上游都改成非udp的,比如tls://223.5.5.5,基本上就不会有了,作者其实在上面提过了,包括如果使用clash或者sing-box之类的fakedns作上游,也写成tcp://192.168.1.100:7874这种,再不行log level 改error吧。

实测可行,只要把日志中出现超时的上游dns服务器从配置中删除掉,全部换成非udp的,就不会出现这个提示了。
另外,在二级路由部署的mosdns,主路由的dns转发到二级路由mosdns端口,只要开启了mosdns,主路由和二级路由的活动连接数就会大幅增长到6-8000,甚至上万,一直维持高连接数,有时会耗尽主路由(红米AX6)内存,导致重启。不知道是我的配置有问题,还是mosdns确实很耗内存。

@yyysuo
Copy link

yyysuo commented Nov 1, 2024

这个问题还没解决啊,困扰了好几年了

mosdns的上游都改成非udp的,比如tls://223.5.5.5,基本上就不会有了,作者其实在上面提过了,包括如果使用clash或者sing-box之类的fakedns作上游,也写成tcp://192.168.1.100:7874这种,再不行log level 改error吧。

实测可行,只要把日志中出现超时的上游dns服务器从配置中删除掉,全部换成非udp的,就不会出现这个提示了。 另外,在二级路由部署的mosdns,主路由的dns转发到二级路由mosdns端口,只要开启了mosdns,主路由和二级路由的活动连接数就会大幅增长到6-8000,甚至上万,一直维持高连接数,有时会耗尽主路由(红米AX6)内存,导致重启。不知道是我的配置有问题,还是mosdns确实很耗内存。

这连接数不用说肯定是配置错误了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests