问题描述
限时送ChatGPT账号..我创建了一个 systemd 服务文件(专门用于 svnserve;我实际上使用的是这里的示例 https://stackoverflow/a/40584047/464087),当我启用它时,输入
I've created a systemd service file (specifically for svnserve; I'm actually using the example from here https://stackoverflow/a/40584047/464087), and when I enable it, typing
sudo systemctl enable svnserve
我收到回复
Failed to execute operation: Invalid argument
运行
sudo systemctl status svnserve
收益
● svnserve.service - Subversion protocol daemon
Loaded: loaded (/etc/systemd/system/svnserve.service; enabled; vendor preset: enabled)
Active: inactive (dead)
没有给我任何关于任何错误的线索.然后我可以毫无错误地启动服务,它似乎按预期运行,在启动 systemctl status 后,我仍然不知道有什么问题:
not giving me any clue about anything being wrong. I can then start the service without any error, and it seems to be running as expected, and after starting systemctl status I still get no clue about anything being wrong:
● svnserve.service - Subversion protocol daemon
Loaded: loaded (/etc/systemd/system/svnserve.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-01-09 22:10:14 UTC; 6s ago
Process: 9677 ExecStart=/usr/bin/svnserve $DAEMON_ARGS (code=exited, status=0/SUCCESS)
Main PID: 9678 (svnserve)
Tasks: 1
Memory: 964.0K
CPU: 2ms
CGroup: /system.slice/svnserve.service
└─9678 /usr/bin/svnserve --daemon --pid-file /run/svnserve/svnserve.pid --root /srv/svn/repos --log-file /var/log/svnserve/svnserve.log
那么这个错误信息是什么意思?无效论点"应该适用于哪个级别?svnserve 命令的参数?服务文件中的某些属性?servicectl 命令本身的命令行参数?
So what does this error message mean? And to which level of things is "invalid argument" supposed to apply? An argument to the svnserve command? Some property in the service file? A command line argument to the servicectl command itself?
FWIW 这是在 Ubuntu 16.04 LTS 服务器上.
FWIW this is on a Ubuntu 16.04 LTS server.
推荐答案
我遇到了类似的情况,在我的情况下,从 [Install] 部分中删除 Alias 行后问题就消失了.感谢另一个线程中的 Anton:https://stackoverflow/a/34978908/2711456 - 别名可能不是与服务名称相同.
I had a similar case, in my case problem went away after removing the Alias line from the [Install] section. Thanks to Anton in another thread: https://stackoverflow/a/34978908/2711456 - alias' name may not be the same as service name.
这篇关于“无法执行操作:无效参数"是什么意思?运行 systemctl enable 时是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论