pymumu / smartdns

A local DNS server to obtain the fastest website IP for the best Internet experience, support DoT, DoH. 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验,支持DoH,DoT。
https://pymumu.github.io/smartdns/
GNU General Public License v3.0
8.3k stars 1.06k forks source link

华硕路由器smartdns自动停止运行 #1017

Closed firstvip closed 1 year ago

firstvip commented 2 years ago

问题现象
基本每天都会报错退出,/opt/etc/smartdns/smartdns.conf配置文件端口两行被自动增加数字5,改回配置,重启smartdns则恢复。

运行环境

  1. 固件型号
    华硕RT-AX82U 官方固件 3.0.0.4.386_49674-ge182230
  2. 运营商
    联通
  3. smartdns来源以及版本 smartdns.1.2022.08.06-1602.arm-optware-all.ipk
  4. 涉及的配置(注意去除个人相关信息) bind [::]:535
    bind-tcp [::]:535
    tcp-idle-time 3
    cache-size 4096
    cache-file /opt/etc/smartdns/smartdns.cache
    prefetch-domain yes
    serve-expired yes
    serve-expired-ttl 0
    speed-check-mode tcp:80,tcp:443,ping
    rr-ttl 600
    rr-ttl-min 60
    rr-ttl-max 86400
    log-level notice
    server 202.99.96.68
    server 114.114.114.114
    server 8.8.8.8 -blacklist-ip -check-edns
    server-tcp 119.29.29.29
    server-tcp 223.5.5.5
    server-tcp 64.6.64.6
    server-tls 1.1.1.1
    server-tls 8.8.4.4
    server-tls 9.9.9.9
    server-https https://cloudflare-dns.com/dns-query
    server-https https://doh.pub/dns-query
    force-qtype-SOA 65

重现步骤

  1. 上游DNS配置。

  2. 访问的域名。
    计算机一直在下载bt

信息收集

[2022-08-12 00:50:09,516][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 00:55:20,896][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:00:31,189][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:07:29,803][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:17:29,892][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:26:25,135][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:30:41,152][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:37:29,766][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:45:44,915][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:50:09,605][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:51:27,441][ERROR][ dns.c:1819] length mismatch, 4788106, 4:1
[2022-08-12 01:54:46,517][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 01:59:21,867][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:03:57,328][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:08:01,819][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:12:15,199][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:18:08,805][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:22:39,117][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:31:21,224][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:37:29,715][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:42:30,354][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:46:36,949][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:50:38,434][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 02:56:48,441][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 03:00:50,897][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 03:09:55,267][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 03:15:14,326][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 03:19:15,708][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 03:24:07,247][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 03:24:10,479][FATAL][ smartdns.c:445 ] process exit with signal 11, code = 2, errno = 0, pid = -1225916416, self = 24979, pc = 0x1e2c60, ad
dr = 0xb6ee0000, build(Aug 6 2022 16:03:08 arm)
[2022-08-12 03:24:10,479][FATAL][ util.c:1129] Stack:
[2022-08-12 03:24:10,479][FATAL][ util.c:1141] #01: 0x29c1c () from (null)+0x29c1c
[2022-08-12 03:24:10,479][FATAL][ util.c:1141] #02: 0x11e94 () from (null)+0x11e94
[2022-08-12 03:24:10,851][FATAL][ smartdns.c:445 ] process exit with signal 11, code = 1, errno = 0, pid = 0, self = 24979, pc = 0x2440c, addr = 0, bui
ld(Aug 6 2022 16:03:08 arm)
[2022-08-12 03:24:10,851][FATAL][ util.c:1129] Stack:
[2022-08-12 03:24:10,851][FATAL][ util.c:1141] #01: 0x29c1c () from (null)+0x29c1c
[2022-08-12 03:24:10,851][FATAL][ util.c:1141] #02: 0x11e94 () from (null)+0x11e94
[2022-08-12 08:53:34,255][NOTICE][ smartdns.c:351 ] smartdns starting...(Copyright (C) Nick Peng pymumu@gmail.com, build: Aug 6 2022 16:03:08)
[2022-08-12 08:54:13,298][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 08:58:29,684][ WARN][ dns_client.c:2562] Handshake with 2606:4700:0000:0000:0000:0000:6810:f8f9 failed, Connection reset by peer
[2022-08-12 09:02:58,833][NOTICE][ smartdns.c:351 ] smartdns starting...(Copyright (C) Nick Peng pymumu@gmail.com, build: Aug 6 2022 16:03:08)

PikuZheng commented 2 years ago

换成这个 S50smartdns

启动参数增加了 -S 在崩溃时会生成 /tmp/smartdns...........core,需要用这个文件来调查崩溃原因

pymumu commented 2 years ago

把这个去掉看看:server-tcp 223.5.5.5

firstvip commented 2 years ago

好的,我换一下S50smartdns,然后去掉server-tcp 223.5.5.5,继续观察。

lalasou commented 2 years ago

/usr/bin/smartdns -f -x -c /etc/storage/smartdns.conf 这个启动命令试试?

PikuZheng commented 2 years ago

把这个去掉看看:server-tcp 223.5.5.5

之前说阿里https有问题,tls也不好吗(我一直在用

lalasou commented 2 years ago

还是用腾讯 tcp 119.29.29.29吧

PikuZheng commented 2 years ago

还是用腾讯 tcp 119.29.29.29吧

我这腾讯要走到上海去 结果不理想。但相对来说污染百度>阿里>腾讯

lalasou commented 2 years ago

如果能给些指示对比就好了 国内这几家

我现在在用这几个 感觉太多了 需要精简下 去掉哪些好呢 server 223.5.5.5:53 -blacklist-ip server 119.29.29.29:53 -blacklist-ip server 114.114.114.114:53 -blacklist-ip server-tcp 119.29.29.29 -blacklist-ip server 1.1.1.1 -check-edns server 8.8.4.4 -check-edns server 208.67.222.222 -check-edns server-tcp 208.67.222.222:443 server-tls 8.8.4.4:853 server-tls 1.1.1.1:853

PikuZheng commented 2 years ago

如果能给些指示对比就好了 国内这几家

我现在在用这几个 感觉太多了 需要精简下 去掉哪些好呢 server 223.5.5.5:53 -blacklist-ip server 119.29.29.29:53 -blacklist-ip server 114.114.114.114:53 -blacklist-ip server-tcp 119.29.29.29 -blacklist-ip server 1.1.1.1 -check-edns server 8.8.4.4 -check-edns server 208.67.222.222 -check-edns server-tcp 208.67.222.222:443 server-tls 8.8.4.4:853 server-tls 1.1.1.1:853

国内 53 会被运营商污染,建议都改用doh或dot

pymumu commented 2 years ago

更新了一下代码,看看是否解决了上述问题。