Search code examples
pythondjangoherokufirefoxgunicorn

Unable to deploy Django app to heroku using heroku local


Novice here.

Trying to deploy my Django app to Heroku and I get an Unable to connect from the Firefox browser (I tried Chrome as well with similar results). I'm having a lot of trouble troubleshooting where exactly the problem is? Heroku local? Gunicorn? Browser Firewall? Django Settings? enter image description here What I have done.

  1. Added the django_heroku import to settings.py enter image description here

  2. Tried to ensure My browser(Firefox) is not blocking pop-ups etc. Firefox -> settings-> Privacy and security -> permissions-> Uncheck Block pop-up windows enter image description here

  3. Ensured my app works on with just gunicorn I run gunicorn project3.wsgi in my terminal (project3 is the directory for my wsgi file) which works

enter image description here

enter image description here

  1. I have the same command in my Procfile, uppercase 'P' (web: gunicorn project3.wsgi). However when I run the command 'heroku local' The browser opens up on clicking the link, but I get an error. Any assistance would be appreciated. I am running commands using windows WSL Heroku Local

Solution

  • Even though 0.0.0.0 is valid IP, it is not usable as a real IP address.

    You can use either http://localhost:5000 or http://127.0.0.1:5000/

    In the Internet Protocol Version 4, the address 0.0.0.0 is a non-routable meta-address used to designate an invalid, unknown or non-applicable target. This address is assigned specific meanings in a number of contexts, such as on clients or on servers.

    You can read more about 0.0.0.0 here