Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorboard could not bind to unsupported address family :: #1713

Open
zh794390558 opened this issue Dec 21, 2018 · 9 comments
Open

Tensorboard could not bind to unsupported address family :: #1713

zh794390558 opened this issue Dec 21, 2018 · 9 comments
Assignees
Labels
core:backend theme:usability Areas to reduce confusion and frustration. type:bug

Comments

@zh794390558
Copy link
Contributor

tensorboard --logdir ckpt/ --port 8012

E1221 10:23:28.750255 MainThread program.py:201] Tensorboard could not bind to unsupported address family ::
E1221 10:23:28.750255 140156928575296 program.py:201] Tensorboard could not bind to unsupported address family ::
ERROR: Tensorboard could not bind to unsupported address family ::

python -c 'from tensorboard import version; print(version.VERSION)'
1.12.0

@wchargin
Copy link
Contributor

Hi @zh794390558! This looks like a problem with IPv4/IPv6 support.
@nfelt, you did a lot of work in this space in #1449: mind taking a look
at this?

@nfelt
Copy link
Collaborator

nfelt commented Dec 21, 2018

@zh794390558 please provide the rest of the relevant information from our issue template, in particular:

  • OS Platform and version (e.g., Linux Ubuntu 16.04)
  • Python version (e.g. 2.7, 3.5)

Can you also provide the output of

python -c 'import socket; import pprint; pprint.pprint({x: getattr(socket, x) for x in socket.__all__})'
python -c 'import socket; print(socket.getaddrinfo(None, 8012, socket.AF_UNSPEC, socket.SOCK_STREAM, socket.IPPROTO_TCP, socket.AI_PASSIVE))'

@zh794390558
Copy link
Contributor Author

@nfelt

