No web processes running [duplicate] - heroku

error H14 happen while deploying to heroku
this is my procfile:
web: gunicorn -w 4 -b 0.0.0.0:$PORT -k gevent main:app
log on heroku:
2017-01-23T10:42:58.904480+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=meetcapstone.herokuapp.com request_id=df88efb5-a81a-4ac0-86dc-4e03d71266bb fwd="81.218.117.137" dyno= connect= service= status=503 bytes=
2017-01-23T10:42:59.009135+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=meetcapstone.herokuapp.com request_id=21cea981-36b0-4410-891f-548bbc29f0ee fwd="81.218.117.137" dyno= connect= service= status=503 bytes=
requirements:
Flask==0.11.1
passlib==1.7.0
SQLAlchemy==1.1.5
Werkzeug==0.11.15
gunicorn==19.0.0
gevent==1.2.1

The issue here is that you're not running any web dynos. You can tell Heroku to do this via:
$ heroku ps:scale web=1
This will force Heroku to spin up a web dyno, thereby executing your gunicorn command.

After 3 hours of debugging, I've figured out why my app was causing this error:
My Procfile was incorrectly cased
gunicorn wasn't installed in my venv
IMO, this error should be raised on Heroku's end. As a beginner, this sort of error is difficult to trace.
Update:
To clarify, Procfile is correctly cased and procfile is not correctly cased. It should start with a capital "P".
More info on dyno configuration – more on initializing your heroku app.

I ran into the same problem but from a different cause. I had the hobby tier, but then canceled it and reverted back to the free tier. Doing this caused the error and how I fixed it was just re running the command from the cli:
heroku ps:scale web=1

Before this command:
heroku ps:scale web=1
I had to remove and add buildpacks again and empty commit it and redeploy it to heroku.
heroku buildpacks:clear
heroku buildpacks:add --index heroku/python

I was having an issue here too. My problem was that my Procfile was "Procfile.txt" .
What solved my issue was to remove the file extension from Procfile, then recommit
and push stuff to heroku

Login to your Heroku dashboard and open your projects.
Go to Settings.
Delete heroku/python from the list of buildpacks
Then click Add buildpack → Choose "Python" → Save Changes.
Activate your environment in your code.
Run heroku ps:scale web=1.
And you're done!

This isn't the problem with your code, but I've gotten this error message a couple of times now and the mistake that I've made that has caused it has been writing
web:gunicorn
instead of
web: gunicorn
That space can really cause a lot of issues.

My issue is that Heroku removed the free plans. To solve such an issue go to Heroku and select/change your free plan to for example "eco" plan.

I have a UAT version I only enable during client development.
I have a custom dyno script but it's turned to the free version. So the app was not starting as my script was not running. When I enabled the Dyno the toggle was still off :rolleyes:

I don't have the reputation to reply to the correct comment, but for me the issue was that I didn't have the run.gunicorn.sh file in my root directory, this resulted in the same "No web processes running" error.
If you don't have this file, create it with contents:
gunicorn -b :5000 --access-logfile - --error-logfile - build:app
Where 'build' is the name of your python file (build.py in this case) and app is the name of your app in the code.
Also make sure that gunicorn is included in requirements.txt, like others have already pointed out.

Yeah I was also using web heroku-php-apache2 dyno and reverted it back to free tier and that caused the dyno to sleep fortunately executing heroku ps:scale web=1 -a <app name> did the magic.

Change your Procfile file from
web:gunicorn to web gunicorn (remove the ':')

I fixed the issue by going to Configure Dynos and enabling the only dyno I had manually.

uff..that took some time,so the fixes i had to make were:
'Procfile' with upper case P.
web: gunicorn wsgi:app (with a space after web: in procfile)
Making sure the requirements.txt are in the root project folder.

I was missing dynos on the web gui. The cli command to scale did not work. I also may have had an incorrect run:web declaration with missing $PORT. To fix:
heroku.yml must have a web declaration using the $PORT var:
build:
docker:
web: Dockerfile
run:
web: uvicorn main:app --reload --host 0.0.0.0 --port $PORT
I then pushed to heroku.
After that it must have added the web dyno, I could then run:
heroku ps:scale web=1
And now the fastapi uvicorn runs.

