muink / openwrt-fchomo

[Beta] FullCombo Mihomo supplies maximum customization on OpenWrt
GNU General Public License v2.0
23 stars 3 forks source link

守护进程有问题。 #7

Closed mingxiaoyu closed 1 week ago

mingxiaoyu commented 1 week ago

@muink 刚刚有观察了下。就算我不在启动这个app. 这个守护进程也没有正常停止。这个log还在不停的输出
海量这样的log, 感觉很怪。使用的过程,网络貌似也没问题。。。.,.雷同log就不贴了


2024-11-17 19:19:47 [DAEMON] Reloading service... 2024-11-17 19:19:47 [DAEMON] Service mihomo-c stopped. 2024-11-17 19:19:47 [DAEMON] Service mihomo-s stopped. 2024-11-17 19:19:51 [DAEMON] Mihomo alpha-ce52c34 started. 2024-11-17 19:21:13 [DAEMON] Reloading service... 2024-11-17 19:21:13 [DAEMON] Service mihomo-c stopped. 2024-11-17 19:21:13 [DAEMON] Service mihomo-s stopped. 2024-11-17 19:21:17 [DAEMON] Mihomo alpha-ce52c34 started. 2024-11-17 19:22:39 [DAEMON] Reloading service... 2024-11-17 19:22:40 [DAEMON] Service mihomo-c stopped. 2024-11-17 19:22:40 [DAEMON] Service mihomo-s stopped. 2024-11-17 19:22:44 [DAEMON] Mihomo alpha-ce52c34 started. 2024-11-17 19:24:06 [DAEMON] Reloading service... 2024-11-17 19:24:06 [DAEMON] Service mihomo-c stopped. 2024-11-17 19:24:06 [DAEMON] Service mihomo-s stopped. 2024-11-17 19:24:10 [DAEMON] Mihomo alpha-ce52c34 started. 2024-11-17 19:25:32 [DAEMON] Reloading service... 2024-11-17 19:25:33 [DAEMON] Service mihomo-c stopped. 2024-11-17 19:25:33 [DAEMON] Service mihomo-s stopped. 2024-11-17 19:25:37 [DAEMON] Mihomo alpha-ce52c34 started. 2024-11-17 19:26:59 [DAEMON] Reloading service... 2024-11-17 19:26:59 [DAEMON] Service mihomo-c stopped. 2024-11-17 19:26:59 [DAEMON] Service mihomo-s stopped. 2024-11-17 19:27:03 [DAEMON] Mihomo alpha-ce52c34 started. 2024-11-17 19:28:25 [DAEMON] Reloading service... 2024-11-17 19:28:26 [DAEMON] Service mihomo-c stopped. 2024-11-17 19:28:26 [DAEMON] Service mihomo-s stopped. 2024-11-17 19:28:29 [DAEMON] Mihomo alpha-ce52c34 started.

Originally posted by @mingxiaoyu in https://github.com/muink/openwrt-fchomo/issues/5#issuecomment-2481194113

muink commented 1 week ago

你是不是装了 MihomoTProxy, alpha-ce52c34 不是此项目的内核版本号 请停用 MihomoTProxy, 安装此项目的内核后载观察下.

mingxiaoyu commented 1 week ago

@muink 图我就不贴了,MihomoTProxy 已经卸载 mihomo 也替换成如下版本: mihomo 2024-11-14-de19f927-1 log: 2024-11-18 10:41:18 [DAEMON] Mihomo alpha-de19f92 started. 2024-11-18 10:41:38 [DAEMON] Reloading service... 2024-11-18 10:41:39 [DAEMON] Service mihomo-c stopped. 2024-11-18 10:41:39 [DAEMON] Service mihomo-s stopped. 2024-11-18 10:41:42 [DAEMON] Mihomo alpha-de19f92 started. 2024-11-18 10:43:05 [DAEMON] Reloading service... 2024-11-18 10:43:05 [DAEMON] Service mihomo-c stopped. 2024-11-18 10:43:05 [DAEMON] Service mihomo-s stopped. 2024-11-18 10:43:09 [DAEMON] Mihomo alpha-de19f92 started.

muink commented 1 week ago

@mingxiaoyu 目前此项目的内核版本是 v1.18.10 https://github.com/muink/openwrt-fchomo/blob/487a1287bc10f68c19f74b85adfe2f41820b7d0f/mihomo/Makefile#L4

然后检查 crontab 里是否有定时重启 mihomo 的任务. 全局 > 入站 的端口 和 客户端 > DNS设置 的端口 是否与其他已使用的监听端口冲突.

mingxiaoyu commented 1 week ago

@muink Crontab 没任何设置 最骚的是,我停了app。。日志还跑不停

2024-11-18 11:39:19 [DAEMON] Mihomo v1.18.10 started. 2024-11-18 11:40:42 [DAEMON] Reloading service... 2024-11-18 11:40:42 [DAEMON] Service mihomo-c stopped. 2024-11-18 11:40:42 [DAEMON] Service mihomo-s stopped. 2024-11-18 11:40:46 [DAEMON] Mihomo v1.18.10 started. 2024-11-18 11:42:08 [DAEMON] Reloading service... 2024-11-18 11:42:09 [DAEMON] Service mihomo-c stopped. 2024-11-18 11:42:09 [DAEMON] Service mihomo-s stopped. 2024-11-18 11:42:12 [DAEMON] Mihomo v1.18.10 started.

muink commented 1 week ago

看起来是触发器触发重载了 但不确定是哪个引起的, 只能您自己注释部分代码来测试了

https://github.com/muink/openwrt-fchomo/blob/487a1287bc10f68c19f74b85adfe2f41820b7d0f/luci-app-fchomo/root/etc/init.d/fchomo#L430-L453

另外如果正确关闭客户端后是不会有 Mihomo v1.18.10 started. 这个log的, 除非还开启了服务端.

image image
mingxiaoyu commented 1 week ago

100% 都没开。 在公司,没办法做那么复杂的操作 不过我大概猜到什么问题了。可能和我的fake ipv6有关. 但是我关闭之后还这么多log还是很离谱

muink commented 1 week ago

@mingxiaoyu 因为 openwrt 的 procd 除非 /etc/init.d/{service} stop 去明确停止服务, 否则已注册的触发器是会一直运行的.

您可以在 /etc/init.d/fchomo 修改上面提到的函数为下, 猜测能解决问题

service_triggers() { 
    procd_add_reload_trigger "$CONF" 'network' 

    return 0
} 

我可以在主界面加个按钮来明确停止服务.

mingxiaoyu commented 1 week ago

br-lan 一直 up/down 默认 wan 一直 up/down 已经可以确认是这两个的其中一个。。

mingxiaoyu commented 1 week ago

@muink 重启op 不能自动启动。要手动自己去点 日志如下,33分手动启动的 2024-11-20 11:31:57 [DAEMON] Error: wrong client configuration detected. 2024-11-20 11:33:50 [DAEMON] Reloading service mihomo-c... 2024-11-20 11:33:51 [DAEMON] Service mihomo-c stopped. 2024-11-20 11:33:55 [DAEMON] Mihomo v1.18.10 started.

muink commented 1 week ago

11:31:57 Error: wrong client configuration detected.

下次出现这条错误信息, 执行下面这条指令. 然后把详细的错误信息发出来.

mihomo -t -d "/etc/fchomo" -f "/var/run/fchomo/mihomo-c.yaml"
mingxiaoyu commented 6 days ago

ERRO[2024-11-20T22:42:04.01508092+08:00] if DNS configuration is turned on, NameServer cannot be empty

muink commented 6 days ago

@mingxiaoyu

NameServer cannot be empty

dns 服务器不能为空, 客户端 > dns设置里得把dns服务器选上 还是说你用的是这个 image

mingxiaoyu commented 6 days ago

我记得就是这个默认. 现在所有的dns 都是 默认+ 一个别的就好了

muink commented 6 days ago

@mingxiaoyu 估计是开机的时候dns下发还没完成, 我有空了再看下逻辑. 手动添加个dns服务器就能解决问题了