操作系统 Ubuntu-22.04
内核版本 6.2.0-39-generic
systemd --版本 systemd 249 (249.11-0ubuntu3.12)
问题描述:从一个 perl 脚本中,我尝试停止和启动myservice
,该脚本没有任何更改,并且在 systemd 237 / ubuntu 18.04 机器上运行良好。
该脚本中的命令是...
/bin/systemctl stop myservice.service
/bin/systemctl start myservice.service
该脚本能够成功停止服务,但无法成功启动它,并且看到以下错误消息。
Apr 26 08:18:27 myhost systemd[11189]: ovt-myservice.service: Failed to attach to cgroup /system.slice/system-ovt\x2dmyservice.slice/ovt-myservice.service: No such file or directory
Apr 26 08:18:27 myhost systemd[11189]: ovt-myservice.service: Failed at step CGROUP spawning /usr/share/fold/systemd/ovt-myservice.sh: No such file or directory
Apr 26 08:18:27 myhost systemd[1]: ovt-myservice.service: Control process exited, code=exited, status=219/CGROUP