简体   繁体   中英

Starting process with command `gunicorn app:app` Exited with status 126

I have a python flask app deployed to heroku.

After the build completes, this is the log.

2021-05-15T17:58:00.000000+00:00 app[api]: Build started by user xxx
2021-05-15T17:58:39.006534+00:00 app[api]: Deploy 23e180a8 by user xxx
2021-05-15T17:58:39.006534+00:00 app[api]: Release v29 created by xxx
2021-05-15T17:58:39.356233+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-15T17:58:44.631213+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2021-05-15T17:58:46.642208+00:00 heroku[web.1]: Process exited with status 126
2021-05-15T17:58:46.707103+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-15T17:58:46.591536+00:00 app[web.1]: Error: No such file or directory
2021-05-15T17:58:49.000000+00:00 app[api]: Build succeeded

These are the contents in my Procfile

web: gunicorn app:app

I have the main file name as app.py

And these are the requirements.txt

app-version==1.0.1
APScheduler==3.6.3
certifi==2020.12.5
chardet==3.0.4
click==8.0.0
Werkzeug==2.0.0
Flask==2.0.0
gunicorn==20.1.0
idna==2.8
Jinja2==3.0.0
MarkupSafe==2.0.0
notify==0.3.1
notify-run==0.0.13
PyQRCode==1.2.1
pytz==2021.1
requests==2.22.0
selenium==3.141.0
six==1.16.0
tornado==6.1
tzlocal==2.1
urllib3==1.25.11
validate-email==1.3

Added these using pip freeze. Any idea whats going wrong?

https://docs.gunicorn.org/en/latest/run.html Format for Procfile if you using gunicorn: gunicorn [OPTIONS] [WSGI_APP]

"web: gunicorn app:app" - it is mean file app.py has function app that run application, and file app.py saved on root of project. Check patch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM