200 connect() 到 unix:/tmp/uwsgi.sock 失败
200 connect() to unix:/tmp/uwsgi.sock failed
我正在 EC2 上使用 uwsgi 配置 nginx,我在文件中检查了日志
/var/log/nginx/error.log
.
我收到这个错误:
200 connect() to unix:/tmp/uwsgi.sock failed (2: No such file or directory) while connecting to upstream
我的 uwsgi.sock 位置是 /var/www/myapp/
如何在配置中将文件位置从 uwsgi://unix:/tmp/uwsgi.sock
更改为 uwsgi://unix:/var/www/myapp/
?
你还没有回复我的评论:
What is the full error_log from nginx? Does it mention any sort of duplicates of anything? ;) – cnst Jun 28 at 18:54
我问的原因是 Debian 上的默认配置 sites-available/
和 sites-enabled/
目录有一个 include
不会忽略战略性放置的备份文件(比如那些以 ~
结尾的)。
我曾经浪费大量时间尝试 "quickly" 做一些 PoC,只是感到困惑为什么我知道 100% 应该完全有效的东西不起作用,为什么我的 error_log
报告一些神秘的 bind(2)
问题:
23:46:38 [emerg] 25509#0: bind() to [::]:80 failed (98: Address already in use)
这可能是经典命名空间 Temp 的问题,请参阅:http://fedoraproject.org/wiki/Features/ServicesPrivateTmp
但是您提到您已将 sock 位置设置为您的应用程序目录,您是否在该虚拟主机的 nginx 配置中完成了该操作?您肯定需要重新启动您的网络服务器才能使更改生效。
请参考这个问题及其答案,这在这种情况下可能会有用。
请参考nginx.conf文件中提到uwsgi_pass的部分。如果您没有进行此类更改,请这样做并重新启动网络服务器。我觉得一定能解决问题。
我正在 EC2 上使用 uwsgi 配置 nginx,我在文件中检查了日志
/var/log/nginx/error.log
.
我收到这个错误:
200 connect() to unix:/tmp/uwsgi.sock failed (2: No such file or directory) while connecting to upstream
我的 uwsgi.sock 位置是 /var/www/myapp/
如何在配置中将文件位置从 uwsgi://unix:/tmp/uwsgi.sock
更改为 uwsgi://unix:/var/www/myapp/
?
你还没有回复我的评论:
What is the full error_log from nginx? Does it mention any sort of duplicates of anything? ;) – cnst Jun 28 at 18:54
我问的原因是 Debian 上的默认配置 sites-available/
和 sites-enabled/
目录有一个 include
不会忽略战略性放置的备份文件(比如那些以 ~
结尾的)。
我曾经浪费大量时间尝试 "quickly" 做一些 PoC,只是感到困惑为什么我知道 100% 应该完全有效的东西不起作用,为什么我的 error_log
报告一些神秘的 bind(2)
问题:
23:46:38 [emerg] 25509#0: bind() to [::]:80 failed (98: Address already in use)
这可能是经典命名空间 Temp 的问题,请参阅:http://fedoraproject.org/wiki/Features/ServicesPrivateTmp
但是您提到您已将 sock 位置设置为您的应用程序目录,您是否在该虚拟主机的 nginx 配置中完成了该操作?您肯定需要重新启动您的网络服务器才能使更改生效。
请参考这个问题及其答案,这在这种情况下可能会有用。
请参考nginx.conf文件中提到uwsgi_pass的部分。如果您没有进行此类更改,请这样做并重新启动网络服务器。我觉得一定能解决问题。