2017年2月7日 星期二

uwsgi unix domain socket error

uwsgi unix domain socket error

Nginx Error Message

2017/02/08 14:33:15 [crit] 31592#31592: *1 connect() to unix:///tmp/service.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.10, server: beta-hello.com, request: "GET /traffic_funnel HTTP/1.1", upstream: "uwsgi://unix:///tmp/service.sock:", host: "beta-hello.com"

解決辦法

原本都是把socket放在 /tmp 下,但好像每個服務看到的 /tmp 是不一樣的,所以還放在 /var/run 或是放在 /run 底下才會正常

原文

You can't place sockets intended for interprocess communication in /tmp.
For security reasons, recent versions of Fedora use namespaced temporary directories, meaning every service sees a completely different /tmp and can only see its own files in that directory.
To resolve the issue, place the socket in a different directory, such as /run (formerly known as /var/run).

Reference

沒有留言:

張貼留言