systemctl里万恶的203
Posted 奇妙之二进制
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了systemctl里万恶的203相关的知识,希望对你有一定的参考价值。
如前面的两个例子,在执行systemctl时经常出现问题
例如
[root@z system]# systemctl status changeconfig.service -l
changeconfig.service - NIC Saver
Loaded: loaded (/usr/lib/systemd/system/changeconfig.service; enabled)
Active: failed (Result: exit-code) since Mon 2016-10-10 05:11:51 EDT; 1min 5s ago
Process: 10949 ExecStart=/usr/bin/changename (code=exited, status=203/EXEC)
Main PID: 10949 (code=exited, status=203/EXEC)
Oct 10 05:11:51 z.cent7 systemd[1]: Starting NIC Saver...
Oct 10 05:11:51 z.cent7 systemd[1]: changeconfig.service: main process exited, code=exited, status=203/EXEC
Oct 10 05:11:51 z.cent7 systemd[1]: Failed to start NIC Saver.
Oct 10 05:11:51 z.cent7 systemd[1]: Unit changeconfig.service entered failed state.
处理方法:
/usr/bin/changename发现前面忘记加如下语句
#!/bin/sh
原因:systemctl执行脚本需要确认其解释器。
开发者涨薪指南 48位大咖的思考法则、工作方式、逻辑体系以上是关于systemctl里万恶的203的主要内容,如果未能解决你的问题,请参考以下文章
容器里用systemctl运行服务报错:Failed to get D-Bus connection: Operation not permitted(解决方法)
容器里用systemctl运行服务报错:Failed to get D-Bus connection: Operation not permitted(解决方法)