mb728955
By:
mb728955

Internal server error setting up django app

July 10, 2014 4.1k views

I'm setting up a new django app and all I see on my IP is 'Internal server error'. I need to troubleshoot but can't find any relevant error logs — /var/log/nginx and /var/log/gunicorn show me nothing. Can someone please guide me to the proper error log? thanks

2 comments
  • Are you using the one-click Django image?

  • Yes. I was actually able to see the error log after restarting nginx a few times, and this is the error I see:

    2014/07/11 02:33:38 [error] 24994#0: *30 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 24.130.185.66, server: _, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:9000/", host: "104.131.255.132"
    2014/07/11 02:33:39 [error] 24994#0: *30 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 24.130.185.66, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:9000/favicon.ico", host: "104.131.255.132"

    Any idea what could be the problem?
    Thanks!

1 Answer

I figured out my errors but only after I found my gunicorn error log. The whole time I thought that if any errors occurred, they would be in /var/log/gunicorn/ (which was empty), but it turns out they are in /var/log/upstart/gunicorn.log which wasn't at all obvious.

Have another answer? Share your knowledge.