Coder Social home page Coder Social logo

Comments (11)

chinaniupai avatar chinaniupai commented on May 23, 2024

出现了什么问题

复制复杂示例到config-template.yaml后,无法使用。

mosdns-winsw.err.log

2021-02-09T02:07:37.644+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:07:37.651+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:07:37.651+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:07:37.651+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.
2021-02-09T02:07:47.773+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:07:47.779+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:07:47.779+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:07:47.779+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.
2021-02-09T02:08:07.903+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:08:07.909+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:08:07.909+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:08:07.909+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.
2021-02-09T02:08:38.031+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:08:38.036+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:08:38.036+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:08:38.036+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.
2021-02-09T02:09:08.159+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:09:08.165+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:09:08.165+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:09:08.165+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.
2021-02-09T02:09:38.289+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:09:38.295+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:09:38.295+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:09:38.295+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.
2021-02-09T02:10:08.417+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:10:08.423+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:10:08.423+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:10:08.423+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.
2021-02-09T02:10:38.544+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:10:38.550+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:10:38.550+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:10:38.550+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.
2021-02-09T02:11:08.674+0800 info mosdns/main.go:136 mosdns ver: v1.4.0-0-g7a1bca9
2021-02-09T02:11:08.680+0800 info mosdns/main.go:137 arch: amd64, os: windows, go: go1.15.7
2021-02-09T02:11:08.680+0800 info coremain/run.go:60 loading config {"file": "config.yaml"}
2021-02-09T02:11:08.680+0800 fatal coremain/run.go:63 failed to parse config from file config.yaml: open config.yaml: The system cannot find the file specified.

mosdns-winsw.wrapper.log

2021-02-09 02:07:36,649 DEBUG - Starting WinSW in console mode
2021-02-09 02:07:36,808 INFO - Stopping the service with id 'mosdns'
2021-02-09 02:07:36,810 FATAL - WMI Operation failure: NoSuchService
WMI.WmiException: NoSuchService
在 WinSW.Program.ThrowNoSuchService()
在 WinSW.Program.g__Stop|2_3(<>c__DisplayClass2_0& )
在 WinSW.Program.Run(String[] argsArray, IWinSWConfiguration descriptor)
在 WinSW.Program.Main(String[] args)
2021-02-09 02:07:36,887 DEBUG - Starting WinSW in console mode
2021-02-09 02:07:37,047 INFO - Uninstalling the service with id 'mosdns'
2021-02-09 02:07:37,048 WARN - The service with id 'mosdns' does not exist. Nothing to uninstall
2021-02-09 02:07:37,049 DEBUG - Completed. Exit code is 0
2021-02-09 02:07:37,120 DEBUG - Starting WinSW in console mode
2021-02-09 02:07:37,276 INFO - Installing the service with id 'mosdns'
2021-02-09 02:07:37,286 DEBUG - Completed. Exit code is 0
2021-02-09 02:07:37,360 DEBUG - Starting WinSW in console mode
2021-02-09 02:07:37,517 INFO - Starting the service with id 'mosdns'
2021-02-09 02:07:37,596 DEBUG - Starting WinSW in service mode
2021-02-09 02:07:37,605 DEBUG - Completed. Exit code is 0
2021-02-09 02:07:37,610 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:07:37,621 INFO - Started process 7664
2021-02-09 02:07:37,625 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender
2021-02-09 02:07:47,725 DEBUG - Starting WinSW in service mode
2021-02-09 02:07:47,739 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:07:47,751 INFO - Started process 21368
2021-02-09 02:07:47,754 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender
2021-02-09 02:08:07,854 DEBUG - Starting WinSW in service mode
2021-02-09 02:08:07,868 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:08:07,880 INFO - Started process 6292
2021-02-09 02:08:07,883 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender
2021-02-09 02:08:37,983 DEBUG - Starting WinSW in service mode
2021-02-09 02:08:37,997 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:08:38,007 INFO - Started process 5724
2021-02-09 02:08:38,011 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender
2021-02-09 02:08:39,086 DEBUG - Starting WinSW in service mode
2021-02-09 02:09:08,111 DEBUG - Starting WinSW in service mode
2021-02-09 02:09:08,125 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:09:08,136 INFO - Started process 10680
2021-02-09 02:09:08,139 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender
2021-02-09 02:09:38,241 DEBUG - Starting WinSW in service mode
2021-02-09 02:09:38,255 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:09:38,266 INFO - Started process 6344
2021-02-09 02:09:38,269 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender
2021-02-09 02:10:08,369 DEBUG - Starting WinSW in service mode
2021-02-09 02:10:08,383 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:10:08,394 INFO - Started process 17288
2021-02-09 02:10:08,397 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender
2021-02-09 02:10:38,496 DEBUG - Starting WinSW in service mode
2021-02-09 02:10:38,510 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:10:38,521 INFO - Started process 14596
2021-02-09 02:10:38,524 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender
2021-02-09 02:11:08,625 DEBUG - Starting WinSW in service mode
2021-02-09 02:11:08,639 INFO - Starting E:\dns\mosdns.exe -c config.yaml
2021-02-09 02:11:08,651 INFO - Started process 12052
2021-02-09 02:11:08,654 DEBUG - Forwarding logs of the process System.Diagnostics.Process (mosdns) to WinSW.DefaultLogAppender

