200 connect () for unix: /tmp/uwsgi.sock failed

I am setting up nginx from uwsgi to EC2, I have audit logs in a file /var/log/nginx/error.log

.

I am getting this error:

200 connect () for unix: /tmp/uwsgi.sock failed (2: No such file or directory) while connecting to upstream

At my location uwsgi.sock /var/www/myapp/

How to change file location from uwsgi://unix:/tmp/uwsgi.sock

to uwsgi://unix:/var/www/myapp/

in configuartion?

+3


source to share


2 answers


It might be a classic Temp with namespace issue, see this: http://fedoraproject.org/wiki/Features/ServicesPrivateTmp

but you mentioned that you set the location of your sock to your application directory, did you do this in your nginx config for that virtual host? you will definitely need to restart the web server for the changes to take effect.



Please refer to this question and his answer, which may be helpful in this case. Got an error "No such file or directory" when configuring nginx and uwsgi

See the section where uwsgi_pass is mentioned in the nginx.conf file . if you haven't made any such changes, do so and restart the web server. I think this should fix the problem.

+2


source


You haven't responded to my comment yet:

What is the complete error_log from nginx? Does it describe any duplicates of anything?;) - cnst Jun 28 @ 6:54 pm

The reason I am asking is because the default configuration in Debian with directories sites-available/

and sites-enabled/

has include

that does not ignore strategically placed backup files (for example, the ones that end with ~

).



I once spent a lot of time doing some PoC "quickly", only being puzzled why things didn't work and I know 100% should completely work, and why mine error_log

reports the mysterious bind(2)

:

23:46:38 [emerg] 25509#0: bind() to [::]:80 failed (98: Address already in use)

      

-2


source







All Articles