1

On centos 7 with nginx 1.10.2 and uwsgi 2.0.14

When I configure uwsgi to open a socket in /var/tmp/uwsgi or in /tmp, I go a message from nginx saying it cannot find the socket file :

2017/06/07 16:54:53 [crit] 2642#0: *7 connect() to unix:///tmp/mywebsite.socket failed (2: No such file or directory) while connecting to upstream, client: 108.162.245.185, server: _, request: "GET /share/3years/music/guitarists/django_reinhardt HTTP/1.1", upstream: "uwsgi://unix:///tmp/mywebsite.socket:", host: "mywebsite.com"
2017/06/07 17:22:11 [crit] 1327#0: *2 connect() to unix:///var/tmp/uwsgi/mywebsite.socket failed (2: No such file or directory) while connecting to upstream, client: 5.158.200.123, server: _, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///var/tmp/uwsgi/mywebsite.socket:", host: "mywebsite.com"

If I use "unix:///var/uwsgi/mywebsite.socket" (without '/tmp/') there is no problem at all. In three cases directories are in 1777, the socket file permissions give read/write access to nginx user and nginx socket path match uwsgi socket path in configuration files. SELinux is disabled.

So why I cannot use /var/tmp or /tmp to create a socket for nginx/uwsgi : many examples said it was possible ?

Eric
  • 229
  • 4
  • 15
  • Is three slashes after "unix:" correct? Interesting error chain, I suspect if you approach it one part at a time you'll crack it. – Tim Jun 08 '17 at 07:33
  • 1
    Yes there is 3 slashes : unix:// is the protocol and /var/tmp/uwsgi/mywebsite.socket the socket. Many docs use this format. With one slash, the problem is the same – Eric Jun 09 '17 at 09:45
  • I'm having the same issue on CentOS-7 with gunicorn and nginx. I've been at it all day. – NYCeyes Sep 22 '17 at 21:22

0 Answers0