如何重现

复制复杂示例到config-template.yaml后,无法使用。

mosdns 的版本号(mosdns -v):1.4.0

使用的启动参数或启动方式:service_control.bat

操作系统和平台:Windows10

进行了什么操作导致了问题的出现:复制wiki内复杂示例内容到config-template.yaml。

使用的配置文件:

完全复制的复杂示例

from mosdns.

chinaniupai avatar chinaniupai commented on May 23, 2024

我发现双击mosdns.exe打不开

from mosdns.

IrineSistiana avatar IrineSistiana commented on May 23, 2024

是 config.yaml ,

不是 config- template.yaml,

from mosdns.

chinaniupai avatar chinaniupai commented on May 23, 2024

是config.yaml,

不是config- template.yaml,

1.4.0的压缩包里没有config.yaml吧????好像只有config-template.yam啊???我自己新建了一个config.yaml但是复制文本粘贴进去之后没用啊
l能不能写一篇针对纯新手的教程wiki呀

from mosdns.

q767939287 avatar q767939287 commented on May 23, 2024

双击是使用config.yaml , 如果你的配置文件叫abc.yaml 你需使用mosdns -c abc.yaml,如果你需要双击就要食用, 请将文件名改为config.yaml
yaml 文件建议配合VS code ,或带编辑提示的文本工具使用

from mosdns.

chinaniupai avatar chinaniupai commented on May 23, 2024

双击是config.yaml,如果您的配置文件叫abc.yaml您需要使用mosdns -c abc.yaml,如果您需要双击就要食用,请添加文件名以替换config.yaml
yaml文件建议配合VS代码,或带编辑提示的文本工具使用

我用的Notepad2,1.4.0的压缩包里没有config.yaml,我用的win10

from mosdns.

q767939287 avatar q767939287 commented on May 23, 2024

你还不明白? 不就是yaml文件的名字问题,改一下名就行了,作者想说明的是你想直接双击能用就要改成config.yaml才行,不一定要压缩包就要有
image

from mosdns.

chinaniupai avatar chinaniupai commented on May 23, 2024

你还不明白吗?不就是yaml文件的名字问题,改一下名就行了,作者想说明的是你想直接双击能用就要改成config.yaml才行,不一定要压缩包就要有
图像

改名了,但是双击mosdns.exe打不开,用service_control.bat输入1也没用,config.yaml的配置是直接用的本地/远程域名分流外加广告域名屏蔽。已经下载 geoip.dat 和 geosite.dat 文件到 mosdns 的目录了

from mosdns.

q767939287 avatar q767939287 commented on May 23, 2024

请设置log文件检查规则文件路径有没有错误

from mosdns.

chinaniupai avatar chinaniupai commented on May 23, 2024

请设置日志文件检查规则文件路径有没有错误

是在config文件的第一行写这个吗?
log:
level: info
file: ./mosdns.log

from mosdns.

chinaniupai avatar chinaniupai commented on May 23, 2024

请设置log文件检查规则文件路径有没有错误

哎 脑袋疼,这次用service输入1之后提示
23:40:55,585 - Stopping service 'mosdns (powered by WinSW) (mosdns)'...
23:40:55,597 - Service 'mosdns (powered by WinSW) (mosdns)' has already stopped.
23:40:55,747 - Uninstalling service 'mosdns (powered by WinSW) (mosdns)'...
23:40:55,757 - Service 'mosdns (powered by WinSW) (mosdns)' was uninstalled successfully.
23:40:55,908 - Installing service 'mosdns (powered by WinSW) (mosdns)'...
23:40:55,924 - Service 'mosdns (powered by WinSW) (mosdns)' was installed successfully.
23:40:56,078 - Starting service 'mosdns (powered by WinSW) (mosdns)'...
23:40:57,237 - Failed to start the service.

from mosdns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.