嗨,我制作了telegram bot,并试图将它部署到Ubuntu 18.04上
需求:
firebase==3.0.1
firebase-admin==4.3.0
pyTelegramBotAPI==3.7.1
grpcio==1.29.0
requests==2.23.0我在服务器上安装了这个:
build-essential
libssl-dev
libffi-dev
python3-pip
python3-dev
python3-setuptools
python3-venv 创建venv后,我转到/etc/systemd/system/并创建了uba.service
uba.service
[Unit]
Description=uba
After=network.target
[Service]
User=uba
Group=uba
WorkingDirectory=/home/kokoto/uba/
Environment="PYTHONPATH=/home/kokoto/uba/"
ExecStart=/home/kokoto/uba/.venv/bin/python /home/kokoto/uba/bot_bd.py
[Install]
WantedBy=multi-user.target但是当我运行机器人的时候,我有这样的错误:
uba.service - uba
Loaded: loaded (/etc/systemd/system/uba.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-09-21 17:48:05 MSK; 16h ago
Process: 10282 ExecStart=/home/kokoto/uba/.venv/bin/python /home/kokoto/uba/bot_bd.py (code=exited, status=216/GROUP)
Main PID: 10282 (code=exited, status=216/GROUP)
Sep 21 17:48:05 s307229 systemd[1]: Started uba.
Sep 21 17:48:05 s307229 systemd[10282]: uba.service: Failed to determine group credentials: No such process
Sep 21 17:48:05 s307229 systemd[10282]: uba.service: Failed at step GROUP spawning /home/kokoto/uba/.venv/bin/python: No such process
Sep 21 17:48:05 s307229 systemd[1]: uba.service: Main process exited, code=exited, status=216/GROUP
Sep 21 17:48:05 s307229 systemd[1]: uba.service: Failed with result 'exit-code'.发布于 2020-09-29 11:51:28
我不确定,但可能but使用python2版本。尝试将python更改为python3
ExecStart=/home/kokoto/uba/.venv/bin/python3 /home/kokoto/uba/bot_bd.pyhttps://stackoverflow.com/questions/64011233
复制相似问题