-
Notifications
You must be signed in to change notification settings - Fork 176
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
UDP 查询超时 #73
Comments
麻烦提供一下chinadns-ng的verbose日志 |
虽然DIG显示查询时间239ms,但是每次查询等待结果显示要5秒以上. |
root@OpenWrt:~# dig www.google.com.hk @8.8.8.8 ; <<>> DiG 9.16.8 <<>> www.google.com.hk @8.8.8.8 ;; OPT PSEUDOSECTION: ;; ANSWER SECTION: ;; Query time: 89 msec 直接查询8.8.8.8一般是立即出结果的. |
日志请不要截图,我想看文字版的 |
root@OpenWrt:~# /var/etc/passwall/bin/chinadns-ng -v -b 0.0.0.0 -l 88 -c 119.29.29.29 -m /var/etc/passwall/chnlist -M -t 8.8.8.8 -g /var/etc/passwall/gfwlist.txt -f |
DIG信息 root@OpenWrt:~# dig www.google.com.hk @10.0.0.10 -p 88 ; <<>> DiG 9.16.8 <<>> www.google.com.hk @10.0.0.10 -p 88 ;; OPT PSEUDOSECTION: ;; ANSWER SECTION: ;; Query time: 239 msec root@OpenWrt:~# dig www.google.com.hk @10.0.0.10 -p 88 ; <<>> DiG 9.16.8 <<>> www.google.com.hk @10.0.0.10 -p 88 ;; OPT PSEUDOSECTION: ;; ANSWER SECTION: ;; Query time: 209 msec root@OpenWrt:~# dig www.google.com.hk @10.0.0.10 -p 88 ; <<>> DiG 9.16.8 <<>> www.google.com.hk @10.0.0.10 -p 88 ;; OPT PSEUDOSECTION: ;; ANSWER SECTION: ;; Query time: 219 msec root@OpenWrt:~# dig www.google.com.hk @10.0.0.10 -p 88 ; <<>> DiG 9.16.8 <<>> www.google.com.hk @10.0.0.10 -p 88 ;; OPT PSEUDOSECTION: ;; ANSWER SECTION: ;; Query time: 229 msec root@OpenWrt:~# dig www.google.com.hk @10.0.0.10 -p 88 ; <<>> DiG 9.16.8 <<>> www.google.com.hk @10.0.0.10 -p 88 ;; OPT PSEUDOSECTION: ;; ANSWER SECTION: ;; Query time: 229 msec |
虽然DIG每次都查到了,但是会延迟大概5秒左右才给出结果,nslookup同样. |
我觉得这不是chinadns-ng的问题 |
因为我看log以及dig的输出,都是229ms左右。 |
你用其它linux主机 dig @10.0.0.10 -p 88 试下? |
/etc/resolv.conf 的文件内容发来看下? |
建议配合 tcpdump 抓包、strace 系统调用跟踪,看下是什么地方耗时了5秒钟。5秒这个数字貌似是dns查询超时的时间(印象中) |
/etc/resolv.conf Windows下用dig查询是同样的结果,延迟5ms是估算的,还有一个现象就是,好像延迟一次之后第二次查又是立即. |
在openwrt上安装了china-dns,也有类似的现象。
启动命令
在openwrt手动查询上游dns服务器,均能正常返回:
通过chinadns-ng查询
同时,日志显示超时
BTW,只有请求上游china-dns会超时。如果请求trust-dns相关域名,并不会超时。
这个问题重启进程之后就会消失,但是过一段时间就会重新出现。 |
root@OpenWrt:~# dig @127.0.0.1 -p5353 www.qq.com A
; <<>> DiG 9.16.12 <<>> @127.0.0.1 -p5353 www.qq.com A
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
# 同时,日志显示超时
[handle_local_packet] query [weather-data.apple.com] from 127.0.0.1#17347 (1192)
[handle_remote_packet] reply [weather-data.apple.com] from 127.0.0.1#1053 (1192), result: accept
[handle_remote_packet] reply [weather-data.apple.com] from 127.0.0.1#1053 (1192), result: ignore
[handle_timeout_event] upstream dns server reply timeout, unique msgid: 1188
[handle_timeout_event] upstream dns server reply timeout, unique msgid: 1035
[handle_remote_packet] reply [weather-data.apple.com] from 127.0.0.1#1053 (1191), result: accept
[handle_remote_packet] reply [weather-data.apple.com] from 127.0.0.1#1053 (1191), result: ignore
[handle_local_packet] query [a2047.dscb.akamai.net] from 127.0.0.1#18394 (1040)
[handle_local_packet] query [a2047.dscb.akamai.net] from 127.0.0.1#42448 (1041)
[handle_remote_packet] reply [a2047.dscb.akamai.net] from 127.0.0.1#1053 (1041), result: accept
[handle_remote_packet] reply [a2047.dscb.akamai.net] from 127.0.0.1#1053 (1041), result: ignore
[handle_remote_packet] reply [a2047.dscb.akamai.net] from 127.0.0.1#1053 (1040), result: accept
[handle_remote_packet] reply [a2047.dscb.akamai.net] from 127.0.0.1#1053 (1040), result: ignore
[handle_local_packet] query [iphone-ld.apple.com] from 127.0.0.1#3490 (1193)
[handle_local_packet] query [iphone-ld.apple.com] from 127.0.0.1#14564 (1042)
[handle_timeout_event] upstream dns server reply timeout, unique msgid: 1036
[handle_timeout_event] upstream dns server reply timeout, unique msgid: 1037
[handle_timeout_event] upstream dns server reply timeout, unique msgid: 1038
[handle_timeout_event] upstream dns server reply timeout, unique msgid: 1042
[handle_timeout_event] upstream dns server reply timeout, unique msgid: 1193
[handle_local_packet] query [github.com] from 127.0.0.1#36389 (1194)
[handle_remote_packet] reply [github.com] from 127.0.0.1#1053 (1194), result: accept
[handle_remote_packet] reply [github.com] from 127.0.0.1#1053 (1194), result: ignore 你这里都没找到www.qq.com的查询日志?确定给全了?这个log |
日志可能跟查询不太对的上(时间相差了几十秒 |
把对应的log发出来 |
不要发这种不对应的log呀 |
直接查询没问题,都可以在150ms内快速回应.(结果正确无污染)
但是通过chinadns设置上游查询大概率超时,少部分情况下可以查询到结果.
目标服务器是8.8.8.8 / 1.0.0.1
走的是v2ray代理,
大部分节点是这样的,少部分节点又是完全正常的.
请排查下问题,我可以提供节点测试.
The text was updated successfully, but these errors were encountered: