I am using gunicorn and trying to write the upstart script. I am testing the command in the command line and for port 80 it just gets errors
command
gunicorn --bind 0.0.0.0:80 --workers 3 myapp.wsgi:application
log
[2016-10-19 02:36:51 +0000] [12752] [INFO] Starting gunicorn 19.6.0
[2016-10-19 02:36:51 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:52 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:53 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:54 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:55 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:56 +0000] [12752] [ERROR] Can't connect to ('0.0.0.0', 80)
any ideas why this is not working? Sometimes it works for port 8000.
You have to use 'sudo' command for this.
sudo gunicorn --bind 0.0.0.0:80 --workers 3 myapp.wsgi:application
Port 80 requires superuser privilege.
If you are on a unix-like environment, ports < 1024 (like 80) will require superuser privileges.
From the question: https://stackoverflow.com/a/16225928/6823310
Originally answered by:
https://stackoverflow.com/users/358328/uku-loskit
This is why port 8000 works and 80 do not.
Try running the command with sudo.
Otherwise check if that port is not already being used by another service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With