[luban@c6fa5eaaa0c4 emotion]$ python -c 'import socket; import pprint; pprint.pprint({x: getattr(socket, x) for x in socket.__all__})'
python -c 'import socket; print(socket.getaddrinfo(None, 8012, socket.AF_UNSPEC, socket.SOCK_STREAM, socket.IPPROTO_TCP, socket.AI_PASSIVE))'{'AF_APPLETALK': <AddressFamily.AF_APPLETALK: 5>,
 'AF_ASH': <AddressFamily.AF_ASH: 18>,
 'AF_ATMPVC': <AddressFamily.AF_ATMPVC: 8>,
 'AF_ATMSVC': <AddressFamily.AF_ATMSVC: 20>,
 'AF_AX25': <AddressFamily.AF_AX25: 3>,
 'AF_BRIDGE': <AddressFamily.AF_BRIDGE: 7>,
 'AF_CAN': <AddressFamily.AF_CAN: 29>,
 'AF_DECnet': 12,
 'AF_ECONET': <AddressFamily.AF_ECONET: 19>,
 'AF_INET': <AddressFamily.AF_INET: 2>,
 'AF_INET6': <AddressFamily.AF_INET6: 10>,
 'AF_IPX': <AddressFamily.AF_IPX: 4>,
 'AF_IRDA': <AddressFamily.AF_IRDA: 23>,
 'AF_KEY': <AddressFamily.AF_KEY: 15>,
 'AF_LLC': <AddressFamily.AF_LLC: 26>,
 'AF_NETBEUI': <AddressFamily.AF_NETBEUI: 13>,
 'AF_NETLINK': <AddressFamily.AF_NETLINK: 16>,
 'AF_NETROM': <AddressFamily.AF_NETROM: 6>,
 'SOL_TIPC': 271,
 'SOL_UDP': 17,
 'SOMAXCONN': 128,
 'SO_ACCEPTCONN': 30,
 'SO_BINDTODEVICE': 25,
 'SO_BROADCAST': 6,
 'SO_DEBUG': 1,
 'SO_DOMAIN': 39,
 'SO_DONTROUTE': 5,
 'SO_ERROR': 4,
 'SO_KEEPALIVE': 9,
 'SO_LINGER': 13,
 'SO_MARK': 36,
 'SO_OOBINLINE': 10,
 'SO_PASSCRED': 16,
 'SO_PASSSEC': 34,
 'SO_PEERCRED': 17,
 'SO_PEERSEC': 31,
 'SO_PRIORITY': 12,
 'SO_PROTOCOL': 38,
 'SO_RCVBUF': 8,
 'SO_RCVLOWAT': 18,
 'SO_RCVTIMEO': 20,
 'SO_REUSEADDR': 2,
 'SO_SNDBUF': 7,
 'SO_SNDLOWAT': 19,
 'SO_SNDTIMEO': 21,
 'SO_TYPE': 3,
 'SocketKind': <enum 'SocketKind'>,
 'SocketType': <class '_socket.socket'>,
 'TCP_CONGESTION': 13,
 'TCP_CORK': 3,
 'TCP_DEFER_ACCEPT': 9,
 'TCP_INFO': 11,
 'TCP_KEEPCNT': 6,
 'TCP_KEEPIDLE': 4,
 'TCP_KEEPINTVL': 5,
 'TCP_LINGER2': 8,
 'TCP_MAXSEG': 2,
 'TCP_NODELAY': 1,
 'TCP_QUICKACK': 12,
 'TCP_SYNCNT': 7,
 'TCP_WINDOW_CLAMP': 10,
 'TIPC_ADDR_ID': 3,
 'TIPC_ADDR_NAME': 2,
 'TIPC_ADDR_NAMESEQ': 1,
 'TIPC_CFG_SRV': 0,
 'TIPC_CLUSTER_SCOPE': 2,
 'TIPC_CONN_TIMEOUT': 130,
 'TIPC_CRITICAL_IMPORTANCE': 3,
 'TIPC_DEST_DROPPABLE': 129,
 'TIPC_HIGH_IMPORTANCE': 2,
 'TIPC_IMPORTANCE': 127,
 'TIPC_LOW_IMPORTANCE': 0,
 'TIPC_MEDIUM_IMPORTANCE': 1,
 'TIPC_NODE_SCOPE': 3,
 'TIPC_PUBLISHED': 1,
 'TIPC_SRC_DROPPABLE': 128,
 'TIPC_SUBSCR_TIMEOUT': 3,
 'TIPC_SUB_CANCEL': 4,
 'TIPC_SUB_PORTS': 1,
 'TIPC_SUB_SERVICE': 2,
 'TIPC_TOP_SRV': 1,
 'TIPC_WAIT_FOREVER': -1,
 'TIPC_WITHDRAWN': 2,
 'TIPC_ZONE_SCOPE': 1,
 'create_connection': <function create_connection at 0x7f14e0c7bae8>,
 'dup': <built-in function dup>,
 'error': <class 'OSError'>,
 'fromfd': <function fromfd at 0x7f14e0c72730>,
 'gaierror': <class 'socket.gaierror'>,
 'getaddrinfo': <function getaddrinfo at 0x7f14e0c7bb70>,
 'getdefaulttimeout': <built-in function getdefaulttimeout>,
 'getfqdn': <function getfqdn at 0x7f14e0c7b378>,
 'gethostbyaddr': <built-in function gethostbyaddr>,
 'gethostbyname': <built-in function gethostbyname>,
 'gethostbyname_ex': <built-in function gethostbyname_ex>,
 'gethostname': <built-in function gethostname>,
 'getnameinfo': <built-in function getnameinfo>,
 'getprotobyname': <built-in function getprotobyname>,
 'getservbyname': <built-in function getservbyname>,
 'getservbyport': <built-in function getservbyport>,
 'has_ipv6': True,
 'herror': <class 'socket.herror'>,
 'htonl': <built-in function htonl>,
 'htons': <built-in function htons>,
 'if_indextoname': <built-in function if_indextoname>,
 'if_nameindex': <built-in function if_nameindex>,
 'if_nametoindex': <built-in function if_nametoindex>,
 'inet_aton': <built-in function inet_aton>,
 'inet_ntoa': <built-in function inet_ntoa>,
 'inet_ntop': <built-in function inet_ntop>,
 'inet_pton': <built-in function inet_pton>,
 'ntohl': <built-in function ntohl>,
 'ntohs': <built-in function ntohs>,
 'setdefaulttimeout': <built-in function setdefaulttimeout>,
 'sethostname': <built-in function sethostname>,
 'socket': <class 'socket.socket'>,
 'socketpair': <function socketpair at 0x7f14e0c7b2f0>,
 'timeout': <class 'socket.timeout'>}
[luban@c6fa5eaaa0c4 emotion]$ python -c 'import socket; print(socket.getaddrinfo(None, 8012, socket.AF_UNSPEC, socket.SOCK_STREAM, socket.IPPROTO_TCP, socket.AI_PASSIVE))'
[(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('0.0.0.0', 8012)), (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('::', 8012, 0, 0))]

@YongCHN
Copy link

YongCHN commented Dec 29, 2018

i also met the same issue in centos platform. my output of the above command:
$python -c 'import socket; import pprint; pprint.pprint({x: getattr(socket, x) for x in socket.all})'
{'AF_APPLETALK': 5,
'AF_ASH': 18,
'AF_ATMPVC': 8,
'AF_ATMSVC': 20,
'AF_AX25': 3,
'AF_BLUETOOTH': 31,
'AF_BRIDGE': 7,
'AF_DECnet': 12,
'AF_ECONET': 19,
'AF_INET': 2,
'AF_INET6': 10,
'AF_IPX': 4,
'AF_IRDA': 23,
'AF_KEY': 15,
'AF_LLC': 26,
'AF_NETBEUI': 13,
'AF_NETLINK': 16,
'AF_NETROM': 6,
'AF_PACKET': 17,
'AF_PPPOX': 24,
'AF_ROSE': 11,
'AF_ROUTE': 16,
'AF_SECURITY': 14,
'AF_SNA': 22,
'AF_TIPC': 30,
'AF_UNIX': 1,
'AF_UNSPEC': 0,
'AF_WANPIPE': 25,
'AF_X25': 9,
'AI_ADDRCONFIG': 32,
'AI_ALL': 16,
'AI_CANONNAME': 2,
'AI_NUMERICHOST': 4,
'AI_NUMERICSERV': 1024,
'AI_PASSIVE': 1,
'AI_V4MAPPED': 8,
'BDADDR_ANY': '00:00:00:00:00:00',
'BDADDR_LOCAL': '00:00:00:FF:FF:FF',
'BTPROTO_HCI': 1,
'BTPROTO_L2CAP': 0,
'BTPROTO_RFCOMM': 3,
'BTPROTO_SCO': 2,
'CAPI': <capsule object "_socket.CAPI" at 0x7f3a580060c0>,
'EAI_ADDRFAMILY': -9,
'EAI_AGAIN': -3,
'EAI_BADFLAGS': -1,
'EAI_FAIL': -4,
'EAI_FAMILY': -6,
'EAI_MEMORY': -10,
'EAI_NODATA': -5,
'EAI_NONAME': -2,
'EAI_OVERFLOW': -12,
'EAI_SERVICE': -8,
'EAI_SOCKTYPE': -7,
'EAI_SYSTEM': -11,
'HCI_TIME_STAMP': 3,
'INADDR_ALLHOSTS_GROUP': 3758096385,
'INADDR_ANY': 0,
'INADDR_BROADCAST': 4294967295,
'INADDR_LOOPBACK': 2130706433,
'INADDR_MAX_LOCAL_GROUP': 3758096639,
'INADDR_NONE': 4294967295,
'INADDR_UNSPEC_GROUP': 3758096384,
'IPPORT_RESERVED': 1024,
'IPPORT_USERRESERVED': 5000,
'IPPROTO_AH': 51,
'IPPROTO_DSTOPTS': 60,
'IPPROTO_EGP': 8,
'IPPROTO_ESP': 50,
'IPPROTO_FRAGMENT': 44,
'IPPROTO_GRE': 47,
'IPPROTO_HOPOPTS': 0,
'IPPROTO_ICMP': 1,
'IPPROTO_ICMPV6': 58,
'IPPROTO_IDP': 22,
'IPPROTO_IGMP': 2,
'IPPROTO_IP': 0,
'IPPROTO_IPIP': 4,
'IPPROTO_IPV6': 41,
'IPPROTO_NONE': 59,
'IPPROTO_PIM': 103,
'IPPROTO_PUP': 12,
'IPPROTO_RAW': 255,
'IPPROTO_ROUTING': 43,
'IPPROTO_RSVP': 46,
'IPPROTO_TCP': 6,
'IPPROTO_TP': 29,
'IPPROTO_UDP': 17,
'IPV6_CHECKSUM': 7,
'IPV6_DSTOPTS': 59,
'IPV6_HOPLIMIT': 52,
'IPV6_HOPOPTS': 54,
'IPV6_JOIN_GROUP': 20,
'IPV6_LEAVE_GROUP': 21,
'IPV6_MULTICAST_HOPS': 18,
'IPV6_MULTICAST_IF': 17,
'IPV6_MULTICAST_LOOP': 19,
'IPV6_NEXTHOP': 9,
'IPV6_PKTINFO': 50,
'IPV6_RECVDSTOPTS': 58,
'IPV6_RECVHOPLIMIT': 51,
'IPV6_RECVHOPOPTS': 53,
'IPV6_RECVPKTINFO': 49,
'IPV6_RECVRTHDR': 56,
'IPV6_RECVTCLASS': 66,
'IPV6_RTHDR': 57,
'IPV6_RTHDRDSTOPTS': 55,
'IPV6_RTHDR_TYPE_0': 0,
'IPV6_TCLASS': 67,
'IPV6_UNICAST_HOPS': 16,
'IPV6_V6ONLY': 26,
'IP_ADD_MEMBERSHIP': 35,
'IP_DEFAULT_MULTICAST_LOOP': 1,
'IP_DEFAULT_MULTICAST_TTL': 1,
'IP_DROP_MEMBERSHIP': 36,
'IP_HDRINCL': 3,
'IP_MAX_MEMBERSHIPS': 20,
'IP_MULTICAST_IF': 32,
'IP_MULTICAST_LOOP': 34,
'IP_MULTICAST_TTL': 33,
'IP_OPTIONS': 4,
'IP_RECVOPTS': 6,
'IP_RECVRETOPTS': 7,
'IP_RETOPTS': 7,
'IP_TOS': 1,
'IP_TTL': 2,
'MSG_CTRUNC': 8,
'MSG_DONTROUTE': 4,
'MSG_DONTWAIT': 64,
'MSG_EOR': 128,
'MSG_OOB': 1,
'MSG_PEEK': 2,
'MSG_TRUNC': 32,
'MSG_WAITALL': 256,
'NETLINK_DNRTMSG': 14,
'NETLINK_FIREWALL': 3,
'NETLINK_IP6_FW': 13,
'NETLINK_NFLOG': 5,
'NETLINK_ROUTE': 0,
'NETLINK_USERSOCK': 2,
'NETLINK_XFRM': 6,
'NI_DGRAM': 16,
'NI_MAXHOST': 1025,
'NI_MAXSERV': 32,
'NI_NAMEREQD': 8,
'NI_NOFQDN': 4,
'NI_NUMERICHOST': 1,
'NI_NUMERICSERV': 2,
'PACKET_BROADCAST': 1,
'PACKET_FASTROUTE': 6,
'PACKET_HOST': 0,
'PACKET_LOOPBACK': 5,
'PACKET_MULTICAST': 2,
'PACKET_OTHERHOST': 3,
'PACKET_OUTGOING': 4,
'PF_PACKET': 17,
'SHUT_RD': 0,
'SHUT_RDWR': 2,
'SHUT_WR': 1,
'SOCK_DGRAM': 2,
'SOCK_RAW': 3,
'SOCK_RDM': 4,
'SOCK_SEQPACKET': 5,
'SOCK_STREAM': 1,
'SOL_HCI': 0,
'SOL_IP': 0,
'SOL_SOCKET': 1,
'SOL_TCP': 6,
'SOL_TIPC': 271,
'SOL_UDP': 17,
'SOMAXCONN': 128,
'SO_ACCEPTCONN': 30,
'SO_ATTACH_FILTER': 26,
'SO_BINDTODEVICE': 25,
'SO_BROADCAST': 6,
'SO_BSDCOMPAT': 14,
'SO_DEBUG': 1,
'SO_DETACH_FILTER': 27,
'SO_DONTROUTE': 5,
'SO_ERROR': 4,
'SO_KEEPALIVE': 9,
'SO_LINGER': 13,
'SO_NO_CHECK': 11,
'SO_OOBINLINE': 10,
'SO_PASSCRED': 16,
'SO_PASSSEC': 34,
'SO_PEERCRED': 17,
'SO_PEERNAME': 28,
'SO_PEERSEC': 31,
'SO_PRIORITY': 12,
'SO_RCVBUF': 8,
'SO_RCVBUFFORCE': 33,
'SO_RCVLOWAT': 18,
'SO_RCVTIMEO': 20,
'SO_REUSEADDR': 2,
'SO_REUSEPORT': 15,
'SO_SECURITY_AUTHENTICATION': 22,
'SO_SECURITY_ENCRYPTION_NETWORK': 24,
'SO_SECURITY_ENCRYPTION_TRANSPORT': 23,
'SO_SNDBUF': 7,
'SO_SNDBUFFORCE': 32,
'SO_SNDLOWAT': 19,
'SO_SNDTIMEO': 21,
'SO_TIMESTAMP': 29,
'SO_TIMESTAMPNS': 35,
'SO_TYPE': 3,
'SocketType': <class 'socket._socketobject'>,
'TCP_CONGESTION': 13,
'TCP_CORK': 3,
'TCP_DEFER_ACCEPT': 9,
'TCP_INFO': 11,
'TCP_KEEPCNT': 6,
'TCP_KEEPIDLE': 4,
'TCP_KEEPINTVL': 5,
'TCP_LINGER2': 8,
'TCP_MAXSEG': 2,
'TCP_MD5SIG': 14,
'TCP_MD5SIG_MAXKEYLEN': 80,
'TCP_NODELAY': 1,
'TCP_QUICKACK': 12,
'TCP_SYNCNT': 7,
'TCP_WINDOW_CLAMP': 10,
'TIPC_ADDR_ID': 3,
'TIPC_ADDR_NAME': 2,
'TIPC_ADDR_NAMESEQ': 1,
'TIPC_CFG_SRV': 0,
'TIPC_CLUSTER_SCOPE': 2,
'TIPC_CONN_TIMEOUT': 130,
'TIPC_CRITICAL_IMPORTANCE': 3,
'TIPC_DEST_DROPPABLE': 129,
'TIPC_HIGH_IMPORTANCE': 2,
'TIPC_IMPORTANCE': 127,
'TIPC_LOW_IMPORTANCE': 0,
'TIPC_MEDIUM_IMPORTANCE': 1,
'TIPC_NODE_SCOPE': 3,
'TIPC_PUBLISHED': 1,
'TIPC_SRC_DROPPABLE': 128,
'TIPC_SUBSCR_TIMEOUT': 3,
'TIPC_SUB_CANCEL': 4,
'TIPC_SUB_PORTS': 1,
'TIPC_SUB_SERVICE': 2,
'TIPC_TOP_SRV': 1,
'TIPC_WAIT_FOREVER': -1,
'TIPC_WITHDRAWN': 2,
'TIPC_ZONE_SCOPE': 1,
'create_connection': <function create_connection at 0x7f3a57f99848>,
'error': <class 'socket.error'>,
'fromfd': ,
'gaierror': <class 'socket.gaierror'>,
'getaddrinfo': ,
'getdefaulttimeout': ,
'getfqdn': <function getfqdn at 0x7f3a57f992a8>,
'gethostbyaddr': ,
'gethostbyname': ,
'gethostbyname_ex': ,
'gethostname': ,
'getnameinfo': ,
'getprotobyname': ,
'getservbyname': ,
'getservbyport': ,
'has_ipv6': True,
'herror': <class 'socket.herror'>,
'htonl': ,
'htons': ,
'inet_aton': ,
'inet_ntoa': ,
'inet_ntop': ,
'inet_pton': ,
'ntohl': ,
'ntohs': ,
'setdefaulttimeout': ,
'socket': <class 'socket._socketobject'>,
'socketpair': ,
'timeout': <class 'socket.timeout'>}

