> inside of what vserver :) i.e. please provide
> a few more details, like kernel version, tool version
> and such
>
>
vserver1:/# uname -va
Linux vserver1.foobar.com 2.6.17-2-vserver-amd64 #1 SMP Wed Sep 13
18:02:36 CEST 2006 x86_64 GNU/Linux
virtual:~# vserver --version
vserver 0.30.211 -- manages the state of vservers
This program is part of util-vserver 0.30.211
It's a debian etch system installed last week, so it should be up to date
> let's see ...
>
come on :-)
> that one would be quite interesting to get
> the strace from, please try something like
>
> strace -fF hostname -va
>
vserver1:/# strace -fF hostname -va
execve("/bin/hostname", ["hostname", "-va"], [/* 15 vars */]) = 0
uname({sys="Linux", node="vserver1.foobar.com", ...}) = 0
brk(0) = 0x503000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2ab393112000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=9416, ...}) = 0
mmap(NULL, 9416, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ab393114000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\305"...,
640) = 640
lseek(3, 624, SEEK_SET) = 624
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32)
= 32
fstat(3, {st_mode=S_IFREG|0755, st_size=1286312, ...}) = 0
mmap(NULL, 2344904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x2ab393213000
mprotect(0x2ab393334000, 1161160, PROT_NONE) = 0
mmap(0x2ab393434000, 98304, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x121000) = 0x2ab393434000
mmap(0x2ab39344c000, 14280, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab39344c000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2ab393450000
mprotect(0x2ab393434000, 86016, PROT_READ) = 0
arch_prctl(ARCH_SET_FS, 0x2ab3934506d0) = 0
munmap(0x2ab393114000, 9416) = 0
brk(0) = 0x503000
brk(0x524000) = 0x524000
uname({sys="Linux", node="vserver1.foobar.com", ...}) = 0
gettimeofday({1163656218, 118761}, NULL) = 0
getpid() = 6611
open("/etc/resolv.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=125, ...}) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2ab393114000
read(3, "search foobar.com\nnameser"..., 131072) = 125
read(3, "", 131072) = 0
close(3) = 0
munmap(0x2ab393114000, 131072) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=475, ...}) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2ab393114000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 131072) = 475
read(3, "", 131072) = 0
close(3) = 0
munmap(0x2ab393114000, 131072) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=9416, ...}) = 0
mmap(NULL, 9416, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ab393114000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20#\0\0"...,
640) = 640
fstat(3, {st_mode=S_IFREG|0644, st_size=43368, ...}) = 0
mmap(NULL, 1090856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x2ab393451000
mprotect(0x2ab39345b000, 1049896, PROT_NONE) = 0
mmap(0x2ab39355a000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x2ab39355a000
close(3) = 0
munmap(0x2ab393114000, 9416) = 0
open("/etc/host.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=9, ...}) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2ab393114000
read(3, "multi on\n", 131072) = 9
read(3, "", 131072) = 0
close(3) = 0
munmap(0x2ab393114000, 131072) = 0
open("/etc/hosts", O_RDONLY) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=281, ...}) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2ab393114000
read(3, "192.168.1.201 virtual1.foobar"..., 131072) = 281
read(3, "", 131072) = 0
close(3) = 0
munmap(0x2ab393114000, 131072) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=9416, ...}) = 0
mmap(NULL, 9416, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ab393114000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libnss_dns.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\22\0\0"...,
640) = 640
fstat(3, {st_mode=S_IFREG|0644, st_size=22792, ...}) = 0
mmap(NULL, 1069320, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x2ab39355c000
mprotect(0x2ab393560000, 1052936, PROT_NONE) = 0
mmap(0x2ab393660000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x2ab393660000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2207\0\0"...,
640) = 640
fstat(3, {st_mode=S_IFREG|0644, st_size=76600, ...}) = 0
mmap(NULL, 1133320, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x2ab393662000
mprotect(0x2ab393673000, 1063688, PROT_NONE) = 0
mmap(0x2ab393773000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x2ab393773000
mmap(0x2ab393775000, 6920, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab393775000
close(3) = 0
munmap(0x2ab393114000, 9416) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("192.168.1.5")}, 28) = 0
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1163656218, 123367}, NULL) = 0
poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
sendto(3, "* \1\0\0\1\0\0\0\0\0\0\10vserver1\rfoobar"..., 44, 0, NULL,
0) = 44
poll([{fd=3, events=POLLIN, revents=POLLERR}], 1, 5000) = 1
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("129.132.98.12")}, 28) = 0
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1163656218, 123870}, NULL) = 0
poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
sendto(3, "* \1\0\0\1\0\0\0\0\0\0\10vserver1\rfoobar"..., 44, 0, NULL,
0) = 44
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 3000) = 1
ioctl(3, FIONREAD, [104]) = 0
recvfrom(3, "* \201\203\0\1\0\0\0\1\0\0\10vserver1\rfoobar"..., 1024, 0,
{sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("129.132.98.12")}, [16]) = 104
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("192.168.1.5")}, 28) = 0
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1163656218, 247341}, NULL) = 0
poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
sendto(3, "K\347\1\0\0\1\0\0\0\0\0\0\10vserver1\rfoobar"..., 62, 0,
NULL, 0) = 62
poll([{fd=3, events=POLLIN, revents=POLLERR}], 1, 5000) = 1
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("129.132.98.12")}, 28) = 0
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1163656218, 247594}, NULL) = 0
poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
sendto(3, "K\347\1\0\0\1\0\0\0\0\0\0\10vserver1\rfoobar"..., 62, 0,
NULL, 0) = 62
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 3000) = 1
ioctl(3, FIONREAD, [122]) = 0
recvfrom(3, "K\347\201\203\0\1\0\0\0\1\0\0\10vserver1\rfoobar"..., 1024,
0, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("129.132.98.12")}, [16]) = 122
close(3) = 0
write(2, "hostname: ", 10hostname: ) = 10
write(2, "Unknown host", 12Unknown host) = 12
write(2, "\n", 1
) = 1
exit_group(1) = ?
Process 6611 detached
Looks like it is not happy /etc/hosts and the local dns server is
misconfigured. Why does it resolve the name with dns when it finds a
/etc/hosts?
> and provide the output ...
>
>> vserver1:/# cat /etc/resolv.conf
>> search foobar.com
>> nameserver 192.168.5.5
>> nameserver 129.132.98.12
>> nameserver 129.132.250.2
>> nameserver 129.132.250.220
>>
>
> IIRC, this won't work as expected, as you can
> only specify 3 nameservers in /etc/resolv.conf
>
Sure, is there a way to update this automatically from the hosts
(virtual) configuration (dhcp)
regards Dani
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Thu Nov 16 07:09:40 2006