Summary: | "localhost" leads to start failure | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Tianyin Xu <tixu> |
Component: | All | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | NEW --- | ||
Severity: | normal | CC: | adrian.fita, tixu |
Priority: | P2 | ||
Version: | 2.4.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Tianyin Xu
2012-03-12 09:51:21 UTC
This may be related to PR 52709 in APR. (In reply to comment #1) > This may be related to PR 52709 in APR. Thanks, Stefan! But it seems different with my case. Their case is because of "eth0 as only IPv6". I checked my network configuration. I have both IPv4 & IPv6 for my eth0. I suspected this problem is caused by the IPv6 stuff, but I tested on my colleague's machine which also has IPv4 & IPv6. On his machine, this problem didn't exist. Hmmm... it's really a strange problem...:( Maybe I should go to bugzilla APR? I can reproduce this, it is another weird AI_ADDRCONFIG getaddinfo() thing. Using people.apache.org/~jorton/gai.c $ ./gai localhost getaddrinfo("localhost", NULL, {.family=AF_UNSPEC, .hints=0}) = 0: family=10, proto= 6 inet6: addr=::1, port=0, flowinfo=0 family= 2, proto= 6 inet4: addr=127.0.0.1, port=0 $ ./gai -a localhost getaddrinfo("localhost", NULL, {.family=AF_UNSPEC, .hints=0|AI_ADDRCONFIG}) = 0: family= 2, proto= 6 inet4: addr=127.0.0.1, port=0 family= 2, proto= 6 inet4: addr=127.0.0.1, port=0 ... where /etc/hosts has both "localhost" and "localhost.domain" mapping to 127.0.0.1. Google says there is some... "disagreement" about whether this is app/libc/distro problem. Sigh. I guess we could work around it in APR by ignoring duplicate addresses. I encountered this same issue when I disabled ipv6 on RHEL (following the article at https://access.redhat.com/solutions/8709), but I did not comment/removed the line with "::1 localhost" from /etc/hosts. |