django-docker-bootstrap icon indicating copy to clipboard operation
django-docker-bootstrap copied to clipboard

Nginx giving 502 Bad Gateway error

Open akashpatni opened this issue 9 years ago • 4 comments

Hi,

I am using production-docker-compose.yml file to run the project but its giving me 502 error I have check the nginx logs and found this error:

2016/09/29 05:38:28 [crit] 11#11: *1 connect() to unix:///data/sock/uwsgi.so ck failed (2: No such file or directory) while connecting to upstream, clien t: 172.17.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "uw sgi://unix:///data/sock/uwsgi.sock:", host: "0.0.0.0", referrer: "http://0.0 .0.0/"

and in my project setup I have no data folder.

Any help on this.

Thanks in advance

akashpatni avatar Sep 29 '16 06:09 akashpatni

Try to start the Nginx container with shell: dc run --rm nginx shell

Then check the /data/sock/uwsgi.sock file and If it's not there then you should create it.

legios89 avatar Sep 29 '16 06:09 legios89

Hi,

I have create file in mention folder but now it is giving connection refused error.

can you please forward me the uwsgi.sock file.

Thanks

akashpatni avatar Sep 29 '16 10:09 akashpatni

Can you show me the error message? It sounds like a permission problem, try to set the file permission to 777 and if it will start then we found the problem, but without the error message, I am just guessing.

legios89 avatar Sep 29 '16 10:09 legios89

Hi

I am getting this error

2016/09/29 13:10:02 [error] 12#12: *1 connect() failed (111: Connection refu sed) while connecting to upstream, client: 172.17.0.1, server: 192.168.5.143 , request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://127.0.0.1:8001", host: "localhost", referrer: "http://localhost/"

akashpatni avatar Sep 29 '16 13:09 akashpatni