Author cecton
Recipients cecton, yselivanov
Date 2017-07-17.10:04:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The IPv6 detection in asyncio.base_events.create_server only detect if IPv6 is available instead of checking if the interface can actually support it.

I noticed that by using Python in a Docker container (example code to reproduce in attachment):

docker run -it --rm -v /tmp/ python:3.6 python /src/

Will result in:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/", line 1043, in create_server
OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/src/", line 11, in <module>
    server = loop.run_until_complete(server_creation)
  File "/usr/local/lib/python3.6/asyncio/", line 466, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/asyncio/", line 1047, in create_server
    % (sa, err.strerror.lower()))
OSError: [Errno 99] error while attempting to bind on address ('::1', 27015, 0, 0): cannot assign requested address

By default Docker containers have only IPv4 enabled:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
38: eth0@if39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff
    inet scope global eth0
       valid_lft forever preferred_lft forever

I believe this detection mechanism should rely on the interface requested. I found this on the web for Python 2 that manage to get the info per interface: but it's using an external library.

However if you change the hostname to it works normally.
Date User Action Args
2017-07-17 10:04:34cectonsetrecipients: + cecton, yselivanov
2017-07-17 10:04:34cectonsetmessageid: <>
2017-07-17 10:04:34cectonlinkissue30945 messages
2017-07-17 10:04:34cectoncreate