Nginx+uwsgi+django death report 502?

Environment: ubuntu
proxy django service with nginx+uwsgi
configuration of uwsgi:

clipboard.png

nginx configuration:
location / opsmanage {

    include  /opt/openresty/nginx/conf/uwsgi_params;
    root /opt/apps/OpsManage;
    uwsgi_pass  opsmanage;
    -sharpuwsgi_pass  unix:/opt/apps/OpsManage/OpsManage.sock;
    -sharpuwsgi_param UWSGI_SCRIPT OpsManage.wsgi;
    -sharpuwsgi_param UWSGI_CHDIR /opt/apps/OpsManage/OpsManage;
    uwsgi_read_timeout 1800;
    uwsgi_send_timeout 300;
    proxy_read_timeout 300;
    access_log      /data/logs/nginx/opsmanage/access.log;
    error_log       /data/logs/nginx/opsmanage/error.log;
}

location /static/ {
    alias /opt/apps/OpsManage/OpsManage/static/;
}
location /media/ {
    alias /opt/apps/OpsManage/OpsManage/media/;
}

nginxweb502nginx:
2018/10/31 15:19:53 [error] 13287-sharp0: *5070820492 connect() failed (111: Connection refused) while connecting to upstream, client: 221.181.101.36, server: api_test.migu.com, request: "GET /opsmanage/ HTTP/1.1", upstream: "http://10.200.23.17:8000/opsmanage/", host: "xxx.xxx.xxx.xxx:8000"

2018-10-31 15:19:58 [error] 13287 connect () failed (sharp0: * 5070820492 connect () failed (111: Connection refused) while connecting to upstream, client: 221.181.101.36, server: api_test.migu.com, request: "GET / opsmanage/ HTTP/1.1", upstream: "http://10.200.23.17:8000/opsmanage/", host:" xxx.xxx:8000



Oct.09,2021

should be an ip restriction. Use the local ip, to use netstat-l to see if the bind is which ip


have you solved it? I have the same problem now

Menu