简体   繁体   中英

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

the solution is disabling SElinux "sudo setenforce Permissive".

Thank you very much

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM