xiaorouji / openwrt-passwall

7.02k stars 2.62k forks source link

做旁路由,不定时的因为dns服务崩溃而导致国内域名访问不上,国外无问题! #1743

Closed sundaqiang closed 2 years ago

sundaqiang commented 2 years ago

描述bug

做旁路由,不定时的因为dns服务崩溃而导致国内域名访问不上,国外无问题!

复现步骤

随机时间后,整个旁路由网络包含本身均无法访问国内网址,聊天类软件无问题 passwall首页的【百度连接】按钮检测无效、【谷歌连接】按钮检测成功、【github连接】按钮检测成功

你想要实现的目的

旧版本无此情况

日志信息

暂无日志

截图

暂无截图

系统相关信息

passwall版本:最新

其他相关信息

执行/etc/init.d/passwall restart后可恢复正常

smallprogram commented 2 years ago

开一下进程守护试试

sundaqiang commented 2 years ago

开一下进程守护试试

这个我本身是有开的,看了下代码,如果还出现问题,我一次重启各项依赖服务排查下是哪个依赖的问题!

sundaqiang commented 2 years ago

开一下进程守护试试

经测试,出现问题之后需重新执行下/usr/share/passwall/app.sh start_dns这个函数!

xiaorouji commented 2 years ago

发个日志都那么难吗,无论有无错误都要发上来啊

sundaqiang commented 2 years ago

发个日志都那么难吗,无论有无错误都要发上来啊

Wed Jan 26 01:20:00 2022 cron.err crond[4202]: USER root pid 22750 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 01:25:00 2022 cron.err crond[4202]: USER root pid 23463 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 01:30:00 2022 cron.err crond[4202]: USER root pid 24177 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 01:35:00 2022 cron.err crond[4202]: USER root pid 24898 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 01:40:00 2022 cron.err crond[4202]: USER root pid 25633 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 01:45:00 2022 cron.err crond[4202]: USER root pid 26354 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 01:49:43 2022 daemon.err nginx[1961]: 2022/01/26 01:49:43 [error] 2217#0: *2022 open() "/www/favicon.ico" failed (2: No such file or directory), client: 192.168.0.80, server: _lan, request: "GET /favicon.ico HTTP/1.1", host: "192.168.0.3", referrer: "https://192.168.0.3/" Wed Jan 26 01:49:43 2022 daemon.err uwsgi[1714]: has_emperor mode detected (fd: 7) Wed Jan 26 01:49:43 2022 daemon.err uwsgi[1714]: [uWSGI] getting INI configuration from /etc/uwsgi/vassals/luci-webui.ini Wed Jan 26 01:49:43 2022 daemon.err uwsgi[1714]: Wed Jan 26 01:49:43 2022 - [emperor] vassal /etc/uwsgi/vassals/luci-webui.ini has been spawned Wed Jan 26 01:49:43 2022 daemon.err uwsgi[1714]: Wed Jan 26 01:49:43 2022 - [emperor] vassal /etc/uwsgi/vassals/luci-webui.ini is ready to accept requests Wed Jan 26 01:49:43 2022 daemon.info uwsgi-luci: spawned uWSGI master process (pid: 27032) Wed Jan 26 01:49:43 2022 daemon.err uwsgi[1714]: Wed Jan 26 01:49:43 2022 - [emperor] vassal /etc/uwsgi/vassals/luci-webui.ini is now loyal Wed Jan 26 01:50:00 2022 cron.err crond[4202]: USER root pid 27261 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 01:50:23 2022 daemon.err uwsgi[1714]: Wed Jan 26 01:50:23 2022 - [emperor] vassal /etc/uwsgi/vassals/luci-webui.ini is now loyal Wed Jan 26 01:51:27 2022 daemon.info uwsgi-luci: Wed Jan 26 01:51:27 2022 - worker 1 (pid: 27033) is taking too much time to die...NO MERCY !!! Wed Jan 26 01:51:28 2022 daemon.info uwsgi-luci: uWSGI worker 1 cheaped. Wed Jan 26 01:54:25 2022 daemon.info uwsgi-luci: netstat: showing only processes with your user ID Wed Jan 26 01:54:43 2022 daemon.info uwsgi-luci: Respawned uWSGI worker 1 (new pid: 28221) Wed Jan 26 01:54:43 2022 daemon.err uwsgi[1714]: Wed Jan 26 01:54:43 2022 - [emperor] vassal /etc/uwsgi/vassals/luci-webui.ini is ready to accept requests Wed Jan 26 01:54:50 2022 daemon.info uwsgi-luci: uWSGI worker 2 cheaped. Wed Jan 26 01:54:51 2022 daemon.err uwsgi[1714]: Wed Jan 26 01:54:51 2022 - [emperor] vassal /etc/uwsgi/vassals/luci-webui.ini is now loyal Wed Jan 26 01:55:00 2022 cron.err crond[4202]: USER root pid 28336 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 01:55:01 2022 daemon.info uwsgi-luci: Respawned uWSGI worker 2 (new pid: 28341) Wed Jan 26 01:55:02 2022 daemon.err uwsgi[1714]: Wed Jan 26 01:55:02 2022 - [emperor] vassal /etc/uwsgi/vassals/luci-webui.ini is now loyal Wed Jan 26 01:55:02 2022 daemon.info uwsgi-luci: netstat: showing only processes with your user ID Wed Jan 26 01:55:06 2022 daemon.info uwsgi-luci: uWSGI worker 1 cheaped. Wed Jan 26 01:56:19 2022 authpriv.info dropbear[28833]: Child connection from 192.168.0.80:60189 Wed Jan 26 01:56:19 2022 authpriv.notice dropbear[28833]: Password auth succeeded for 'root' from 192.168.0.80:60189 Wed Jan 26 02:00:00 2022 cron.err crond[4202]: USER root pid 30037 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 02:05:00 2022 authpriv.info dropbear[31064]: Child connection from 192.168.0.80:60520 Wed Jan 26 02:05:00 2022 authpriv.notice dropbear[31064]: Password auth succeeded for 'root' from 192.168.0.80:60520 Wed Jan 26 02:05:00 2022 cron.err crond[4202]: USER root pid 31067 cmd /usr/share/unblockneteasemusic/log_check.sh Wed Jan 26 02:07:59 2022 daemon.info uwsgi-luci: netstat: showing only processes with your user ID Wed Jan 26 02:08:24 2022 daemon.info uwsgi-luci: netstat: showing only processes with your user ID Wed Jan 26 02:10:00 2022 cron.err crond[4202]: USER root pid 32682 cmd /usr/share/unblockneteasemusic/log_check.sh

