You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04下通过systemd启动手动pip安装的uWSGI时出现Socket未找到问题求助

Ubuntu 22.04下通过systemd启动手动pip安装的uWSGI时出现Socket未找到问题求助

我在Ubuntu 22.04上尝试把手动通过pip安装的uWSGI以systemd服务的方式启动,但至今都没成功。明明服务已经在运行了,可Nginx就是连不上uWSGI的socket,报错信息如下:

2024/05/25 22:46:18 [crit] 25250#25250: *3 connect() to unix:///tmp/website.socket failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: website.django, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///tmp/website.socket:", host: "website.django"

我的systemd服务配置文件uwsgi-django.service内容是这样的:

[Unit]
Description=uWSGI for Django
After=syslog.target

[Service]
ExecStart=/var/www/djangoenv/bin/uwsgi --master --emperor /etc/uwsgi/apps-enabled
Restart=always
User=www-data
Group=www-data
DynamicUser=yes
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all

[Install]
WantedBy=multi-user.target

另外,socket配置文件uwsgi-django.socket的内容如下:

[Unit]
Description=uWSGI for Django

备注:内容来源于stack exchange,提问作者janeden

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 08:53:15