0

在使用 systemctl 运行我的应用程序时遇到此错误实际上是哪里的问题?运行 systemctl start 时出现 systemctl 错误?

Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Started <application> Web Interface.
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Main process exited, code=exited, status=203/EXEC
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Unit entered failed state.
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Failed with result 'exit-code'.
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Service hold-off time over, scheduling restart.
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Stopped <application> Web Interface.
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Started <application> Web Interface.
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Main process exited, code=exited, status=203/EXEC
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Unit entered failed state.
Jul 27 16:20:36 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Failed with result 'exit-code'.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Service hold-off time over, scheduling restart.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Stopped <application> Web Interface.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Started <application> Web Interface.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Main process exited, code=exited, status=203/EXEC
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Unit entered failed state.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Failed with result 'exit-code'.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Service hold-off time over, scheduling restart.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Stopped <application> Web Interface.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Started <application> Web Interface.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Main process exited, code=exited, status=203/EXEC
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Unit entered failed state.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Failed with result 'exit-code'.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Service hold-off time over, scheduling restart.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Stopped <application> Web Interface.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Started <application> Web Interface.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Main process exited, code=exited, status=203/EXEC
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Unit entered failed state.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Failed with result 'exit-code'.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Service hold-off time over, scheduling restart.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Stopped <application> Web Interface.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: <application>.service: Start request repeated too quickly.
Jul 27 16:20:37 nikhil-Lenovo-ideapad-300-15ISK systemd[1]: Failed to start <application> Web Interface.
4

3 回答 3

0

无需使用 locate 实用程序来查找 application.service。

执行:

systemctl status application.service

显示状态+静态路径

可以分享application.service的内容吗?您是否能够使用 cmd from 运行应用程序ExecStart=

足够的特权也可能是一个问题。检查指令User=和单元文件Group=[Service]部分。

于 2018-11-27T19:00:57.773 回答
0

服务单元文件应该设置一个 RestartSec,大多数开发人员忘记了这一点。

Restart=on-failure
RestartSec=3
于 2017-07-09T17:28:29.343 回答
0

您应该找到 application.service

locate application.service

并检查 ExecStart 启动的文件是否存在。

可能你升级了系统,配置文件是旧文件,需要commit。

Gentoo 做到了。

于 2018-10-24T13:51:09.067 回答