Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Excuse me, I pressed ENTER too early... The problem is that if hostname resolves to both ipv6 and ipv4 address, cumin will bind only to ipv6. e.g. /etc/hosts contents: 10.34.32.136 ooo.englab.brq.redhat.com ooo 2620:52:0:2223:21a:a0ff:feac:f08f ooo.englab.brq.redhat.com ooo /etc/cumin/cumin.conf: [web] # log-file: $CUMIN_HOME/log/web.log host: ooo port: 45672 When I delete the line containing IPv6 address from /etc/hosts (and there is no AAAA record for it in DNS), it binds to IPv4 address. I would expect it to bind to all addresses which the hostname resolves to.
This is a python behavior, not a cumin one. (And maybe not even just a python behavior.) From http://docs.python.org/library/socket.html : "If you use a hostname in the host portion of IPv4/v6 socket address, the program may show a nondeterministic behavior, as Python uses the first address returned from the DNS resolution. The socket address will be resolved differently into an actual IPv4/v6 address, depending on the results from DNS resolution and/or the host configuration. For deterministic behavior use a numeric address in host portion." I suspect that linux for whatever reason is returning the ip6 address first, and as you point out, python sockets only bind to one address.