使用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.
答案 0 :(得分:0)
服务单元文件应该设置一个RestartSec,大多数开发人员都忘记了这一点。
Restart=on-failure
RestartSec=3
答案 1 :(得分:0)
您应该找到application.service
locate application.service
并检查启动ExecStart的文件是否存在。
也许您已经升级了系统,而配置文件是旧文件,则需要提交。
Gentoo做到了。
答案 2 :(得分:0)
无需使用locate实用工具来查找application.service。
执行:
systemctl status application.service
显示状态+静态路径
可以共享application.service的内容吗?
您是否可以使用ExecStart=
中的cmd运行应用程序?
足够的特权也可能是一个问题。在单元文件的User=
部分中检查伪指令Group=
和[Service]
。