(111: Connection refused) while connecting to upstream NGINX Uwsgi
Anoop Alias
anoopalias01 at gmail.com
Mon Sep 18 06:48:06 UTC 2017
What is the output of
ls -l /home/workspace/project/tmp/uwsgi.sock
and
ps aux|grep nginx
On Mon, Sep 18, 2017 at 12:13 PM, sandyman <nginx-forum at forum.nginx.org>
wrote:
> after struggling for almost a week on this I feel I need to reach out for
> assistance . Please Help
>
> I am trying to deploy my project to a production environment
>
>
> In terms of permissions I have read all the forums changed all permissions
> i.e. 777 etc etc
> srwxrwxrwx uwsgi.sock (owned by me full access ) !!
> I've checked over and over all the directory structures etc. Ive swtiched
> from unix sockets to http but still
> no joy .
>
> exact error
>
>
> 2017/09/18 06:32:56 [error] 15451#0: *1 connect() to
> unix:////home/workspace/project//
> tmp/uwsgi.sock failed (111: Connection refused) while connecting to
> upstream, client: 1933
> .247.239.160, server: website.xyz, request: "GET / HTTP/1.0", upstream:
> "uwsgi://unix:////
> /home/workspace/project/tmp/uwsgi.sock:", host: "www.website.xyz"
>
>
> Nginx configuration:
>
> upstream _django {
> server unix:////home/workspace/project/tmp/uwsgi.sock;
> }
>
> server {
> listen 62032;
> server_name website.xyz www.website.xyz ;
>
> location = /favicon.ico { access_log off; log_not_found off; }
> location = /test-this { return 200 "Yes, this is correct\n"; }
> location /foo { return 200 "YIKES what a load of codswollop";}
> root /home/workspace/project;
>
> location /static {
> alias /home/workspace/project/testsite/assets;
> }
>
> location /assets {
> root /home/workspace/project/testsite/assets;
> }
>
> location / {
> include /home/workspace/project/uwsgi_params;
> #include uwsgi parameters.
> uwsgi_pass _django;
> #tell nginx to communicate with uwsgi though unix socket
> /run/uwsgi/sock.
> }
>
>
>
>
> uwsgi ini file
>
> # project.ini file
> [uwsgi]
> chdir = /home/workspace/project/testsite
> module=testsite.wsgi:application
> socket = /home/workspace/project/uwsgi.sock
> chmod-socket = 666
> daemonize = /home/workspace/project/tmp/uwsgi.log
> protocol = http
> master = true
> vacuum=true
> max-requests=5000
> processes = 10
>
>
> start script
>
> #! /bin/bash
> PIDFILE=/home/workspace/project/startselvacura.pid
>
> source /home/workspace/project/venv/bin/activate
> uwsgi --ini /home/workspace/project/uwsgi-prod.ini --venv
> /home/workspace/project/venv --pidfile $PIDFILE
> ~
>
>
>
> running https://www.asandhu.xyz/foo
>
> does return the expected result :
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,276427,276427#msg-276427
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
--
*Anoop P Alias*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170918/597fd8dc/attachment.html>
More information about the nginx
mailing list