Answer the question
In order to leave comments, you need to log in
The systemd service/service stops for no apparent reason. Why?
Twice in a year there was a situation that the systemd service stopped for some unknown reason and did not start back automatically
Service - website on flask (python)
I can not analyze the reason who stops the service.
Content
/etc/systemd/system/myservice.service :
[Unit]
Description=My Service
After=network-online.target
After=mysql.service
Requires=network-online.target
Requires=mysql.service
[Service]
User=root
WorkingDirectory=/home/myservice
ExecStart=/usr/bin/python3 /home/myservice/run.py
Restart=always
[Install]
WantedBy=multi-user.target
journalctl -u myservice.servicedoes not display anything critical, no critical termination of the process.
syslogat the time (Feb 4 06:18:19) when the service stopped for no apparent reason: [email protected]
uname-a
Linux tasgas 5.4.0-97-generic #110-Ubuntu SMP Thu Jan 13 18:22:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Answer the question
In order to leave comments, you need to log in
at the time (Feb 4 06:18:19) when the service stopped for no apparent reason:
You have these lines in your log:
Feb 4 06:18:19 ubuntu-server systemd[1]: Reloading.
Feb 4 06:18:19 ubuntu-server systemd[1]: Stopping My Service...
Feb 4 06:18:19 ubuntu-server systemd[1]: myservice.service: Succeeded.
Feb 4 06:18:19 ubuntu-server systemd[1]: Stopped My Service.
Feb 4 06:18:19 ubuntu-server systemd[1]: Stopping MySQL Community Server...
Feb 4 06:18:20 ubuntu-server systemd[1]: mysql.service: Succeeded.
Feb 4 06:18:20 ubuntu-server systemd[1]: Stopped MySQL Community Server.
Feb 4 06:18:20 ubuntu-server systemd[1]: Reloading.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question