I have installed gunicorn but when I try to run app.py I get this error.
Hello,
Can you paste the entire error. Copy it from the terminal
and paste it into a code block
and also provide the link to the lab
Thanks
Hi @Alistair_KodeKloud Apologies for the late reply. I tried to reproduced the error but it worked for me this time, however this time I tried to run gunicorn with 3 workers but I get this error:
thor@host01 /opt/simple-webapp-flask$ gunicorn app:app -w 3
[2024-05-03 06:41:28 +0000] [377] [INFO] Starting gunicorn 21.2.0
[2024-05-03 06:41:28 +0000] [377] [ERROR] Connection in use: (‘127.0.0.1’, 8000)
[2024-05-03 06:41:28 +0000] [377] [ERROR] Retrying in 1 second.
[2024-05-03 06:41:29 +0000] [377] [ERROR] Connection in use: (‘127.0.0.1’, 8000)
[2024-05-03 06:41:29 +0000] [377] [ERROR] Retrying in 1 second.
[2024-05-03 06:41:30 +0000] [377] [ERROR] Connection in use: (‘127.0.0.1’, 8000)
[2024-05-03 06:41:30 +0000] [377] [ERROR] Retrying in 1 second.
[2024-05-03 06:41:31 +0000] [377] [ERROR] Connection in use: (‘127.0.0.1’, 8000)
[2024-05-03 06:41:31 +0000] [377] [ERROR] Retrying in 1 second.
[2024-05-03 06:41:32 +0000] [377] [ERROR] Connection in use: (‘127.0.0.1’, 8000)
[2024-05-03 06:41:32 +0000] [377] [ERROR] Retrying in 1 second.
[2024-05-03 06:41:33 +0000] [377] [ERROR] Can’t connect to (‘127.0.0.1’, 8000)
Here is a link to the lab: DevOps Pre-Requisite Course | KodeKloud
All resolved now. The associated port seemed to be in use.