01:49的时候出现问题,之后我登陆了后台。

QQ截图20220126015516

应该就是dnsmasq的问题。好像unblockneteasemusic也会操作dnsmasq?我去翻一下...

QQ截图20220126022052

sundaqiang commented 2 years ago

发个日志都那么难吗,无论有无错误都要发上来啊

测试了一天,确定是ChinaDNS-NG的问题。不开启啥是没有!!

BOBINIUNIU commented 2 years ago

大佬早就教导我们了不要折腾dns, 不要折腾dns,不要折腾dns。什么smartdns,chinadns都有稳定性问题。 目前的最佳使用姿势: xray/v2ray tcp代理dns, 关掉所有dns缓存,包括dnsmasq的,一切问题都消失了。 家庭的网络环境,使用人数一般不会超过10人,dns缓存没有什么意义,缓存命中率很小。

sundaqiang commented 2 years ago

大佬早就教导我们了不要折腾dns, 不要折腾dns,不要折腾dns。什么smartdns,chinadns都有稳定性问题。 目前的最佳使用姿势: xray/v2ray tcp代理dns, 关掉所有dns缓存,包括dnsmasq的,一切问题都消失了。 家庭的网络环境,使用人数一般不会超过10人,dns缓存没有什么意义,缓存命中率很小。

之前做主路由一直没事的,最近换了旁路由一开始没事,直到我更新了固件之后都这样,最后发现其实是chinadns-ng的问题。 出问题之后重启chinadns-ng /tmp/etc/passwall/bin/chinadns-ng -v -b 0.0.0.0 -l 7914 -c 223.5.5.5,129.29.29.29 -m /tmp/etc/passwall/chinadns_chnlist -M -t 127.0.0.1#7913 -g /tmp/etc/passwall/chinadns_gfwlist -f >/dev/null 2>&1 &

以下是chinadns-ng的日志

