[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#629899: apache2: apr_sockaddr_info_get() failed / Could not reliably determine the server's FQDN



On 2011-06-09 15:46:40 +0200, Massimo Manghi wrote:
> I agree with what you say and it doesn't rule out my hypothesis. I don't
> mean dhcp is needed, what I meant is that the problem is in the way the
> hostname and domain are fetched from the configuration. Using DHCP was
> illuminating because I was able to tell where the hostname returned came
> from (and didn't come from /etc/hosts as expected)

OK.

> More specifically: definitions in /etc/hosts (that were part of the
> determination of the name returned by 'gethostname' prior to the kernel
> upgrade) are now are ignored and the proof is that not only Apache is
> affected but also other applications.

You may see a different bug. On my machine, /etc/hosts is used by
both my fqdn program[*] and by ping. Indeed, just after changing
ypig.lip.ens-lyon.fr to ypig-test.lip.ens-lyon.fr in /etc/hosts,
I get:

ypig:~> fqdn
Nodename: ypig
FQDN: ypig-test.lip.ens-lyon.fr
ypig:~> ping ypig
PING ypig-test.lip.ens-lyon.fr (127.0.1.1) 56(84) bytes of data.
64 bytes from ypig-test.lip.ens-lyon.fr (127.0.1.1): icmp_req=1 ttl=64 time=0.029 ms
[...]

But how can I see what Apache chooses?

[*]

#!/usr/bin/env perl

use strict;
use POSIX;

my $nodename = (POSIX::uname)[1];
print "Nodename: $nodename\n";

my @ghbn = gethostbyname $nodename;
print "FQDN: $ghbn[0]\n";

> Once again my question is: should the bug be moved against the kernel or
> libc?

Definitely not the kernel or libc, unless something wrong occurs
at boot time.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



Reply to: