IrineSistiana/mosdns-cn

强制结束进程后无法启动

happy42779 opened this issue · 1 comments

我在尝试和测试各样的配置,然后发现了个小问题。

配置文件:
server_addr: ":53"
cache_size: 9999
insecure: false
log_file: "/var/log/mosdns-cn"
local_upstream: ["223.5.5.5", "114.114.114.114"]
remote_upstream: ["https://8.8.8.8/dns-query"]
working_dir: "/etc/mosdns-cn/"

错误log:
2022-08-06T17:41:24.851+0800 info mosdns-cn/main.go:246 mosdns-cn ver: 1.4.0
2022-08-06T17:41:24.851+0800 info mosdns-cn/main.go:247 arch: amd64, os: linux, go: go1.18.2
2022-08-06T17:41:24.851+0800 fatal mosdns-cn/main.go:251 failed to init entry, unsupported diversion mode
2022-08-06T17:41:47.168+0800 info mosdns-cn/main.go:246 mosdns-cn ver: 1.4.0
2022-08-06T17:41:47.168+0800 info mosdns-cn/main.go:247 arch: amd64, os: linux, go: go1.18.2
2022-08-06T17:41:47.168+0800 fatal mosdns-cn/main.go:251 failed to init entry, unsupported diversion mode

触发:

  1. 当程序在前台运行时且用CTRL+C结束会触发
  2. 当程序在后台运行时且用kill 结束时会触发

查看了源码的逻辑,有一些配置必须要成对出现。是配置问题。