Pay attention to the Procfile naming and location (https://devcenter.heroku.com/articles/procfile) The Procfile is always a "simple text file" that is named Procfile without a file extension.(Procfile.txt not acceptable!) The Procfile must live in your app's root directory. It does not function if placed anywhere else.

Faced the exact same problem turns out I had the Profile in .gitignore

I was placing my django Procfile in the directory with settings.py and not the root directory and that gave me the H14 error. I fixed the error with this and I didn't need to do anything else they say.
Procfile
web: gunicorn <django-root-name(containing wsgi)>.wsgi

There are many things that can go wrong here. Its a combination of poor shepherding by heroku and ambiguous use between flask & gunicorn.
Here is a good guide that will get you up and running:

To anyone who may come across this...
delete your Procfile
create 'Procfile' with upper case P.
in your Procfile type: web: gunicorn <nameOfRootFile>:app (with a space after web: in procfile) mine for example was web: gunicorn app:app another way I wrote it that worked was this: web: gunicorn -w 4 "app:create_app()" -t 120
Making sure the requirements.txt are in the root project folder. (you can run pip freeze > requirements.txt if you do not have the file created
deploy to heroku
heroku ps:scale web=1 (you can specify app name to like this heroku ps:scale web=1 -a appname
finally in terminal run heroku restart
heroku open
these are all the steps i took to get mine to work

web: gunicorn weather.wsgi --log-file -
this worked for me, just make sure your Procfile is in the right format, and specify the app you are connecting to, in my case it's the weather app. Enjoy

What worked for me was adding on the second line of the procfile:
heroku ps:scale web=1
The first line must contain:
web: gunicorn "filename":"main method name"

Related

heroku[router]: at=error code=H14 desc="No web processes running" [duplicate]

error H14 happen while deploying to heroku
this is my procfile:
web: gunicorn -w 4 -b 0.0.0.0:$PORT -k gevent main:app
log on heroku:
2017-01-23T10:42:58.904480+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=meetcapstone.herokuapp.com request_id=df88efb5-a81a-4ac0-86dc-4e03d71266bb fwd="81.218.117.137" dyno= connect= service= status=503 bytes=
2017-01-23T10:42:59.009135+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=meetcapstone.herokuapp.com request_id=21cea981-36b0-4410-891f-548bbc29f0ee fwd="81.218.117.137" dyno= connect= service= status=503 bytes=
requirements:
Flask==0.11.1
passlib==1.7.0
SQLAlchemy==1.1.5
Werkzeug==0.11.15
gunicorn==19.0.0
gevent==1.2.1
The issue here is that you're not running any web dynos. You can tell Heroku to do this via:
$ heroku ps:scale web=1
This will force Heroku to spin up a web dyno, thereby executing your gunicorn command.
After 3 hours of debugging, I've figured out why my app was causing this error:
My Procfile was incorrectly cased
gunicorn wasn't installed in my venv
IMO, this error should be raised on Heroku's end. As a beginner, this sort of error is difficult to trace.
Update:
To clarify, Procfile is correctly cased and procfile is not correctly cased. It should start with a capital "P".
More info on dyno configuration – more on initializing your heroku app.
I ran into the same problem but from a different cause. I had the hobby tier, but then canceled it and reverted back to the free tier. Doing this caused the error and how I fixed it was just re running the command from the cli:
heroku ps:scale web=1
Before this command:
heroku ps:scale web=1
I had to remove and add buildpacks again and empty commit it and redeploy it to heroku.
heroku buildpacks:clear
heroku buildpacks:add --index heroku/python
I was having an issue here too. My problem was that my Procfile was "Procfile.txt" .
What solved my issue was to remove the file extension from Procfile, then recommit
and push stuff to heroku
Login to your Heroku dashboard and open your projects.
Go to Settings.
Delete heroku/python from the list of buildpacks
Then click Add buildpack → Choose "Python" → Save Changes.
Activate your environment in your code.
Run heroku ps:scale web=1.
And you're done!
This isn't the problem with your code, but I've gotten this error message a couple of times now and the mistake that I've made that has caused it has been writing
web:gunicorn
instead of
web: gunicorn
That space can really cause a lot of issues.
My issue is that Heroku removed the free plans. To solve such an issue go to Heroku and select/change your free plan to for example "eco" plan.
I have a UAT version I only enable during client development.
I have a custom dyno script but it's turned to the free version. So the app was not starting as my script was not running. When I enabled the Dyno the toggle was still off :rolleyes:
I don't have the reputation to reply to the correct comment, but for me the issue was that I didn't have the run.gunicorn.sh file in my root directory, this resulted in the same "No web processes running" error.
If you don't have this file, create it with contents:
gunicorn -b :5000 --access-logfile - --error-logfile - build:app
Where 'build' is the name of your python file (build.py in this case) and app is the name of your app in the code.
Also make sure that gunicorn is included in requirements.txt, like others have already pointed out.
Yeah I was also using web heroku-php-apache2 dyno and reverted it back to free tier and that caused the dyno to sleep fortunately executing heroku ps:scale web=1 -a <app name> did the magic.
Change your Procfile file from
web:gunicorn to web gunicorn (remove the ':')
I fixed the issue by going to Configure Dynos and enabling the only dyno I had manually.
uff..that took some time,so the fixes i had to make were:
'Procfile' with upper case P.
web: gunicorn wsgi:app (with a space after web: in procfile)
Making sure the requirements.txt are in the root project folder.
I was missing dynos on the web gui. The cli command to scale did not work. I also may have had an incorrect run:web declaration with missing $PORT. To fix:
heroku.yml must have a web declaration using the $PORT var:
build:
docker:
web: Dockerfile
run:
web: uvicorn main:app --reload --host 0.0.0.0 --port $PORT
I then pushed to heroku.
After that it must have added the web dyno, I could then run:
heroku ps:scale web=1
And now the fastapi uvicorn runs.
Pay attention to the Procfile naming and location (https://devcenter.heroku.com/articles/procfile) The Procfile is always a "simple text file" that is named Procfile without a file extension.(Procfile.txt not acceptable!) The Procfile must live in your app's root directory. It does not function if placed anywhere else.
Faced the exact same problem turns out I had the Profile in .gitignore
I was placing my django Procfile in the directory with settings.py and not the root directory and that gave me the H14 error. I fixed the error with this and I didn't need to do anything else they say.
Procfile
web: gunicorn <django-root-name(containing wsgi)>.wsgi
There are many things that can go wrong here. Its a combination of poor shepherding by heroku and ambiguous use between flask & gunicorn.
Here is a good guide that will get you up and running:
To anyone who may come across this...
delete your Procfile
create 'Procfile' with upper case P.
in your Procfile type: web: gunicorn <nameOfRootFile>:app (with a space after web: in procfile) mine for example was web: gunicorn app:app another way I wrote it that worked was this: web: gunicorn -w 4 "app:create_app()" -t 120
Making sure the requirements.txt are in the root project folder. (you can run pip freeze > requirements.txt if you do not have the file created
deploy to heroku
heroku ps:scale web=1 (you can specify app name to like this heroku ps:scale web=1 -a appname
finally in terminal run heroku restart
heroku open
these are all the steps i took to get mine to work
web: gunicorn weather.wsgi --log-file -
this worked for me, just make sure your Procfile is in the right format, and specify the app you are connecting to, in my case it's the weather app. Enjoy
What worked for me was adding on the second line of the procfile:
heroku ps:scale web=1
The first line must contain:
web: gunicorn "filename":"main method name"

Heroku won't recognize Procfile in dynos at dashboard

Im trying to host my object detection api on heroku but i can't due to it not recognizing my
Procfile, which is a file and not a text file. the way its spelled is Procfile, its contents are
web:gunicorn app:app
the way i know that its the Procfile thats the problem is because when i run bash and look at the root directory of the heroku git i see Procfile but when i look at the logs i see that no web process is running and on the dashboard the dynos is completely empty.
i've tried doing
web: gunicorn app: app instead of web:gunicorn app:app
to no avail, i've made sure that gunicorn is in the requirements.txt and know that its pip installing the requirements.txt as the cmd tells me that it is when i do git push heroku master. i've tried doing echo>Procfile and then modifying the contents of the file. i've tried both echo "web:gunicorn app:app"> Procfile and echo web:gunicorn app:app>Procfile i tried doing heroku ps:scale web=1 and get Scaling web dynos... failed ! No such process type web defined in Procfile. and when i do heroku ps i get nothing

Couldn't find that process type (web)

So I'm doing a university group project and we are demonstrating tomorrow. It's a flask API and I'm hosting with Heroku. At first I got this error
code=H14 desc="No web processes running"
After looking around I found a solution to scale dynos with :
heroku ps:scale web=1
Which in turn failed, resulting in this error
Couldn't find that process type (web)
I have no idea what is going wrong. My Procfile is named correctly and updated (no .txt at the end). Any help would be greatly appreciated.
My Procfile:
web:gunicorn api_prediction:medi-ai
Where "api-prediction" is the python file to run and "medi-ai is the project name"
Example for the Procfile
#filename: Procfile
web: gunicorn runserver:app --log-file=-
Example for the gunicorn
# filename: run.gunicorn.sh
gunicorn -b :5000 --access-logfile - --error-logfile - runserver:app
Also install gunicorn and dont miss the requirements.txt file too.
pip install gunicorn
pip freeze > requirements.txt
If this doesn't resolved your issue please reply.

Procfile in Heroku

Can somebody help me regarding on how can i solve my problem on Heroku. Im new to Heroku.
This warning always appear. WARNING:No Procfile detected, using the default web server (webrick). Im using Rails 4. Thank in advance
The error itself is pretty self-explanatory. No Procfile is detected, so in your root directory create a file called Procfile.
As you stated in your comment you are using the Unicorn server so inside the Procfile put this code.
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
I am assuming you created a unicorn.rb file
push to github, push to heroku and see if that works.
The Procfile holds the command for starting the server, and any options you need to pass to that. Your app was crashing because the command to start the server was not there at all.

Error H14 (No web processes running) deploy on Heroku

I try to create simple java App on Heroku.
I following step by step from http://samuelsharaf.wordpress.com/2011/11/06/create-a-simple-java-web-app-using-maven-and-upload-to-heroku/ to do it.
But when i try to deploy my app on heroku project i got error message like bellow when i try to view log
$ heroku logs -t
2012-07-10T02:15:14+00:00 heroku[slugc]: Slug compilation started
2012-07-10T02:15:27+00:00 heroku[api]: Add shared-database:5mb add-on by anwar#meruvian.org
2012-07-10T02:15:27+00:00 heroku[api]: Release v2 created by anwar#meruvian.org
2012-07-10T02:15:27+00:00 heroku[api]: Add MAVEN_OPTS, PATH, JAVA_OPTS config by anwar#meruvian.org
2012-07-10T02:15:27+00:00 heroku[api]: Release v3 created by anwar#meruvian.org
2012-07-10T02:15:28+00:00 heroku[api]: Release v4 created by anwar#meruvian.org
2012-07-10T02:15:28+00:00 heroku[api]: Deploy cb1cfa2 by anwar#meruvian.org
2012-07-10T02:15:28+00:00 heroku[web.1]: State changed from starting to down
2012-07-10T02:15:28+00:00 heroku[slugc]: Slug compilation finished
2012-07-10T02:16:51+00:00 heroku[router]: Error H14 (No web processes running) -> GET fierce-ocean-9944.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
This is my url on heroku :
http://fierce-ocean-9944.herokuapp.com/
What that error ?
How to solve this ?
Thanks
Have you tried scaling one of your process types? e.g. heroku ps:scale web=1
Or rather, check what's your current web count by using 'heroku ps'
See https://devcenter.heroku.com/articles/scaling
I kept running into the same problem. The sample python application ran fine, but mine did not. I logged into the dashboard and noticed that the web dyno count for my app showed zero. So I bumped it up on the web gui (i.e., strech the slider widget until you get a non-zero count.) and that worked. My dashboard also showed the heroku ps:scale web=1 dyno at zero, and I left it as zero.
You need to remove your ProcFile and add again
git rm ProcFile –f
Again add the ProcFile to project
Check the spellings
Content structure of the ProcFile
ProcFile should not contain any extensions.
After that do the normal git procedure,
git add .
git commit –m “add procfile”
git push heroku master
You will see,
Procfile declares types -> web
Instead of
Procfile declares types -> (none)
If you are using a container to build a web application, create a heroku.yaml file like this in your project's root:
build:
docker:
web: Dockerfile
run:
web: [PUT YOUR CMD COMMAND IN DOCKERFILE HERE]
Then add heroku.yaml to git repository. You can remove Procfile (optional). Finally deploy your repository as the following:
git add .
git commit -m "Add heroku.yml"
heroku stack:set container -a [YOUR APP NAME]
git push heroku master
If your are pushing to heroku for the first time, you should run heroku git:remote -a [YOUR APP NAME] before git push heroku master

Resources