如何修复uwsgi服务在centos 7中启动失败

how to fix uwsgi services failure to start in centos 7

uwsgi.service - uWSGI Emperor service

   Loaded: loaded (/etc/systemd/system/uwsgi.service; disabled; vendor preset: disabled)

   Active: failed (Result: start-limit) since Sun 2016-05-22 05:46:09 EDT; 5min ago

  Process: 6371 ExecStartPre=/usr/bin/bash -c mkdir -p /run/uwsgi; chown user:nginx /run/uwsgi (code=exited, status=1/FAILURE)

May 22 05:46:09 apxyws systemd[1]: Failed to start uWSGI Emperor service.

May 22 05:46:09 apxyws systemd[1]: Unit uwsgi.service entered failed state.

May 22 05:46:09 apxyws systemd[1]: uwsgi.service failed.

May 22 05:46:09 apxyws systemd[1]: uwsgi.service holdoff time over, scheduling restart.

May 22 05:46:09 apxyws systemd[1]: start request repeated too quickly for uwsgi.service

May 22 05:46:09 apxyws systemd[1]: Failed to start uWSGI Emperor service.

May 22 05:46:09 apxyws systemd[1]: Unit uwsgi.service entered failed state.

May 22 05:46:09 apxyws systemd[1]: uwsgi.service failed.

有没有人知道如何解决这样的问题,我仍然是设置这样的新手,一直在寻找答案,但没有与我相似的东西。

我刚开始使用 django 并且它可以使用:

uwsgi --http :8080 --home /root/Env/apxweb --chdir /root/apxweb -w apxweb.wsgi

但是当我开始将它与 nginx 一起使用时, uwsgi 服务启动失败。

注意:nginx 服务有效。

谢谢 Luke Dixon,

是的,问题出在用户内部, 我这样更新文件:

/usr/bin/bash -c mkdir -p /run/uwsgi; chown root:nginx /run/uwsgi

uwsgi 又工作了, 我不知道这是否是修复 uwsgi 的正确方法, 但无论如何还是非常感谢你。