By dayscue
Hello guys and girls,
I am getting an error 1078#0 while trying to get my website up and going. Let me give you a chronology of events plus an error log:
I first brought Putty up and went to access my server. I got the Django “It Worked!” message.
After that I went to upgrade my Django and it updated to 1.11. i ran, in the Putty command, “service gunicorn restart”.
Got 502 Bad Gateway
I unistalled Django and was back to version 1.6.1. Refreshed. “Internal Server Error”
So i “pip install django==1.9” and checked version to ensure i was running Django 1.9. “service gunicorn restart”. Restarted. Refreshed. 502 Bad Gateway Error nginx/1.4.6 (Ubuntu).
Here are the errors I am getting when I run “tail -f /var/log/nginx/error.log”: [error] 1078#0: *263 connect() failed (111: Connection refused) while connecting to upstream, client: XX.XXX.XXX.XX, server: _, request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:9000/”, host: “XXX.XXX.X.XX”
Can someone please tell me what is going on here and why? It is very frustrating and getting this website up is mission critical as I have just filed my company and am ready to begin operation.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @dayscue
We need the error log from Gunicorn, since that’s the service not running - Nginx only return the default 502 Bad Gateway, since it cannot connect to anything.
It’s normally located in /var/log/upstart/gunicorn.log but you might run it with a different job name and then you have to look for /var/log/upstart/$JOB_NAME.log.
EDIT: But if you don’t see any logs, then you might need to update your Gunicorn script to include the --error-logfile /path/to/log/file:
http://docs.gunicorn.org/en/stable/settings.html#logging
But since you haven’t used the server yet, then you could just rebuild it (you will lose all data on the server) back to the Django One-Click. If you want to rebuild, go to the DigitalOcean control panel, click the droplet, click the Destroy menu on the left, search for “Django”, select the image and click Rebuild.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.