在Raspberry Pi中的Debian 8上使用nginx和uwsgi,我尝试运行存储在/ var / www / html / display_air_quality目录中的烧瓶和python程序。
当我运行sudo systemctl start uwsgi_display_air_quality时,它无法启动该服务。在systemctl status uwsgi_display_air_quality.service中,错误显示如下。
uwsgi_display_air_quality.service - uWSGI display air quality
Loaded: loaded (/etc/systemd/system/uwsgi_display_air_quality.service; disabled)
Active: failed (Result: start-limit) since 수 2017-11-01 19:16:00 KST; 2min 45s ago
Process: 1936 ExecStart=/var/www/html/display_air_quality/venv/bin/uwsgi --master --emperor /var/www/html/display_air_quality/uwsgi.ini --die-on-term --uid jisoo --gid jisoo --logto /var/www/html/display_air_quality/log/emperor.log (code=exited, status=203/EXEC)
Main PID: 1936 (code=exited, status=203/EXEC)
11월 01 19:16:00 raspberrypi systemd[1]: Failed to start uWSGI display air quality.
11월 01 19:16:00 raspberrypi systemd[1]: Unit uwsgi_display_air_quality.service entered failed state.
=============================================== ===================
sudo jounalctl -xe显示以下错误。
11월 01 19:16:00 raspberrypi systemd[1]: Stopping uWSGI display air quality...
-- Subject: Unit uwsgi_display_air_quality.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit uwsgi_display_air_quality.service has begun shutting down.
11월 01 19:16:00 raspberrypi systemd[1]: Starting uWSGI display air quality...
-- Subject: Unit uwsgi_display_air_quality.service has begun with start-up
-- Defined-By: systemd
-- Unit uwsgi_display_air_quality.service has begun starting up.
11월 01 19:22:57 raspberrypi sshd[1984]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=176.62.210.193 user=root
11월 01 19:27:49 raspberrypi sudo[2003]: jisoo : TTY=pts/0 ;
PWD=/var/www/html/display_air_quality ; USER=root ; COMMAND=/bin/journalctl -xe
11월 01 19:27:49 raspberrypi sudo[2003]: pam_unix(sudo:session): session opened for user root by jisoo(uid=0)
=============================================== ========================== /etc/nginx/sites-enabled/display_air_quality.conf是:
server {
listen 80;
real_ip_header X-Forwarded-For;
set_real_ip_from 127.0.0.1;
server_name localhost;
location / {
include uwsgi_params;
uwsgi_pass unix:/var/www/html/display_air_quality/socket.sock;
uwsgi_modifier1 30;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html{
root /usr/share/nginx.html;
}
}
=============================================== =======================
/var/www/html/display_air_quality/uwsgi.ini是
[uwsgi]
base = /var/www/html/display_air_quality
app = run
module = %(app)
home = %(base)/venv
pythonpath = %(base)
socket = %(base)/socket.sock
chmod-socket = 777
processes = 8
threads = 8
harakiri = 15
callable = app
logto = /var/www/html/display_air_quality/log/%n.log
=============================================== ======================== /etc/systemd/system/uwsgi_display_air_quality.service的文件内容是
[Unit]
Description=uWSGI display air quality
[Service]
Environment=DATABASE_URL=postgres://xxxxxxxxxxx@localhost:5432/xxxx
ExecStart=/var/www/html/display_air_quality/venv/bin/uwsgi --master --
emperor /var/www/html/display_air_quality/uwsgi.ini --die-on-term --uid
jisoo --gid jisoo --logto /var/www/html/display_air_quality/log/emperor.log
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target
=============================================== ========================
有没有人请帮助我找出错误发生的原因?