user3779542
user3779542

Reputation: 29

After machine reboot "unix:/socket/uwsgi.sock failed (13: Permission denied) while connecting to upstream"

9 application integrated to nginx via uwsgi application on Centos7. It was working fine, but then i had to reboot my machine. Now i am having the follwoing issue: unix:/socket/uwsgi.sock failed (13: Permission denied) while connecting to upstream, client: 10.184.160.9, server: 10.184.2.231, request: "GET /", upstream: "uwsgi://unix:/socket/uwsgi.sock:" Any clue?

My ini file:

[uwsgi]
chdir = /home/elastic/workspace/ES_Brevetti
wsgi-file = ES_Brevetti/wsgi.py
master = true
processes = 5
uid = nginx
gid = nginx
socket = /socket/uwsgi.sock
chmod-socket = 666
vacuum = true

nginx.conf

upstream django {
server unix:/socket/uwsgi.sock; # for a file socket
#server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
server {
listen 80;
server_name 10.184.2.231;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
charset utf-8;

location /nuovopatentdb/static {
    alias /home/elastic/workspace/ES_Brevetti/static;
}

location / {
    include         /etc/nginx/uwsgi_params;
    uwsgi_pass      unix:/socket/uwsgi.sock;
}
}

I dont know why i am having this issue?

Further mode should i be creating the sock file anytime the machine is rebooted ?

Thanx valerio

Upvotes: 0

Views: 607

Answers (1)

user3779542
user3779542

Reputation: 29

the solution is disabling SElinux "sudo setenforce Permissive".

Thank you very much

Upvotes: 2

Related Questions