2

According to gunicorn docs and wikipedia and other sources across the web including other questions in SO The correct value of the "localhost" or "loopback" for an IPv6 address is the value [::1] but when binding it in gunicorn command:

gunicorn -b '[::1]:8003' myserver:app

will not bind it, and will return the following errors when it try to start:

[2021-01-08 14:18:41 +0000] [8] [INFO] Starting gunicorn 20.0.4
[2021-01-08 14:18:41 +0000] [8] [ERROR] Invalid address: ('::1', 8003)
[2021-01-08 14:18:41 +0000] [8] [ERROR] Retrying in 1 second

this repeats and then the operation is aborted. when binding with [::]:8003 the same command works and server is available both on ipv6 and ipv4. is this an unexpected behaviour of gunicorn, or is this how it should be?

  • maybe other program already use this addres. Did you try with different port? Did you try to open this address in web browser? – furas Jan 08 '21 at 15:09
  • @furas i've checked with netstat nothing is on this port. it happens with any port i would assign instead (8080, 8000, 5000 etc.) –  Jan 08 '21 at 17:39
  • did you manage to find a workaround? – B B Dec 01 '22 at 18:30

0 Answers0