@nfelt
Copy link
Collaborator

nfelt commented Jan 3, 2019

Thanks. So I guess we can't really reply on socket.has_ipv6 because in both cases apparently you still can't use an IPv6 loopback address.

For now, the workaround would be to explicitly pass either --host localhost (to serve on the loopback IP address, in your case most likely 127.0.0.1) or --host 0.0.0.0 (to serve on all IPv4 addresses).

We might be able to fix this by falling back to IPv4 if we get an address family unsupported error, though it will be a pain to do that in the current code.

@svobora
Copy link

svobora commented Jan 4, 2019

@nfelt Previously TensorBoard worked fined, now I've build TF with CUDA 10 support for Ubuntu 18.04 and Python 3.6 and TB stopped working.

The host option solved the problem for me.

@nfelt
Copy link
Collaborator

nfelt commented Jan 5, 2019

If you updated your TensorFlow installation, it would typically pull in a newer version of TensorBoard. Release 1.11 fixed some problems with IPv6 but it may have exposed this problem for certain platform configurations where the python socket module claims to support IPv6 but the underlying system won't actually let you bind to the IPv6 wildcard.

@Ramlinbird
Copy link

May be you can specify the --host parameter as your machine's hostname, I tried and it works.

@liutongxuan
Copy link

Notes: if use --host localhost , can't remotely access the ip:port in website. Use --host <ip> would be a better choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:backend theme:usability Areas to reduce confusion and frustration. type:bug
Projects
None yet
Development

No branches or pull requests

7 participants