0

I created a django website and was trying to deploy it to heroku. I followed this tutorial and did everything he did but i'm getting these errors in the logs

2020-07-10T02:06:01.015381+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=website.herokuapp.com request_id=9efff235-77f8-41e8-bc9e-9f80bd2b6aa1 fwd="172.98.86.231" dyno= connect= service= status=503 bytes= protocol=https

2020-07-10T02:06:01.743381+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=website.herokuapp.com request_id=bf2f44a0-8f5c-4e63-a1c9-e16a33761803 fwd="172.98.86.231" dyno= connect= service= status=503 bytes= protocol=https

my procfile has these contents

web: gunicorn website.wsgi --log-file -

my requirements.txt includes these

asgiref==3.2.3
Django==2.1.7
pytz==2019.3
sqlparse==0.3.0
SQLAlchemy==1.3.9
psycopg2==2.8.4
Jinja2==2.10.3
gunicorn==20.0.4

I used to get the same HTTP errors when running the site locally but the site used to render and work properly. I'm getting the same error in heroku but site is not working

Can someone explain what these error means and how to fix them or you could also reply with a link to a video or documentation you used to deploy your website and worked

baisbdhfug
  • 548
  • 1
  • 4
  • 14
  • 1
    would this help? https://stackoverflow.com/questions/41804507/h14-error-in-heroku-no-web-processes-running – ewokx Jul 10 '20 at 02:45
  • Nope i took a look at it but it wasn't relevant. I used to get the same HTTP errors when running the site locally but the site used to render and work properly. I'm getting the same error in heroku but site is not working – baisbdhfug Jul 10 '20 at 02:56

3 Answers3

1

I figured it out. In my case I renamed the "procfile" to "Procfile" updated the contents of the procfile to

web: gunicorn website.wsgi:application --log-file -
python manage.py collectstatic --noinput
manage.py migrate

and this worked

baisbdhfug
  • 548
  • 1
  • 4
  • 14
0

You are facing this problem because Gunicorn is not running.

Try running this command on your local computer: "gunicorn website.wsgi --log-file - " does it run?

Are there any build errors from Heroku?

Aayush Agrawal
  • 1,354
  • 1
  • 12
  • 24
  • I tried to run the code but since i'm on windows i'm getting the error ModuleNotFoundError: No module named 'fcntl' and no there aren't any build errors the only errors i get are mentioned above and the same error keeps on repeating – baisbdhfug Jul 10 '20 at 09:58
0

I faced the same problem and the problem was simple: I forgot to put gunicorn to requirements.txt, so the heroku server did not install the needed package. I added gunicorn to requirements.txt, pushed again, and it worked for me!

STerliakov
  • 4,983
  • 3
  • 15
  • 37
Hayotbek
  • 1
  • 1