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?