通过systemd启动瓶子web服务器?

use*_*873 7 python bottle python-3.x systemd

我正在尝试启动我使用systemd编写的瓶子web应用程序.我用/etc/systemd/user/bottle.service以下内容制作了文件:

[Unit]
Description=Bottled fax service
After=syslog.target

[Service]
Type=simple
User=fax
Group=fax
WorkingDirectory=/home/fax/bottlefax/
ExecStart=/usr/bin/env python3 server.py
StandardOutput=syslog
StandardError=syslog
Restart=always
RestartSec=2

[Install]
WantedBy=bottle.target
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试启动它时,它会失败,并打印在journalctl:

Jun 10 17:33:31 nano systemd[1]: Started Bottled fax service.
Jun 10 17:33:31 nano systemd[1]: Starting Bottled fax service...
Jun 10 17:33:31 nano systemd[2380]: Failed at step GROUP spawning /usr/bin/env: No such process
Jun 10 17:33:31 nano systemd[1]: bottle.service: main process exited, code=exited, status=216/GROUP
Jun 10 17:33:31 nano systemd[1]: Unit bottle.service entered failed state.
Jun 10 17:33:31 nano systemd[1]: bottle.service failed.
Run Code Online (Sandbox Code Playgroud)

我该怎么解决这个问题?

编辑:

更改/usr/bin/python3为其他人已建议导致相同的错误(虽然已更改文件):

Jun 10 18:43:48 nano systemd[1]: Started Bottled fax service.
Jun 10 18:43:48 nano systemd[1]: Starting Bottled fax service...
Jun 10 18:43:48 nano systemd[2579]: Failed at step GROUP spawning /usr/bin/python3: No such process
Jun 10 18:43:48 nano systemd[1]: bottle.service: main process exited, code=exited, status=216/GROUP
Jun 10 18:43:48 nano systemd[1]: Unit bottle.service entered failed state.
Jun 10 18:43:48 nano systemd[1]: bottle.service failed.
Run Code Online (Sandbox Code Playgroud)

小智 4

我本来会发表评论,但我不能:/

您是否尝试过使用绝对路径之类的方法?

ExecStart=/usr/bin/python3 /path/to/your/server.py
Run Code Online (Sandbox Code Playgroud)

这是我在这里看到的唯一问题。