I (want to) have a Google Cloud server running a Gunicorn server, however it refuses to bind to port 80, despite it being free.
Here's the command I'm using to start it:
gunicorn -w 4 -b 0.0.0.0:80 app:app
But I get the following error:
[2023-08-05 22:52:35 +0000] [8093] [INFO] Starting gunicorn 21.2.0
[2023-08-05 22:52:35 +0000] [8093] [ERROR] Retrying in 1 second.
[2023-08-05 22:52:36 +0000] [8093] [ERROR] Retrying in 1 second.
[2023-08-05 22:52:37 +0000] [8093] [ERROR] Retrying in 1 second.
[2023-08-05 22:52:38 +0000] [8093] [ERROR] Retrying in 1 second.
[2023-08-05 22:52:39 +0000] [8093] [ERROR] Retrying in 1 second.
[2023-08-05 22:52:40 +0000] [8093] [ERROR] Can't connect to ('0.0.0.0', 80)
But when I run netstat there doesn't seem to be anything else using that port:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 867/sshd: /usr/sbin
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 466/systemd-resolve
tcp6 0 0 :::22 :::* LISTEN 867/sshd: /usr/sbin
udp 0 0 127.0.0.53:53 0.0.0.0:* 466/systemd-resolve
udp 0 0 10.152.0.5:68 0.0.0.0:* 462/systemd-network
udp 0 0 127.0.0.1:323 0.0.0.0:* 1331/chronyd
udp6 0 0 ::1:323 :::* 1331/chronyd
If I use any other port it "works" fine, however I cannot seem to be able to access it from either a TCP scanner or web browser. I enabled HTTP/S on Google Cloud and I have another VM running Apache just fine.