我们有一个 flask python 应用程序,它在终端上正常运行,没有错误。我们将其转换为 systemd 服务(ubuntu),但问题是该服务正常运行然后突然停止,没有任何错误。使用的操作系统是 ubuntu 桌面 18.04
以下是实际发生情况的示例:
ubuntu-MS-7A72 python[10026]: insert done
ubuntu-MS-7A72 python[10026]: insert done
ubuntu-MS-7A72 python[10026]: insert done
ubuntu-MS-7A72 python[10026]: insert done
ubuntu-MS-7A72 python[10026]: insert done
ubuntu-MS-7A72 python[10026]: insert done
ubuntu-MS-7A72 python[10026]: insert done
ubuntu-MS-7A72 systemd[1]: detection_tracking.service: Main process exited, code=exited, status=1/FAILURE
ubuntu-MS-7A72 systemd[1]: detection_tracking.service: Failed with result 'exit-code'.
ubuntu-MS-7A72 systemd[1]: detection_tracking.service: Service hold-off time over, scheduling restart.
ubuntu-MS-7A72 systemd[1]: detection_tracking.service: Scheduled restart job, restart counter is at 1.
ubuntu-MS-7A72 systemd[1]: Stopped detection service.
ubuntu-MS-7A72 systemd[1]: Started detection service.
ubuntu-MS-7A72 systemd[1]: Stopping detection service...
ubuntu-MS-7A72 systemd[1]: Stopped detection service.
ubuntu-MS-7A72 systemd[1]: Started detection service.