2022-01-27 21:51:34 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7953 2022-01-27 21:51:34 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7954 2022-01-27 21:51:34 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7955 2022-01-27 21:51:34 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7956 2022-01-27 21:51:34 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7957 2022-01-27 21:51:34 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7958 2022-01-27 21:51:34 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7959 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7960 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7961 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7962 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7963 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7964 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7965 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7966 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7967 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7968 2022-01-27 21:51:35 ERR: [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7969

BOBINIUNIU commented 2 years ago

大佬早就教导我们了不要折腾dns, 不要折腾dns,不要折腾dns。什么smartdns,chinadns都有稳定性问题。 目前的最佳使用姿势: xray/v2ray tcp代理dns, 关掉所有dns缓存,包括dnsmasq的,一切问题都消失了。 家庭的网络环境,使用人数一般不会超过10人,dns缓存没有什么意义,缓存命中率很小。

之前做主路由一直没事的,最近换了旁路由一开始没事,直到我更新了固件之后都这样,最后发现其实是chinadns-ng的问题。 出问题之后重启chinadns-ng /tmp/etc/passwall/bin/chinadns-ng -v -b 0.0.0.0 -l 7914 -c 223.5.5.5,129.29.29.29 -m /tmp/etc/passwall/chinadns_chnlist -M -t 127.0.0.1#7913 -g /tmp/etc/passwall/chinadns_gfwlist -f >/dev/null 2>&1 &

以下是chinadns-ng的日志

�[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7953 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7954 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7955 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7956 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7957 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7958 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7959 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7960 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7961 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7962 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7963 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7964 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7965 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7966 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7967 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7968 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7969

开启dns缓存有时会出现各种奇怪的问题,不一定是passwall的锅,可能是xray/v2ray core或者dnsmasq的问题。各种dns插件能不装就不装,环境越简单越好,出了问题也容易排查。

sundaqiang commented 2 years ago

大佬早就教导我们了不要折腾dns, 不要折腾dns,不要折腾dns。什么smartdns,chinadns都有稳定性问题。 目前的最佳使用姿势: xray/v2ray tcp代理dns, 关掉所有dns缓存,包括dnsmasq的,一切问题都消失了。 家庭的网络环境,使用人数一般不会超过10人,dns缓存没有什么意义,缓存命中率很小。

之前做主路由一直没事的,最近换了旁路由一开始没事,直到我更新了固件之后都这样,最后发现其实是chinadns-ng的问题。 出问题之后重启chinadns-ng /tmp/etc/passwall/bin/chinadns-ng -v -b 0.0.0.0 -l 7914 -c 223.5.5.5,129.29.29.29 -m /tmp/etc/passwall/chinadns_chnlist -M -t 127.0.0.1#7913 -g /tmp/etc/passwall/chinadns_gfwlist -f >/dev/null 2>&1 &

以下是chinadns-ng的日志

�[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7953 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7954 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7955 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7956 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7957 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7958 �[1;35m2022-01-27 21:51:34 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7959 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7960 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7961 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7962 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7963 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7964 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7965 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7966 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7967 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7968 �[1;35m2022-01-27 21:51:35 ERR:�[0m [handle_timeout_event] upstream dns server reply timeout, unique msgid: 7969

开启dns缓存有时会出现各种奇怪的问题,不一定是passwall的锅,可能是xray/v2ray core或者dnsmasq的问题。各种dns插件能不装就不装,环境越简单越好,出了问题也容易排查。

没有装,这些都是passwall自带的选项功能。

asdffgdsf commented 2 years ago

可能最新的passwall4.46和v2ray4.44有冲突,间歇国内不找不到dns上不去网,chinadns-ng去掉勾选,国内就不出现问题了,就是反应速度没开启时快,如果能兼顾就好了。

ax003 commented 2 years ago

最近几个版本,准确说是增加用dnsmasq或smartdns的选型版本之后,我的软路由就经常因为dns的问题发生问题,大大可能高估了我们这些人使用openwrt的熟悉程度。

Pacio commented 2 years ago

大佬早就教导我们了不要折腾dns, 不要折腾dns,不要折腾dns。什么smartdns,chinadns都有稳定性问题。 目前的最佳使用姿势: xray/v2ray tcp代理dns, 关掉所有dns缓存,包括dnsmasq的,一切问题都消失了。 家庭的网络环境,使用人数一般不会超过10人,dns缓存没有什么意义,缓存命中率很小。

缓存关了其他全部默认设置才是最稳的

ax003 commented 2 years ago

大佬早就教导我们了不要折腾dns, 不要折腾dns,不要折腾dns。什么smartdns,chinadns都有稳定性问题。 目前的最佳使用姿势: xray/v2ray tcp代理dns, 关掉所有dns缓存,包括dnsmasq的,一切问题都消失了。 家庭的网络环境,使用人数一般不会超过10人,dns缓存没有什么意义,缓存命中率很小。

缓存关了其他全部默认设置才是最稳的

但其实还是报错,不然一遍一遍折腾,一般是找不到dns,或者ip111查访问谷歌的ip查不到,或者youtube页面可以打开但视频总是转圈,这些问题都是从最近版本开始让选择dnsmasq或者smartddns之后出现的

xiaorouji commented 2 years ago

@sundaqiang 为什么是129.29.29.29而不是119.29.29.29 ?

sundaqiang commented 2 years ago

@sundaqiang 为什么是129.29.29.29而不是119.29.29.29 ?

打错了,后来我换回来了,一样的问题。现在是关闭chinadns-ng,一了百了了。。

ax003 commented 2 years ago

我关闭chinadns-ng还是有同样的问题出现,重启软路由正常

BOBINIUNIU commented 2 years ago

把dnsmasq的缓存大小设为0,passwall的dns缓存也不要开启